Skip to content

Commit b93cc25

Browse files
committed
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: #21695 https://claude.ai/code/session_01MUPhw6AEjCXdWutLRgu6Hz
1 parent 44e1e21 commit b93cc25

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/build_container_image.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,19 @@ jobs:
227227
if [ "$appVersion" != "$apiVersion" ]; then
228228
exit 1
229229
fi
230+
- name: Check client build is served
231+
run: |
232+
base_url=$(kubectl get svc -n galaxy galaxy-nginx -o jsonpath="http://{.spec.clusterIP}:{.spec.ports[0].port}")
233+
css_url="${base_url}/galaxy/static/dist/base.css"
234+
echo "Checking client build at $css_url"
235+
status_code=$(curl -s -o /dev/null -w "%{http_code}" "$css_url")
236+
echo "Status code: $status_code"
237+
if [ "$status_code" != "200" ]; then
238+
echo "ERROR: Failed to fetch base.css (status: $status_code)"
239+
echo "This indicates the client build was not properly included in the image"
240+
exit 1
241+
fi
242+
echo "Client build is properly served"
230243
231244
pr:
232245
name: Create a PR to update the Galaxy Helm chart when a release is tagged

.k8s_ci.Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ WORKDIR $ROOT_DIR
148148
# Copy galaxy files to final image
149149
# The chown value MUST be hardcoded (see https://github.com/moby/moby/issues/35018)
150150
COPY --chown=$GALAXY_USER:$GALAXY_USER --from=stage1 $ROOT_DIR .
151-
COPY --chown=$GALAXY_USER:$GALAXY_USER --from=stage1 $SERVER_DIR/static ./server/static
152151

153152
WORKDIR $SERVER_DIR
154153

0 commit comments

Comments
 (0)