Kopie van https://gitlab.com/studieverenigingvia/ict/centurion met een paar aanpassingen
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
645 B
26 lines
645 B
image: docker:latest
|
|
services:
|
|
- docker:dind
|
|
|
|
stages:
|
|
- build
|
|
|
|
variables:
|
|
IMAGE_FRONTEND: "registry.gitlab.com/$CI_PROJECT_PATH/frontend:$CI_COMMIT_REF_SLUG"
|
|
IMAGE_BACKEND: "registry.gitlab.com/$CI_PROJECT_PATH/backend:$CI_COMMIT_REF_SLUG"
|
|
|
|
|
|
before_script:
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
|
|
|
|
build-frontend:
|
|
stage: build
|
|
script:
|
|
- docker build --pull -t "$IMAGE_FRONTEND" -f frontend/Dockerfile frontend/
|
|
- docker push "$IMAGE_FRONTEND"
|
|
|
|
build-backend:
|
|
stage: build
|
|
script:
|
|
- docker build --pull -t "$IMAGE_BACKEND" -f backend/Dockerfile backend/
|
|
- docker push "$IMAGE_BACKEND"
|
|
|