Skip to content
Snippets Groups Projects
Commit 5e788a75 authored by Kai Kruschel's avatar Kai Kruschel
Browse files

added individual dockerfiles to ci yml

parent 75551303
No related branches found
No related tags found
No related merge requests found
Pipeline #42378 failed
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
# This template uses one generic job with conditional builds # This template uses one generic job with conditional builds
# for the default branch and all other (MR) branches. # for the default branch and all other (MR) branches.
variables:
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
stages: stages:
- build - build
- test - test
...@@ -34,13 +38,19 @@ docker-build: ...@@ -34,13 +38,19 @@ docker-build:
tag=":$CI_COMMIT_REF_SLUG" tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi fi
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" . - |
- docker push "$CI_REGISTRY_IMAGE${tag}" cd $CI_PROJECT_DIR/backend/
docker build -t "$CI_REGISTRY_IMAGE/backend_test:${tag}" .
docker push "$CI_REGISTRY_IMAGE/backend_test:${tag}"
- |
cd $CI_PROJECT_DIR/frontend
docker build -t "$CI_REGISTRY_IMAGE/frontend_test:${tag}" .
docker push "$CI_REGISTRY_IMAGE/frontend_test${tag}"
- |
cd $CI_PROJECT_DIR/proxy
docker build -t "$CI_REGISTRY_IMAGE/proxy_test:${tag}" .
docker push "$CI_REGISTRY_IMAGE/proxy_test${tag}"
# Run this job in a branch where a Dockerfile exists # Run this job in a branch where a Dockerfile exists
rules:
- if: $CI_COMMIT_BRANCH
exists:
- Dockerfile
testing: testing:
stage: test stage: test
...@@ -51,3 +61,4 @@ deployment: ...@@ -51,3 +61,4 @@ deployment:
stage: deploy stage: deploy
script: script:
- echo "Deploying" - echo "Deploying"
when: manual
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