@@ -219,3 +219,107 @@ jobs:
219
219
platforms : linux/amd64,linux/arm64
220
220
build-args : |
221
221
EXTRA_PACKAGES_TO_INSTALL=git+https://github.com/DIRACGrid/DIRAC.git@integration
222
+
223
+ # -------------------------------------------------------------------------------------------------
224
+ # Gubbins deployment
225
+ # -------------------------------------------------------------------------------------------------
226
+
227
+ build-gubbins-wheels :
228
+ name : Build wheels
229
+ runs-on : " ubuntu-latest"
230
+ needs : deploy-pypi
231
+ if : ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
232
+ defaults :
233
+ run :
234
+ # We need extglob for REFERENCE_BRANCH substitution
235
+ shell : bash -l -O extglob {0}
236
+ steps :
237
+ - name : Checkout
238
+ uses : actions/checkout@v4
239
+ - uses : actions/setup-python@v5
240
+ with :
241
+ python-version : ' 3.11'
242
+ - name : Installing dependencies
243
+ run : |
244
+ python -m pip install \
245
+ build \
246
+ python-dateutil \
247
+ pytz \
248
+ readme_renderer[md] \
249
+ requests \
250
+ setuptools_scm
251
+ - name : Build distributions
252
+ run : |
253
+ # build the gubbins package
254
+ for pkg_dir in $PWD/extensions/gubbins/gubbins-*; do
255
+ # Skip the testing package
256
+ if [[ "${pkg_dir}" =~ .*testing.* ]];
257
+ then
258
+ echo "Do not build ${pkg_dir}";
259
+ continue;
260
+ fi
261
+ echo "Building $pkg_dir"
262
+ python -m build --outdir $PWD/dist $pkg_dir
263
+ done
264
+ - name : ' Upload Artifact'
265
+ uses : actions/upload-artifact@v4
266
+ with :
267
+ name : gubbins-whl
268
+ path : dist/*.whl
269
+ retention-days : 5
270
+
271
+ # Build to docker image with the code in it
272
+ docker-gubbins :
273
+ needs : build-gubbins-wheels
274
+ if : ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
275
+ timeout-minutes : 30
276
+ runs-on : ubuntu-latest
277
+ steps :
278
+ - name : Checkout
279
+ uses : actions/checkout@v4
280
+ - name : Set up QEMU
281
+ uses : docker/setup-qemu-action@v3
282
+ - name : Set up Docker Buildx
283
+ uses : docker/setup-buildx-action@v3
284
+ - name : Login to GitHub container registry
285
+ uses : docker/login-action@v3
286
+ with :
287
+ registry : ghcr.io
288
+ username : ${{ github.actor }}
289
+ password : ${{ secrets.GITHUB_TOKEN }}
290
+ - name : Download diracx wheels
291
+ uses : actions/download-artifact@v4
292
+ with :
293
+ name : diracx-whl
294
+ - name : Download gubbins wheels
295
+ uses : actions/download-artifact@v4
296
+ with :
297
+ name : gubbins-whl
298
+ - name : " Find wheels"
299
+ id : find_wheel
300
+ run : |
301
+ # We need to copy them there to be able to access them in the RUN --mount
302
+ cp diracx*.whl gubbins*.whl extensions/containers/client/
303
+ cp diracx*.whl gubbins*.whl extensions/containers/services/
304
+ for wheel_fn in *.whl; do
305
+ pkg_name=$(basename "${wheel_fn}" | cut -d '-' -f 1)
306
+ echo "${pkg_name}-wheel-name=$(ls "${pkg_name}"-*.whl)" >> $GITHUB_OUTPUT
307
+ done
308
+
309
+ - name : Build and push client (dev)
310
+ uses : docker/build-push-action@v6
311
+ with :
312
+ context : extensions/containers/client
313
+ push : ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
314
+ tags : ghcr.io/diracgrid/gubbins/client:dev
315
+ platforms : linux/amd64,linux/arm64
316
+ - name : Build and push service (dev)
317
+ uses : docker/build-push-action@v6
318
+ with :
319
+ context : extensions/containers/services
320
+ push : ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
321
+ tags : ghcr.io/diracgrid/gubbins/services:dev
322
+ platforms : linux/amd64,linux/arm64
323
+ build-args : |
324
+ EXTRA_PACKAGES_TO_INSTALL=git+https://github.com/DIRACGrid/DIRAC.git@integration
325
+ EXTENSION_CUSTOM_SOURCES_TO_INSTALL=/bindmount/gubbins_db*.whl,/bindmount/gubbins_logic*.whl,/bindmount/gubbins_routers*.whl,/bindmount/gubbins_client*.whl
0 commit comments