1
0
Fork 0

build(docker): switch to multistage build image

This commit is contained in:
Vojtěch Mareš 2022-08-20 19:34:20 +02:00
parent 9d3505d299
commit 7d94c70adc
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
2 changed files with 19 additions and 8 deletions

View file

@ -11,20 +11,16 @@ variables:
build:
stage: build
image: sikalabs/ci-node
before_script:
- docker info
script:
- cd sites/signpost.cloud.mareshq.com
- yarn install --frozen-lockfile
- yarn build
- docker build --tag $IMAGE:$IMAGE_TAG --file ./../../build/Containerfile .
- docker build --tag $IMAGE:$IMAGE_TAG --file ./../../build/Containerfile --build-arg SITE=signpost.cloud.mareshq.com .
- docker push $IMAGE:$IMAGE_TAG
deploy:
stage: deploy
script:
- helm upgrade --install signpost-cloud-mareshq-com ./deploy/charts/static-site --namespace internal-static-sites -f ./sites/signpost.cloud.mareshq.com/helm-values.yaml --set image.tag=${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA}
- helm upgrade --install signpost-cloud-mareshq-com ./deploy/charts/static-site --namespace internal-static-sites -f ./sites/signpost.cloud.mareshq.com/helm-values.yaml --set image.tag=${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA} --set image.pullSecretBase64=$REGISTRY_PULL_SECRET_BASE64
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
environment: