Skip to content
Snippets Groups Projects
Commit 0132c263 authored by thijsheijden's avatar thijsheijden
Browse files

Added Docker stage

parent f869db2a
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,8 @@ image: node:16-alpine ...@@ -2,6 +2,8 @@ image: node:16-alpine
stages: stages:
- setup - setup
- test - test
- docker
- deploy
install-dependencies: install-dependencies:
stage: setup stage: setup
...@@ -44,3 +46,21 @@ test: ...@@ -44,3 +46,21 @@ test:
extends: .distributed extends: .distributed
script: script:
- yarn nx affected --base=HEAD~1 --target=test --parallel --max-parallel=2 - yarn nx affected --base=HEAD~1 --target=test --parallel --max-parallel=2
build-docker:
image: docker:stable
stage: docker
tags:
- docker
only:
- main
- develop
script:
- docker build --progress plain -f ./apps/frontend/Dockerfile . -t $CI_PROJECT_NAME:latest
after_script:
- docker login datastropheregistry.azurecr.io -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD
- if [[ ! -z $CI_COMMIT_BRANCH+x ]]; then DOCKER_TAG=$CI_COMMIT_BRANCH; else DOCKER_TAG=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME; fi
- docker tag $CI_PROJECT_NAME datastropheregistry.azurecr.io/$CI_PROJECT_NAME:$DOCKER_TAG
- docker push datastropheregistry.azurecr.io/$CI_PROJECT_NAME:$DOCKER_TAG
dependencies:
- build
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment