Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
metagrid-go
metagrid-vue
Commits
73811f3c
Commit
73811f3c
authored
Nov 17, 2021
by
Tobinsk
Browse files
Resolve "Build test image"
parent
cdabb4fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
73811f3c
...
...
@@ -25,6 +25,17 @@ build-docker:
-
docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
-
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
# build and push test image
build-test-docker
:
<<
:
*docker-login
stage
:
build
script
:
-
docker pull $CI_REGISTRY_IMAGE:latest ||
true
-
docker build --build-arg VUE_APP_API_URL=https://api.test.metagrid.ch --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
-
docker push $CI_REGISTRY_IMAGE:latest-test
only
:
-
master
push-latest
:
<<
:
*docker-login
stage
:
push
...
...
Dockerfile
View file @
73811f3c
# build stage
FROM
node:lts-alpine as build-stage
FROM
node:14-alpine as build-stage
RUN
apk add
--update
--no-cache
python3 make g++
WORKDIR
/app
COPY
package*.json ./
COPY
yarn.lock ./
RUN
yarn
COPY
. .
# provide a varibae to change the api url
ARG
VUE_APP_API_URL="https://api.metagrid.ch"
ENV
VUE_APP_API_URL $VUE_APP_API_URL
RUN
yarn run build
# production stage
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment