Skip to content

Commit c9af073

Browse files
committed
chore: adapt to DiracX CI
1 parent 03c667b commit c9af073

1 file changed

Lines changed: 19 additions & 84 deletions

File tree

.github/workflows/gubbins-test.yml

Lines changed: 19 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ jobs:
5454
prepare-gubbins-backend:
5555
runs-on: ubuntu-latest
5656
if: ${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
57-
defaults:
58-
run:
59-
# We need extglob for REFERENCE_BRANCH substitution
60-
shell: bash -l -O extglob {0}
6157
steps:
6258
- name: Clone source
6359
run: |
@@ -82,74 +78,6 @@ jobs:
8278
path: /tmp/gubbins
8379
include-hidden-files: true
8480

85-
# Prepare the gubbins image
86-
# - Build the gubbins wheels
87-
- uses: actions/setup-python@v6
88-
with:
89-
python-version: '3.14'
90-
- name: Installing dependencies
91-
run: |
92-
cd ../diracx
93-
python -m pip install \
94-
build \
95-
python-dateutil \
96-
pytz \
97-
readme_renderer[md] \
98-
requests \
99-
setuptools_scm
100-
- name: Build distributions
101-
run: |
102-
cd ../diracx
103-
for pkg_dir in $PWD/diracx-*; do
104-
echo "Building $pkg_dir"
105-
python -m build --outdir $PWD/dist $pkg_dir
106-
done
107-
# Also build the diracx metapackage
108-
python -m build --outdir $PWD/dist .
109-
# And build the gubbins package
110-
for pkg_dir in $PWD/extensions/gubbins/gubbins-*; do
111-
# Skip the testing package
112-
if [[ "${pkg_dir}" =~ .*testing.* ]];
113-
then
114-
echo "Do not build ${pkg_dir}";
115-
continue;
116-
fi
117-
echo "Building $pkg_dir"
118-
python -m build --outdir $PWD/dist $pkg_dir
119-
done
120-
- name: "Find wheels"
121-
id: find_wheel
122-
run: |
123-
cd ../diracx/dist
124-
# We need to copy them there to be able to access them in the RUN --mount
125-
cp diracx*.whl gubbins*.whl ../extensions/containers/services/
126-
for wheel_fn in *.whl; do
127-
pkg_name=$(basename "${wheel_fn}" | cut -d '-' -f 1)
128-
echo "${pkg_name}-wheel-name=$(ls "${pkg_name}"-*.whl)" >> $GITHUB_OUTPUT
129-
done
130-
131-
# - Build the gubbins image using the wheels
132-
- name: Set up QEMU
133-
uses: docker/setup-qemu-action@v4
134-
- name: Set up Docker Buildx
135-
uses: docker/setup-buildx-action@v4
136-
137-
- name: Build and export service
138-
uses: docker/build-push-action@v7
139-
with:
140-
context: ../diracx/extensions/containers/services
141-
tags: gubbins/services:dev
142-
outputs: type=docker,dest=/tmp/gubbins_services_image.tar
143-
build-args: |
144-
EXTRA_PACKAGES_TO_INSTALL=git+https://github.com/DIRACGrid/DIRAC.git@integration
145-
EXTENSION_CUSTOM_SOURCES_TO_INSTALL=/bindmount/gubbins_db*.whl,/bindmount/gubbins_routers*.whl,/bindmount/gubbins_client*.whl
146-
147-
- name: Upload artifact
148-
uses: actions/upload-artifact@v7
149-
with:
150-
name: gubbins-services-img
151-
path: /tmp/gubbins_services_image.tar
152-
15381
prepare-gubbins-frontend-as-a-standalone:
15482
runs-on: ubuntu-latest
15583
if: ${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
@@ -268,20 +196,11 @@ jobs:
268196
run: |
269197
git init /tmp/gubbins/
270198
271-
- name: Clone diracx source
199+
- name: Clone diracx source
272200
run: |
273201
cd ..
274202
git clone https://github.com/DIRACGrid/diracx.git
275203
276-
- name: Download gubbins:services image
277-
uses: actions/download-artifact@v8
278-
with:
279-
name: gubbins-services-img
280-
path: /tmp/
281-
282-
- name: Load docker image
283-
run: docker load --input /tmp/gubbins_services_image.tar
284-
285204
- name: Download gubbins-web
286205
uses: actions/download-artifact@v8
287206
with:
@@ -291,10 +210,26 @@ jobs:
291210
# ========================================================================#
292211

293212
# Runs the demo with the extension source code
294-
- name: Start demo
213+
- name: Start demo
295214
run: |
296215
cd ..
297-
diracx-charts/run_demo.sh --exit-when-done --set-value developer.autoReload=false --ci-values ./diracx/extensions/gubbins_values.yaml --load-docker-image "gubbins/services:dev" diracx/ /tmp/gubbins/ /tmp/gubbins-web/
216+
217+
# Download helm/kubectl/kind first
218+
diracx-charts/run_demo.sh --only-download-deps
219+
220+
# Copy gubbins-charts to a temporary location and build dependencies
221+
cp -r ./diracx/extensions/gubbins-charts /tmp/
222+
diracx-charts/.demo/helm dependency build /tmp/gubbins-charts
223+
# Replace the downloaded subchart with the locally-cloned one to
224+
# ensure we have the pixi-compatible ConfigMap entrypoint
225+
rm -f /tmp/gubbins-charts/charts/diracx-*.tgz
226+
diracx-charts/.demo/helm package diracx-charts/diracx -d /tmp/gubbins-charts/charts/
227+
228+
diracx-charts/run_demo.sh \
229+
--exit-when-done \
230+
--set-value diracx.developer.autoReload=false \
231+
--extension-chart-path /tmp/gubbins-charts \
232+
diracx/ /tmp/gubbins/ /tmp/gubbins-web/
298233
299234
- name: Debugging information
300235
run: |

0 commit comments

Comments
 (0)