Add smoke test to verify client build is served

Adds a check in the container image CI workflow to verify that
/static/dist/base.css can be fetched from the deployed Galaxy instance.
This catches issues where the client build is not properly included
in the Docker image, which would result in 404 errors for static files.

Also removes the redundant second COPY statement in the Dockerfile.
In the original multi-stage build, the second COPY was needed to bring
in static files from the client_build stage. In the simplified single-stage
build, the first COPY already includes everything from stage1, making
the second COPY redundant.

See: https://github.com/galaxyproject/galaxy/pull/21695

https://claude.ai/code/session_01MUPhw6AEjCXdWutLRgu6Hz
This commit is contained in:
mvdbeek
2026-02-01 14:16:05 +01:00
parent 44e1e21281
commit b93cc259ab
2 changed files with 13 additions and 1 deletions
@@ -227,6 +227,19 @@ jobs:
if [ "$appVersion" != "$apiVersion" ]; then
exit 1
fi
- name: Check client build is served
run: |
base_url=$(kubectl get svc -n galaxy galaxy-nginx -o jsonpath="http://{.spec.clusterIP}:{.spec.ports[0].port}")
css_url="${base_url}/galaxy/static/dist/base.css"
echo "Checking client build at $css_url"
status_code=$(curl -s -o /dev/null -w "%{http_code}" "$css_url")
echo "Status code: $status_code"
if [ "$status_code" != "200" ]; then
echo "ERROR: Failed to fetch base.css (status: $status_code)"
echo "This indicates the client build was not properly included in the image"
exit 1
fi
echo "Client build is properly served"
pr:
name: Create a PR to update the Galaxy Helm chart when a release is tagged
-1
View File
@@ -148,7 +148,6 @@ WORKDIR $ROOT_DIR
# Copy galaxy files to final image
# The chown value MUST be hardcoded (see https://github.com/moby/moby/issues/35018)
COPY --chown=$GALAXY_USER:$GALAXY_USER --from=stage1 $ROOT_DIR .
COPY --chown=$GALAXY_USER:$GALAXY_USER --from=stage1 $SERVER_DIR/static ./server/static
WORKDIR $SERVER_DIR