git.delta.rocks / unique-network / refs/commits / 464a23ef439a

difftreelog

add build additional build images for xcm

Konstantin Astakhov2022-09-15parent: #ae09c8d.patch.diff
in: master

2 files changed

modified.github/workflows/xcm-testnet-build.ymldiffbeforeafterboth
76 - name: Read .env file76 - name: Read .env file
77 uses: xom9ikk/dotenv@v1.0.277 uses: xom9ikk/dotenv@v1.0.2
7878
79 - name: Log in to Docker Hub
80 uses: docker/login-action@v2.0.0
81 with:
82 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
83 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
84
85 - name: Install jq
86 run: sudo apt install jq -y
87
88 # - name: Get autorization token from DOCKERHUB
89 # run: |
90 # # aquire token
91 # TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
92 # export TOKEN=$TOKEN
93
94 # Check POLKADOT version and build it if it doesn't exist in repository
95 - name: Generate ENV related extend Dockerfile file for POLKADOT
96 uses: cuchi/jinja2-action@v1.2.0
97 with:
98 template: .docker/Dockerfile-polkadot.j2
99 output_file: .docker/Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml
100 variables: |
101 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
102 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
103
104 - name: Check if the dockerhub repository contains the needed version POLKADOT
105 run: |
106 # aquire token
107 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
108 export TOKEN=$TOKEN
109
110 # Get TAGS from DOCKERHUB POLKADOT repository
111 POLKADOT_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadot/tags/?page_size=100 | jq -r '."results"[]["name"]')
112 # Show TAGS
113 echo "POLKADOT TAGS:"
114 echo $POLKADOT_TAGS
115 # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS
116 if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ env.POLKADOT_BUILD_BRANCH }}"($|[[:space:]]) ]]; then
117 echo "Repository has needed POLKADOT version";
118 docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
119 else
120 echo "Repository has not needed POLKADOT version, so build it";
121 cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml --tag uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }} .
122 echo "Push needed POLKADOT version to the repository";
123 docker push uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
124 fi
125 shell: bash
126
127 # Check ACALA version and build it if it doesn't exist in repository
128 - name: Generate ENV related extend Dockerfile file for ACALA
129 uses: cuchi/jinja2-action@v1.2.0
130 with:
131 template: .docker/Dockerfile-acala.j2
132 output_file: .docker/Dockerfile-acala.${{ matrix.acala_version }}.yml
133 variables: |
134 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
135 ACALA_BUILD_BRANCH=${{ matrix.acala_version }}
136
137 - name: Check if the dockerhub repository contains the needed ACALA version
138 run: |
139 # aquire token
140 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
141 export TOKEN=$TOKEN
142
143 # Get TAGS from DOCKERHUB repository
144 ACALA_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-acala/tags/?page_size=100 | jq -r '."results"[]["name"]')
145 # Show TAGS
146 echo "ACALA TAGS:"
147 echo $ACALA_TAGS
148 # Check correct version ACALA and build it if it doesn't exist in ACALA TAGS
149 if [[ ${ACALA_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.acala_version }}"($|[[:space:]]) ]]; then
150 echo "Repository has needed ACALA version";
151 docker pull uniquenetwork/builder-acala:${{ matrix.acala_version }}
152 else
153 echo "Repository has not needed ACALA version, so build it";
154 cd .docker/ && docker build --no-cache --file ./Dockerfile-acala.${{ matrix.acala_version }}.yml --tag uniquenetwork/builder-acala:${{ matrix.acala_version }} .
155 echo "Push needed ACALA version to the repository";
156 docker push uniquenetwork/builder-acala:${{ matrix.acala_version }}
157 fi
158 shell: bash
159
160 # Check MOONBEAM version and build it if it doesn't exist in repository
161 - name: Generate ENV related extend Dockerfile file for MOONBEAM
162 uses: cuchi/jinja2-action@v1.2.0
163 with:
164 template: .docker/Dockerfile-moonbeam.j2
165 output_file: .docker/Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml
166 variables: |
167 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
168 MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}
169
170 - name: Check if the dockerhub repository contains the needed MOONBEAM version
171 run: |
172 # aquire token
173 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
174 export TOKEN=$TOKEN
175
176 # Get TAGS from DOCKERHUB repository
177 MOONBEAM_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-moonbeam/tags/?page_size=100 | jq -r '."results"[]["name"]')
178 # Show TAGS
179 echo "MOONBEAM TAGS:"
180 echo $MOONBEAM_TAGS
181 # Check correct version MOONBEAM and build it if it doesn't exist in MOONBEAM TAGS
182 if [[ ${MOONBEAM_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.moonbeam_version }}"($|[[:space:]]) ]]; then
183 echo "Repository has needed MOONBEAM version";
184 docker pull uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}
185 else
186 echo "Repository has not needed MOONBEAM version, so build it";
187 cd .docker/ && docker build --no-cache --file ./Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml --tag uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }} .
188 echo "Push needed MOONBEAM version to the repository";
189 docker push uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}
190 fi
191 shell: bash
192
193
194 # Check CUMULUS version and build it if it doesn't exist in repository
195 - name: Generate ENV related extend Dockerfile file for CUMULUS
196 uses: cuchi/jinja2-action@v1.2.0
197 with:
198 template: .docker/Dockerfile-cumulus.j2
199 output_file: .docker/Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml
200 variables: |
201 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
202 CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }}
203
204 - name: Check if the dockerhub repository contains the needed CUMULUS version
205 run: |
206 # aquire token
207 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
208 export TOKEN=$TOKEN
209
210 # Get TAGS from DOCKERHUB repository
211 CUMULUS_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-cumulus/tags/?page_size=100 | jq -r '."results"[]["name"]')
212 # Show TAGS
213 echo "CUMULUS TAGS:"
214 echo $CUMULUS_TAGS
215 # Check correct version CUMULUS and build it if it doesn't exist in CUMULUS TAGS
216 if [[ ${CUMULUS_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.cumulus_version }}"($|[[:space:]]) ]]; then
217 echo "Repository has needed CUMULUS version";
218 docker pull uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}
219 else
220 echo "Repository has not needed CUMULUS version, so build it";
221 cd .docker/ && docker build --no-cache --file ./Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml --tag uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }} .
222 echo "Push needed CUMULUS version to the repository";
223 docker push uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}
224 fi
225 shell: bash
226
227
228 # Build main image for XCM
79 - name: Generate ENV related extend Dockerfile file229 - name: Generate ENV related extend Dockerfile file
80 uses: cuchi/jinja2-action@v1.2.0230 uses: cuchi/jinja2-action@v1.2.0
81 with:231 with:
107 find: '/'257 find: '/'
108 replace: '-'258 replace: '-'
109
110 - name: Log in to Docker Hub
111 uses: docker/login-action@v2.0.0
112 with:
113 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
114 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
115
116 - name: Pull acala docker image
117 run: docker pull uniquenetwork/builder-acala:${{ matrix.acala_version }}
118
119 - name: Pull moonbeam docker image
120 run: docker pull uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}
121
122 - name: Pull cumulus docker image
123 run: docker pull uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}
124
125 - name: Pull polkadot docker image
126 run: docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
127259
128 - name: Pull chainql docker image260 - name: Pull chainql docker image
129 run: docker pull uniquenetwork/builder-chainql:latest261 run: docker pull uniquenetwork/builder-chainql:latest
143275
144 - name: Remove builder cache276 - name: Remove builder cache
145 if: always() # run this step always277 if: always() # run this step always
146 run: |278 run: |
147 docker builder prune -f279 docker builder prune -f
148 docker system prune -f280 docker system prune -f
149281
150282
151
modified.github/workflows/xcm-tests_v2.ymldiffbeforeafterboth
--- a/.github/workflows/xcm-tests_v2.yml
+++ b/.github/workflows/xcm-tests_v2.yml
@@ -17,7 +17,7 @@
 
     name: Prepare execution matrix
 
-#    needs: [xcm-testnet-build]
+    #needs: [xcm-testnet-build]
 
     runs-on: XL
     outputs:
@@ -172,3 +172,5 @@
         run: |
           docker system prune -a -f
 
+
+