Skip to content

Commit

Permalink
Adding build specific information for better debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
fotisp committed Sep 2, 2024
1 parent 976df3d commit 4b18f96
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ jobs:
with:
context: gui
image-name: gui-builder
build-args: |
BUILD_ID="${{github.sha}}"
BUILD_CONTEXT="${{github.ref_name}}"
secrets: inherit
4 changes: 1 addition & 3 deletions gui/.env.docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
VITE_API_URL=VITE_API_URL_PLACEHOLDER
VITE_CFSB_API_URL=VITE_CFSB_API_URL_PLACEHOLDER
VITE_BUILD_ID=VITE_BUILD_ID_PLACEHOLDER
VITE_CONTEXT=VITE_CONTEXT_PLACEHOLDER
VITE_CFSB_API_URL=VITE_CFSB_API_URL_PLACEHOLDER
8 changes: 8 additions & 0 deletions gui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Build the Vue app
FROM node:20 as build-stage

ARG BUILD_ID
ARG BUILD_CONTEXT

WORKDIR /app
COPY package*.json ./
COPY .env.docker ./.env


ENV VITE_BUILD_ID=${BUILD_ID}
ENV VITE_CONTEXT=${BUILD_CONTEXT}

RUN npm install --include-dev
COPY ./ .
RUN npm run build
Expand Down
3 changes: 0 additions & 3 deletions gui/set_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ do
echo "Setting VITE_CFSB_API_URL_PLACEHOLDER environment variables ${VITE_CFSB_API_URL}"
sed -i 's|VITE_CFSB_API_URL_PLACEHOLDER|'${VITE_CFSB_API_URL}'|g' $file

echo "Setting VITE_BUILD_ID_PLACEHOLDER environment variables ${VITE_BUILD_ID}"
sed -i 's|VITE_BUILD_ID_PLACEHOLDER|'${VITE_BUILD_ID}'|g' $file

echo "Setting VITE_CONTEXT_PLACEHOLDER environment variables ${VITE_CONTEXT}"
sed -i 's|VITE_CONTEXT_PLACEHOLDER|'${VITE_CONTEXT}'|g' $file

Expand Down

0 comments on commit 4b18f96

Please sign in to comment.