git.delta.rocks / unique-network / refs/commits / 1f22fe8b2e1e

difftreelog

add saparate build for xcm parachains

Konstantin Astakhov2022-09-09parent: #838ab9f.patch.diff
in: master

5 files changed

added.docker/Dockerfile-acala.j2diffbeforeafterboth

no changes

added.docker/Dockerfile-cumulus.j2diffbeforeafterboth

no changes

added.docker/Dockerfile-moonbeam.j2diffbeforeafterboth

no changes

added.docker/Dockerfile-polkadot.j2diffbeforeafterboth

no changes

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: Get autorization token from DOCKERHUB
86 run: |
87 # aquire token
88 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)
89 export $TOKEN
90
91 # Check POLKADOT version and build it if it doesn't exist in repository
92 - name: Generate ENV related extend Dockerfile file for POLKADOT
93 uses: cuchi/jinja2-action@v1.2.0
94 with:
95 template: .docker/Dockerfile-polkadot.j2
96 output_file: .docker/Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml
97 variables: |
98 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
99 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
100
101 - name: Check if the dockerhub repository contains the needed version POLKADOT
102 run: |
103 # Get TAGS from DOCKERHUB repository
104 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"]')
105 # Show TAGS
106 echo "POLKADOT TAGS:"
107 echo $POLKADOT_TAGS
108 # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS
109 if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ env.POLKADOT_BUILD_BRANCH }}"($|[[:space:]]) ]]; then
110 echo "Repository has needed POLKADOT version";
111 docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
112 else
113 echo "Repository has not needed POLKADOT version, so build it";
114 cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml --tag uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }} .
115 echo "Push needed POLKADOT version to the repository";
116 docker push uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
117 fi
118 shell: bash
119
120 # Check ACALA version and build it if it doesn't exist in repository
121 - name: Generate ENV related extend Dockerfile file for ACALA
122 uses: cuchi/jinja2-action@v1.2.0
123 with:
124 template: .docker/Dockerfile-acala.j2
125 output_file: .docker/Dockerfile-acala.${{ matrix.acala_version }}.yml
126 variables: |
127 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
128 ACALA_BUILD_BRANCH=${{ matrix.acala_version }}
129
130 - name: Check if the dockerhub repository contains the needed ACALA version
131 run: |
132 # Get TAGS from DOCKERHUB repository
133 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"]')
134 # Show TAGS
135 echo "ACALA TAGS:"
136 echo $ACALA_TAGS
137 # Check correct version ACALA and build it if it doesn't exist in ACALA TAGS
138 if [[ ${ACALA_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.acala_version }}"($|[[:space:]]) ]]; then
139 echo "Repository has needed ACALA version";
140 docker pull uniquenetwork/builder-acala:${{ matrix.acala_version }}
141 else
142 echo "Repository has not needed ACALA version, so build it";
143 cd .docker/ && docker build --no-cache --file ./Dockerfile-acala.${{ matrix.acala_version }}.yml --tag uniquenetwork/builder-acala:${{ matrix.acala_version }} .
144 echo "Push needed ACALA version to the repository";
145 docker push uniquenetwork/builder-acala:${{ matrix.acala_version }}
146 fi
147 shell: bash
148
149 # Check MOONBEAM version and build it if it doesn't exist in repository
150 - name: Generate ENV related extend Dockerfile file for MOONBEAM
151 uses: cuchi/jinja2-action@v1.2.0
152 with:
153 template: .docker/Dockerfile-moonbeam.j2
154 output_file: .docker/Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml
155 variables: |
156 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
157 MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}
158
159 - name: Check if the dockerhub repository contains the needed MOONBEAM version
160 run: |
161 # Get TAGS from DOCKERHUB repository
162 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"]')
163 # Show TAGS
164 echo "MOONBEAM TAGS:"
165 echo $MOONBEAM_TAGS
166 # Check correct version MOONBEAM and build it if it doesn't exist in MOONBEAM TAGS
167 if [[ ${MOONBEAM_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.moonbeam_version }}"($|[[:space:]]) ]]; then
168 echo "Repository has needed MOONBEAM version";
169 docker pull uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}
170 else
171 echo "Repository has not needed MOONBEAM version, so build it";
172 cd .docker/ && docker build --no-cache --file ./Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml --tag uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }} .
173 echo "Push needed MOONBEAM version to the repository";
174 docker push uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}
175 fi
176 shell: bash
177
178
179 # Check CUMULUS version and build it if it doesn't exist in repository
180 - name: Generate ENV related extend Dockerfile file for CUMULUS
181 uses: cuchi/jinja2-action@v1.2.0
182 with:
183 template: .docker/Dockerfile-cumulus.j2
184 output_file: .docker/Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml
185 variables: |
186 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
187 CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }}
188
189 - name: Check if the dockerhub repository contains the needed CUMULUS version
190 run: |
191 # Get TAGS from DOCKERHUB repository
192 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"]')
193 # Show TAGS
194 echo "CUMULUS TAGS:"
195 echo $CUMULUS_TAGS
196 # Check correct version CUMULUS and build it if it doesn't exist in CUMULUS TAGS
197 if [[ ${CUMULUS_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.cumulus_version }}"($|[[:space:]]) ]]; then
198 echo "Repository has needed CUMULUS version";
199 docker pull uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}
200 else
201 echo "Repository has not needed CUMULUS version, so build it";
202 cd .docker/ && docker build --no-cache --file ./Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml --tag uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }} .
203 echo "Push needed CUMULUS version to the repository";
204 docker push uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}
205 fi
206 shell: bash
207
208
209 # Build main image for XCM
79 - name: Generate ENV related extend Dockerfile file210 - name: Generate ENV related extend Dockerfile file
80 uses: cuchi/jinja2-action@v1.2.0211 uses: cuchi/jinja2-action@v1.2.0
81 with:212 with:
106 source: ${{ github.head_ref }}237 source: ${{ github.head_ref }}
107 find: '/'238 find: '/'
108 replace: '-'239 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 }}
127240
128 - name: Pull chainql docker image241 - name: Pull chainql docker image
129 run: docker pull uniquenetwork/builder-chainql:latest242 run: docker pull uniquenetwork/builder-chainql:latest