@@ -219,3 +219,109 @@ 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 :
274
+ - deploy-pypi
275
+ - build-gubbins-wheels
276
+ if : ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
277
+ timeout-minutes : 30
278
+ runs-on : ubuntu-latest
279
+ steps :
280
+ - name : Checkout
281
+ uses : actions/checkout@v4
282
+ - name : Set up QEMU
283
+ uses : docker/setup-qemu-action@v3
284
+ - name : Set up Docker Buildx
285
+ uses : docker/setup-buildx-action@v3
286
+ - name : Login to GitHub container registry
287
+ uses : docker/login-action@v3
288
+ with :
289
+ registry : ghcr.io
290
+ username : ${{ github.actor }}
291
+ password : ${{ secrets.GITHUB_TOKEN }}
292
+ - name : Download diracx wheels
293
+ uses : actions/download-artifact@v4
294
+ with :
295
+ name : diracx-whl
296
+ - name : Download gubbins wheels
297
+ uses : actions/download-artifact@v4
298
+ with :
299
+ name : gubbins-whl
300
+ - name : " Find wheels"
301
+ id : find_wheel
302
+ run : |
303
+ # We need to copy them there to be able to access them in the RUN --mount
304
+ cp diracx*.whl gubbins*.whl extensions/containers/client/
305
+ cp diracx*.whl gubbins*.whl extensions/containers/services/
306
+ for wheel_fn in *.whl; do
307
+ pkg_name=$(basename "${wheel_fn}" | cut -d '-' -f 1)
308
+ echo "${pkg_name}-wheel-name=$(ls "${pkg_name}"-*.whl)" >> $GITHUB_OUTPUT
309
+ done
310
+
311
+ - name : Build and push client (dev)
312
+ uses : docker/build-push-action@v6
313
+ with :
314
+ context : extensions/containers/client
315
+ push : ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
316
+ tags : ghcr.io/diracgrid/gubbins/client:dev
317
+ platforms : linux/amd64,linux/arm64
318
+ - name : Build and push service (dev)
319
+ uses : docker/build-push-action@v6
320
+ with :
321
+ context : extensions/containers/services
322
+ push : ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
323
+ tags : ghcr.io/diracgrid/gubbins/services:dev
324
+ platforms : linux/amd64,linux/arm64
325
+ build-args : |
326
+ EXTRA_PACKAGES_TO_INSTALL=git+https://github.com/DIRACGrid/DIRAC.git@integration
327
+ EXTENSION_CUSTOM_SOURCES_TO_INSTALL=/bindmount/gubbins_db*.whl,/bindmount/gubbins_logic*.whl,/bindmount/gubbins_routers*.whl,/bindmount/gubbins_client*.whl
0 commit comments