@@ -121,44 +121,34 @@ jobs:
121121 with :
122122 cache : false
123123 environments : ${{ matrix.extension == 'diracx' && 'default' || 'default-gubbins' }}
124- - name : Build gubbins wheels
125- if : ${{ matrix.extension == 'gubbins' }}
126- run : |
127- for pkg_dir in $PWD/diracx-*; do
128- echo "Building $pkg_dir"
129- pixi exec python-build --outdir $PWD/extensions/containers/services/ $pkg_dir
130- done
131- # Also build the diracx metapackage
132- pixi exec python-build --outdir $PWD/extensions/containers/services/ .
133- # And build the gubbins package
134- for pkg_dir in $PWD/extensions/gubbins/gubbins-*; do
135- # Skip the testing package
136- if [[ "${pkg_dir}" =~ .*testing.* ]];
137- then
138- echo "Do not build ${pkg_dir}";
139- continue;
140- fi
141- echo "Building $pkg_dir"
142- pixi exec python-build --outdir $PWD/extensions/containers/services/ $pkg_dir
143- done
144124 - name : Set up Docker Buildx
145- if : ${{ matrix.extension == 'gubbins' }}
146125 uses : docker/setup-buildx-action@v4
147- - name : Build container for gubbins
148- if : ${{ matrix.extension == 'gubbins' }}
126+ - name : Build services image
127+ uses : docker/build-push-action@v7
128+ with :
129+ context : .
130+ file : containers/Dockerfile
131+ build-args : |
132+ PIXI_ENV=${{ matrix.extension == 'diracx' && 'container-services' || 'gubbins-container-services' }}
133+ DIRACX_EXTENSIONS=${{ matrix.extension == 'diracx' && 'diracx' || 'gubbins,diracx' }}
134+ tags : ghcr.io/${{ matrix.extension == 'diracx' && 'diracgrid/diracx' || 'gubbins' }}/services:dev
135+ outputs : type=docker,dest=/tmp/services_image.tar
136+ - name : Build client image
149137 uses : docker/build-push-action@v7
150138 with :
151- context : extensions/containers/services
152- tags : gubbins/services:dev
153- outputs : type=docker,dest=/tmp/gubbins_services_image.tar
139+ context : .
140+ file : containers/Dockerfile
154141 build-args : |
155- EXTENSION_CUSTOM_SOURCES_TO_INSTALL=/bindmount/gubbins_db*.whl,/bindmount/gubbins_logic*.whl,/bindmount/gubbins_routers*.whl,/bindmount/gubbins_client*.whl
156- - name : Load image
157- if : ${{ matrix.extension == 'gubbins' }}
142+ PIXI_ENV=${{ matrix.extension == 'diracx' && 'container-client' || 'gubbins-container-client' }}
143+ DIRACX_EXTENSIONS=${{ matrix.extension == 'diracx' && 'diracx' || 'gubbins,diracx' }}
144+ tags : ghcr.io/${{ matrix.extension == 'diracx' && 'diracgrid/diracx' || 'gubbins' }}/client:dev
145+ outputs : type=docker,dest=/tmp/client_image.tar
146+ - name : Load images
158147 run : |
159- docker load --input /tmp/gubbins_services_image.tar
160- # Free up disk space by removing the tarball after loading the image
161- rm -Rf /tmp/gubbins_services_image.tar
148+ docker load --input /tmp/services_image.tar
149+ rm -f /tmp/services_image.tar
150+ docker load --input /tmp/client_image.tar
151+ rm -f /tmp/client_image.tar
162152 docker builder prune -af || true
163153 docker image ls -a
164154 - name : Start demo
@@ -191,16 +181,26 @@ jobs:
191181 # Copy gubbins-charts to a temporary location and build dependencies
192182 cp -r ./extensions/gubbins-charts /tmp/
193183 ../diracx-charts/.demo/helm dependency build /tmp/gubbins-charts
184+ # Replace the downloaded subchart with the locally-cloned one to
185+ # ensure we have the pixi-compatible ConfigMap entrypoint
186+ rm -f /tmp/gubbins-charts/charts/diracx-*.tgz
187+ ../diracx-charts/.demo/helm package ../diracx-charts/diracx -d /tmp/gubbins-charts/charts/
194188
195189 demo_args+=("--extension-chart-path" "/tmp/gubbins-charts")
196190 demo_args+=("--ci-values" "./extensions/gubbins_values.yaml")
197- demo_args+=("--load-docker-image" "gubbins/services:dev")
191+ demo_args+=("--load-docker-image" "ghcr.io/gubbins/services:dev")
192+ demo_args+=("--load-docker-image" "ghcr.io/gubbins/client:dev")
193+ demo_args+=("--prune-loaded-images")
198194 demo_source_dirs+=("/tmp/gubbins/")
199195 elif [ ${{ matrix.extension }} != 'diracx' ]; then
200196 echo "Unknown extension: ${{ matrix.extension }}"
201197 exit 1
202198 else
203199 demo_args+=("--set-value" "developer.autoReload=false")
200+ demo_args+=("--set-value" "global.imagePullPolicy=IfNotPresent")
201+ demo_args+=("--load-docker-image" "ghcr.io/diracgrid/diracx/services:dev")
202+ demo_args+=("--load-docker-image" "ghcr.io/diracgrid/diracx/client:dev")
203+ demo_args+=("--prune-loaded-images")
204204 fi
205205
206206 # Run the demo with the provided arguments
0 commit comments