|
|
@ -6,14 +6,21 @@ stages: |
|
|
|
- build |
|
|
|
- build |
|
|
|
|
|
|
|
|
|
|
|
variables: |
|
|
|
variables: |
|
|
|
IMAGE: registry.gitlab.com/$CI_PROJECT_PATH |
|
|
|
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: |
|
|
|
before_script: |
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com |
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com |
|
|
|
|
|
|
|
|
|
|
|
build: |
|
|
|
build-frontend: |
|
|
|
stage: build |
|
|
|
stage: build |
|
|
|
script: |
|
|
|
script: |
|
|
|
- docker build --pull -t $IMAGE:master . |
|
|
|
- docker build --pull -t "$IMAGE_FRONTEND":master -f frontend/Dockerfile frontend/ |
|
|
|
- docker push $IMAGE:master |
|
|
|
- docker push "$IMAGE_FRONTEND" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build-backend: |
|
|
|
|
|
|
|
stage: build |
|
|
|
|
|
|
|
script: |
|
|
|
|
|
|
|
- docker build --pull -t "$IMAGE_BACKEND" -f backend/Dockerfile backend/ |
|
|
|
|
|
|
|
- docker push "$IMAGE_BACKEND" |
|
|
|