Commit b8baee05 authored by Michael Vrána's avatar Michael Vrána

Reuse webui build from build stage

parent 454ca15b
Pipeline #73619 failed with stages
in 2 minutes and 35 seconds
......@@ -6,12 +6,11 @@ build:
- apk add --no-cache npm nodejs
script:
- npm install
- "echo '{ \"apiUrl\": \"/api\" }' > ./src/config.json"
- CI=false npm run build
- rm -rf public
- mv build public
artifacts:
paths:
- public
- build
expire_in: 1 day
......@@ -28,6 +27,6 @@ deploy:
url: https://alt.pecka.me
script:
- echo "$SERVICE"
- docker-compose build --pull --force-rm --no-cache
- docker-compose build --pull --force-rm --no-cache --build-arg WEBUI_SKIP_BUILD=true
- docker-compose up -d --remove-orphans
dependencies: []
FROM alpine:3.9 AS builder-npm
ARG WEBUI_SKIP_BUILD
ADD . /app
WORKDIR /app
RUN echo '{ "apiUrl": "/api" }' > ./src/config.json
RUN apk add --no-cache nodejs npm && \
npm install && \
npm run build
RUN if [ ${WEBUI_SKIP_BUILD} != true ]; then \
echo '{ "apiUrl": "/api" }' > ./src/config.json && \
apk add --no-cache nodejs npm && \
npm install && \
npm run build; \
fi
# -----------------------------------------------------------------------------
......
......@@ -17,5 +17,5 @@
"types": ["jest"]
},
"include": ["src"],
"exclude": ["**/__mocks__"]
"exclude": ["**/__mocks__, /*"]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment