Skip to content

Commit afd00ac

Browse files
committed
fix: adapt to new github workflows
1 parent 78605bc commit afd00ac

File tree

4 files changed

+47
-14
lines changed

4 files changed

+47
-14
lines changed

.github/workflows/deployment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ jobs:
228228
name: Build wheels
229229
runs-on: "ubuntu-latest"
230230
needs: deploy-pypi
231-
if: ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
232231
defaults:
233232
run:
234233
# We need extglob for REFERENCE_BRANCH substitution
@@ -273,7 +272,6 @@ jobs:
273272
needs:
274273
- deploy-pypi
275274
- build-gubbins-wheels
276-
if: ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
277275
timeout-minutes: 30
278276
runs-on: ubuntu-latest
279277
steps:
@@ -312,14 +310,16 @@ jobs:
312310
uses: docker/build-push-action@v6
313311
with:
314312
context: extensions/containers/client
315-
push: ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
313+
push: ${{ github.event_name != 'pull_request' && github.repository == 'DIRACGrid/diracx' && github.ref_name == 'main' }}
316314
tags: ghcr.io/diracgrid/gubbins/client:dev
317315
platforms: linux/amd64,linux/arm64
316+
build-args: |
317+
EXTRA_PACKAGES_TO_INSTALL=git+https://github.com/DIRACGrid/DIRAC.git@integration
318318
- name: Build and push service (dev)
319319
uses: docker/build-push-action@v6
320320
with:
321321
context: extensions/containers/services
322-
push: ${{ needs.deploy-pypi.outputs.create-release == 'true' }}
322+
push: ${{ github.event_name != 'pull_request' && github.repository == 'DIRACGrid/diracx' && github.ref_name == 'main' }}
323323
tags: ghcr.io/diracgrid/gubbins/services:dev
324324
platforms: linux/amd64,linux/arm64
325325
build-args: |

.github/workflows/main.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,19 @@ jobs:
113113
with:
114114
cache: false
115115
environments: ${{ matrix.extension == 'diracx' && 'default' || 'default-gubbins' }}
116-
- name: Build gubbins wheels
117-
if: ${{ matrix.extension == 'gubbins' }}
116+
- name: Build diracx wheels
118117
run: |
119118
for pkg_dir in $PWD/diracx-*; do
120119
echo "Building $pkg_dir"
121-
pixi exec python-build --outdir $PWD/extensions/containers/services/ $pkg_dir
120+
pixi exec python-build --outdir $PWD/containers/services/ $pkg_dir
122121
done
123122
# Also build the diracx metapackage
124-
pixi exec python-build --outdir $PWD/extensions/containers/services/ .
123+
pixi exec python-build --outdir $PWD/containers/services/ .
124+
- name: Build gubbins wheels
125+
if: ${{ matrix.extension == 'gubbins' }}
126+
run: |
127+
cp $PWD/containers/services/*.whl $PWD/extensions/containers/services/
128+
cp $PWD/containers/services/*.tar.gz $PWD/extensions/containers/services/
125129
# And build the gubbins package
126130
for pkg_dir in $PWD/extensions/gubbins/gubbins-*; do
127131
# Skip the testing package
@@ -134,8 +138,21 @@ jobs:
134138
pixi exec python-build --outdir $PWD/extensions/containers/services/ $pkg_dir
135139
done
136140
- name: Set up Docker Buildx
137-
if: ${{ matrix.extension == 'gubbins' }}
138141
uses: docker/setup-buildx-action@v3
142+
- name: Build container for diracx
143+
if: ${{ matrix.extension == 'diracx' }}
144+
uses: docker/build-push-action@v6
145+
with:
146+
context: containers/services
147+
tags: diracx/services:dev
148+
outputs: type=docker,dest=/tmp/diracx_services_image.tar
149+
build-args: |
150+
EXTRA_PACKAGES_TO_INSTALL=git+https://github.com/DIRACGrid/DIRAC.git@integration
151+
- name: Load image diracx
152+
if: ${{ matrix.extension == 'diracx' }}
153+
run: |
154+
docker load --input /tmp/diracx_services_image.tar
155+
docker image ls -a
139156
- name: Build container for gubbins
140157
if: ${{ matrix.extension == 'gubbins' }}
141158
uses: docker/build-push-action@v6
@@ -144,8 +161,9 @@ jobs:
144161
tags: gubbins/services:dev
145162
outputs: type=docker,dest=/tmp/gubbins_services_image.tar
146163
build-args: |
164+
EXTRA_PACKAGES_TO_INSTALL=git+https://github.com/DIRACGrid/DIRAC.git@integration
147165
EXTENSION_CUSTOM_SOURCES_TO_INSTALL=/bindmount/gubbins_db*.whl,/bindmount/gubbins_logic*.whl,/bindmount/gubbins_routers*.whl,/bindmount/gubbins_client*.whl
148-
- name: Load image
166+
- name: Load image gubbins
149167
if: ${{ matrix.extension == 'gubbins' }}
150168
run: |
151169
docker load --input /tmp/gubbins_services_image.tar
@@ -176,7 +194,9 @@ jobs:
176194
demo_args+=("--ci-values" "./extensions/gubbins_values.yaml")
177195
demo_args+=("--load-docker-image" "gubbins/services:dev")
178196
demo_source_dirs+=("/tmp/gubbins/")
179-
elif [ ${{ matrix.extension }} != 'diracx' ]; then
197+
elif [ ${{ matrix.extension }} == 'diracx' ]; then
198+
demo_args+=("--load-docker-image" "diracx/services:dev")
199+
else
180200
echo "Unknown extension: ${{ matrix.extension }}"
181201
exit 1
182202
fi

diracx_values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# values specific to testing gubbins
2+
global:
3+
# Needed to be able to force pre-load the image in kind
4+
# see https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster
5+
# and https://iximiuz.com/en/posts/kubernetes-kind-load-docker-image/
6+
imagePullPolicy: IfNotPresent
7+
images:
8+
services: diracx/services
9+
10+
developer:
11+
enabled: true

extensions/gubbins_values.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# values specific to testing gubbins
22
global:
3-
imagePullPolicy: Always
3+
# Needed to be able to force pre-load the image in kind
4+
# see https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster
5+
# and https://iximiuz.com/en/posts/kubernetes-kind-load-docker-image/
6+
imagePullPolicy: IfNotPresent
47
images:
5-
tag: dev
6-
services: ghcr.io/diracgrid/gubbins/services
8+
services: gubbins/services
79

810
developer:
911
enabled: true

0 commit comments

Comments
 (0)