Commit b80e78d2 authored by Simon Reis's avatar Simon Reis
Browse files

updated .gitlab-ci.yml

parent dc77f9fc
variables: variables:
FF_USE_FASTZIP: "true" # enable fastzip - a faster zip implementation that also supports level configuration. FF_USE_FASTZIP: "true" # enable fastzip - a faster zip implementation that also supports level configuration.
ARTIFACT_COMPRESSION_LEVEL: default ARTIFACT_COMPRESSION_LEVEL: fastest
CACHE_COMPRESSION_LEVEL: default CACHE_COMPRESSION_LEVEL: fastest
TRANSFER_METER_FREQUENCY: 5s # will display transfer progress every 5 seconds for artifacts and remote caches. TRANSFER_METER_FREQUENCY: 5s # will display transfer progress every 5 seconds for artifacts and remote caches.
MAVEN_OPTS: "-Djava.awt.headless=true -Dmaven.repo.local=${CI_PROJECT_DIR}/.m2/repository/" MAVEN_OPTS: "-Djava.awt.headless=true -Dmaven.repo.local=${CI_PROJECT_DIR}/.m2/repository/"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version" MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
SONAR_USER_HOME: ${CI_PROJECT_DIR}/.sonar # Defines the location of the analysis task cache SONAR_USER_HOME: ${CI_PROJECT_DIR}/.sonar # Defines the location of the analysis task cache
...@@ -57,10 +57,12 @@ stages: ...@@ -57,10 +57,12 @@ stages:
tag="$CI_COMMIT_TAG" tag="$CI_COMMIT_TAG"
fi fi
- echo current tag ${tag} - echo current tag ${tag}
# Get (source) branch when tagging
- CI_SOURCE_BRANCH=$(git for-each-ref | grep $CI_COMMIT_SHA | grep origin | sed "s/.*\///" | tr '[:upper:]' '[:lower:]') - CI_SOURCE_BRANCH=$(git for-each-ref | grep $CI_COMMIT_SHA | grep origin | sed "s/.*\///" | tr '[:upper:]' '[:lower:]')
- echo CI_SOURCE_BRANCH $CI_SOURCE_BRANCH - echo CI_SOURCE_BRANCH $CI_SOURCE_BRANCH
- REGISTRY_IMAGE_BASE="$CI_REGISTRY_IMAGE/$CI_SOURCE_BRANCH/$IMG_NAME" - REGISTRY_IMAGE_BASE="$CI_REGISTRY_IMAGE/$CI_SOURCE_BRANCH/$IMG_NAME"
- FINAL_REGISTRY_IMAGE="$CI_REGISTRY_IMAGE/$CI_SOURCE_BRANCH/$IMG_NAME:${tag}" - FINAL_REGISTRY_IMAGE="$CI_REGISTRY_IMAGE/$CI_SOURCE_BRANCH/$IMG_NAME:${tag}"
- echo "CI_SOURCE_BRANCH=$CI_SOURCE_BRANCH" >> dockerimage.env
- echo "FINAL_REGISTRY_IMAGE=$FINAL_REGISTRY_IMAGE" >> dockerimage.env - echo "FINAL_REGISTRY_IMAGE=$FINAL_REGISTRY_IMAGE" >> dockerimage.env
- echo "REGISTRY_IMAGE_BASE=$REGISTRY_IMAGE_BASE" >> dockerimage.env - echo "REGISTRY_IMAGE_BASE=$REGISTRY_IMAGE_BASE" >> dockerimage.env
- echo "IMAGE_TAG=$tag" >> dockerimage.env - echo "IMAGE_TAG=$tag" >> dockerimage.env
...@@ -96,7 +98,7 @@ build-main: ...@@ -96,7 +98,7 @@ build-main:
- changes: - changes:
- gfsBackendService/**/* - gfsBackendService/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend" if: $CI_PROJECT_NAME == "gridfailureinformation.backend"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
test-main: test-main:
...@@ -117,7 +119,7 @@ test-main: ...@@ -117,7 +119,7 @@ test-main:
- changes: - changes:
- gfsBackendService/**/* - gfsBackendService/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend" if: $CI_PROJECT_NAME == "gridfailureinformation.backend"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
sonarqube-main: sonarqube-main:
...@@ -140,7 +142,7 @@ sonarqube-main: ...@@ -140,7 +142,7 @@ sonarqube-main:
- changes: - changes:
- gfsBackendService/**/* - gfsBackendService/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend" if: $CI_PROJECT_NAME == "gridfailureinformation.backend"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
docker-build-flyway: docker-build-flyway:
...@@ -158,7 +160,7 @@ docker-build-flyway: ...@@ -158,7 +160,7 @@ docker-build-flyway:
exists: exists:
- gfsBackendService/Dockerfile_Flyway - gfsBackendService/Dockerfile_Flyway
if: $CI_PROJECT_NAME == "gridfailureinformation.backend" if: $CI_PROJECT_NAME == "gridfailureinformation.backend"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
docker-build-main: docker-build-main:
...@@ -179,7 +181,7 @@ docker-build-main: ...@@ -179,7 +181,7 @@ docker-build-main:
exists: exists:
- gfsBackendService/Dockerfile_GitLab - gfsBackendService/Dockerfile_GitLab
if: $CI_PROJECT_NAME == "gridfailureinformation.backend" if: $CI_PROJECT_NAME == "gridfailureinformation.backend"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend"
######################################################################################################################## ########################################################################################################################
# Address Import # Address Import
...@@ -206,7 +208,7 @@ build-address-import: ...@@ -206,7 +208,7 @@ build-address-import:
- changes: - changes:
- addressImport/**/* - addressImport/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
test-address-import: test-address-import:
...@@ -231,7 +233,7 @@ test-address-import: ...@@ -231,7 +233,7 @@ test-address-import:
- changes: - changes:
- addressImport/**/* - addressImport/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
sonarqube-address-import: sonarqube-address-import:
...@@ -254,7 +256,7 @@ sonarqube-address-import: ...@@ -254,7 +256,7 @@ sonarqube-address-import:
- changes: - changes:
- addressImport/**/* - addressImport/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
docker-build-address-import: docker-build-address-import:
...@@ -263,10 +265,10 @@ docker-build-address-import: ...@@ -263,10 +265,10 @@ docker-build-address-import:
extends: .docker-build-script extends: .docker-build-script
variables: variables:
IMG_NAME: "gfi-address-import" IMG_NAME: "gfi-address-import"
PROJECT_DIR: "addressImport" PROJECT_DIR: "addressImport"
DOCKER_FILE: "Dockerfile_Gitlab" DOCKER_FILE: "Dockerfile_Gitlab"
needs: needs:
- job: build-address-import - job: build-address-import
- job: test-address-import - job: test-address-import
artifacts: false artifacts: false
rules: rules:
...@@ -275,7 +277,7 @@ docker-build-address-import: ...@@ -275,7 +277,7 @@ docker-build-address-import:
exists: exists:
- addressImport/Dockerfile_Gitlab - addressImport/Dockerfile_Gitlab
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport"
######################################################################################################################## ########################################################################################################################
# Mail Export # Mail Export
...@@ -300,7 +302,7 @@ build-mail-export: ...@@ -300,7 +302,7 @@ build-mail-export:
- changes: - changes:
- mailExport/**/* - mailExport/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
test-mail-export: test-mail-export:
...@@ -315,7 +317,7 @@ test-mail-export: ...@@ -315,7 +317,7 @@ test-mail-export:
- cd ./mailExport - cd ./mailExport
- mvn test -Dskip.asciidoc=true - mvn test -Dskip.asciidoc=true
artifacts: artifacts:
paths: paths:
- ./mailExport/target/ - ./mailExport/target/
- ./mailExport/src/ - ./mailExport/src/
reports: reports:
...@@ -325,7 +327,7 @@ test-mail-export: ...@@ -325,7 +327,7 @@ test-mail-export:
- changes: - changes:
- mailExport/**/* - mailExport/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
sonarqube-mail-export: sonarqube-mail-export:
...@@ -348,7 +350,7 @@ sonarqube-mail-export: ...@@ -348,7 +350,7 @@ sonarqube-mail-export:
- changes: - changes:
- mailExport/**/* - mailExport/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
docker-build-mail-export: docker-build-mail-export:
...@@ -357,10 +359,10 @@ docker-build-mail-export: ...@@ -357,10 +359,10 @@ docker-build-mail-export:
extends: .docker-build-script extends: .docker-build-script
variables: variables:
IMG_NAME: "gfi-mail-export" IMG_NAME: "gfi-mail-export"
PROJECT_DIR: "mailExport" PROJECT_DIR: "mailExport"
DOCKER_FILE: "Dockerfile_Gitlab" DOCKER_FILE: "Dockerfile_Gitlab"
needs: needs:
- job: build-mail-export - job: build-mail-export
- job: test-mail-export - job: test-mail-export
artifacts: false artifacts: false
rules: rules:
...@@ -369,7 +371,7 @@ docker-build-mail-export: ...@@ -369,7 +371,7 @@ docker-build-mail-export:
exists: exists:
- mailExport/Dockerfile_Gitlab - mailExport/Dockerfile_Gitlab
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport"
######################################################################################################################## ########################################################################################################################
# SAMO Interface # SAMO Interface
...@@ -394,7 +396,7 @@ build-samo: ...@@ -394,7 +396,7 @@ build-samo:
- changes: - changes:
- SAMO-Interface/**/* - SAMO-Interface/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
test-samo: test-samo:
...@@ -419,7 +421,7 @@ test-samo: ...@@ -419,7 +421,7 @@ test-samo:
- changes: - changes:
- SAMO-Interface/**/* - SAMO-Interface/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
sonarqube-samo: sonarqube-samo:
...@@ -442,7 +444,7 @@ sonarqube-samo: ...@@ -442,7 +444,7 @@ sonarqube-samo:
- changes: - changes:
- SAMO-Interface/**/* - SAMO-Interface/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
docker-build-samo: docker-build-samo:
...@@ -463,7 +465,7 @@ docker-build-samo: ...@@ -463,7 +465,7 @@ docker-build-samo:
exists: exists:
- SAMO-Interface/Dockerfile_GitLab - SAMO-Interface/Dockerfile_GitLab
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.samo"
######################################################################################################################## ########################################################################################################################
...@@ -489,7 +491,7 @@ build-saris: ...@@ -489,7 +491,7 @@ build-saris:
- changes: - changes:
- SARIS-Interface/**/* - SARIS-Interface/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
test-saris: test-saris:
...@@ -514,7 +516,7 @@ test-saris: ...@@ -514,7 +516,7 @@ test-saris:
- changes: - changes:
- SARIS-Interface/**/* - SARIS-Interface/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
sonarqube-saris: sonarqube-saris:
...@@ -537,7 +539,7 @@ sonarqube-saris: ...@@ -537,7 +539,7 @@ sonarqube-saris:
- changes: - changes:
- SARIS-Interface/**/* - SARIS-Interface/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
docker-build-saris: docker-build-saris:
...@@ -558,7 +560,7 @@ docker-build-saris: ...@@ -558,7 +560,7 @@ docker-build-saris:
exists: exists:
- SARIS-Interface/Dockerfile_GitLab - SARIS-Interface/Dockerfile_GitLab
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.saris"
######################################################################################################################## ########################################################################################################################
...@@ -584,7 +586,7 @@ build-stoerungsauskuenfte: ...@@ -584,7 +586,7 @@ build-stoerungsauskuenfte:
- changes: - changes:
- stoerungsauskunftInterface/**/* - stoerungsauskunftInterface/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
test-stoerungsauskuenfte: test-stoerungsauskuenfte:
...@@ -609,7 +611,7 @@ test-stoerungsauskuenfte: ...@@ -609,7 +611,7 @@ test-stoerungsauskuenfte:
- changes: - changes:
- stoerungsauskunftInterface/**/* - stoerungsauskunftInterface/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
sonarqube-stoerungsauskuenfte: sonarqube-stoerungsauskuenfte:
...@@ -633,7 +635,7 @@ sonarqube-stoerungsauskuenfte: ...@@ -633,7 +635,7 @@ sonarqube-stoerungsauskuenfte:
- changes: - changes:
- stoerungsauskunftInterface/**/* - stoerungsauskunftInterface/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
docker-build-stoerungsauskuenfte: docker-build-stoerungsauskuenfte:
...@@ -654,7 +656,7 @@ docker-build-stoerungsauskuenfte: ...@@ -654,7 +656,7 @@ docker-build-stoerungsauskuenfte:
exists: exists:
- stoerungsauskunftInterface/Dockerfile_GitLab - stoerungsauskunftInterface/Dockerfile_GitLab
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft"
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
...@@ -664,6 +666,7 @@ docker-build-stoerungsauskuenfte: ...@@ -664,6 +666,7 @@ docker-build-stoerungsauskuenfte:
image: alpine:3.14.0 image: alpine:3.14.0
cache: {} cache: {}
variables: variables:
ONLY_MASTER: "false"
GIT_STRATEGY: none GIT_STRATEGY: none
DEPLOYMENT_FILE: fileDefaultVarPlaceholder DEPLOYMENT_FILE: fileDefaultVarPlaceholder
YAML_IMAGE_NAME: image YAML_IMAGE_NAME: image
...@@ -676,7 +679,12 @@ docker-build-stoerungsauskuenfte: ...@@ -676,7 +679,12 @@ docker-build-stoerungsauskuenfte:
- git config --global user.email "gitlab@gitlab.com" - git config --global user.email "gitlab@gitlab.com"
- git config --global user.name "GitLab CI/CD" - git config --global user.name "GitLab CI/CD"
script: script:
- echo "CI_SOURCE_BRANCH=$CI_SOURCE_BRANCH"
- ls -l - ls -l
- |
if [[ "$CI_SOURCE_BRANCH" != "master" && "$ONLY_MASTER" == "true" ]]; then
exit 0;
fi
- cat ${DEPLOYMENT_FILE} - cat ${DEPLOYMENT_FILE}
- echo FINAL_REGISTRY_IMAGE ${FINAL_REGISTRY_IMAGE} - echo FINAL_REGISTRY_IMAGE ${FINAL_REGISTRY_IMAGE}
- echo APP_NAME ${APP_NAME} - echo APP_NAME ${APP_NAME}
...@@ -692,7 +700,7 @@ docker-build-stoerungsauskuenfte: ...@@ -692,7 +700,7 @@ docker-build-stoerungsauskuenfte:
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
# Upload Artefakte BE # Upload Artefakte BE
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
upload_artefacts: .upload_artefacts:
stage: Upload stage: Upload
image: alpine:3.14.0 image: alpine:3.14.0
rules: rules:
...@@ -758,22 +766,24 @@ deploy-qa-flyway: ...@@ -758,22 +766,24 @@ deploy-qa-flyway:
stage: Deploy-Flyway stage: Deploy-Flyway
extends: .deploy-script extends: .deploy-script
variables: variables:
ONLY_MASTER: "true"
YAML_APP_NAME: gfi-be YAML_APP_NAME: gfi-be
YAML_IMAGE_NAME: imageDatabase YAML_IMAGE_NAME: imageDatabase
DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml
dependencies: dependencies:
- docker-build-flyway - docker-build-flyway
rules: rules:
- if: $CI_COMMIT_BRANCH == "master" - if: $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAME == "gridfailureinformation.backend"
changes: changes:
- Dockerfile_Flyway - Dockerfile_Flyway
- src/main/resources/db/migration/* - src/main/resources/db/migration/*
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend"
deploy-qa-main: deploy-qa-main:
stage: Deploy-Main stage: Deploy-Main
extends: .deploy-script extends: .deploy-script
variables: variables:
ONLY_MASTER: "true"
YAML_APP_NAME: gfi-be YAML_APP_NAME: gfi-be
DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml
dependencies: dependencies:
...@@ -781,13 +791,14 @@ deploy-qa-main: ...@@ -781,13 +791,14 @@ deploy-qa-main:
rules: rules:
- changes: - changes:
- gfsBackendService/**/* - gfsBackendService/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend" && $CI_COMMIT_BRANCH == "master" if: $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAME == "gridfailureinformation.backend"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend"
deploy-qa-address-import: deploy-qa-address-import:
stage: Deploy-Address-Import stage: Deploy-Address-Import
extends: .deploy-script extends: .deploy-script
variables: variables:
ONLY_MASTER: "true"
YAML_APP_NAME: gfi-address-import YAML_APP_NAME: gfi-address-import
DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml
dependencies: dependencies:
...@@ -796,12 +807,13 @@ deploy-qa-address-import: ...@@ -796,12 +807,13 @@ deploy-qa-address-import:
- changes: - changes:
- addressImport/**/* - addressImport/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport" && $CI_COMMIT_BRANCH == "master" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport" && $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.addressimport"
deploy-qa-mail-export: deploy-qa-mail-export:
stage: Deploy-Mail-Export stage: Deploy-Mail-Export
extends: .deploy-script extends: .deploy-script
variables: variables:
ONLY_MASTER: "true"
YAML_APP_NAME: gfi-mail-export YAML_APP_NAME: gfi-mail-export
DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml
dependencies: dependencies:
...@@ -810,12 +822,13 @@ deploy-qa-mail-export: ...@@ -810,12 +822,13 @@ deploy-qa-mail-export:
- changes: - changes:
- mailExport/**/* - mailExport/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport" && $CI_COMMIT_BRANCH == "master" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport" && $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport"
.deploy-qa-stoerungsauskunft-interface: deploy-qa-stoerungsauskunft-interface:
stage: Deploy-Stoerungsauskuenfte stage: Deploy-Stoerungsauskuenfte
extends: .deploy-script extends: .deploy-script
variables: variables:
ONLY_MASTER: "true"
YAML_APP_NAME: gfi-stoerungsauskunft YAML_APP_NAME: gfi-stoerungsauskunft
DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml DEPLOYMENT_FILE: deployment/applications/values-gfi-qa.yaml
dependencies: dependencies:
...@@ -826,7 +839,7 @@ deploy-qa-mail-export: ...@@ -826,7 +839,7 @@ deploy-qa-mail-export:
exists: exists:
- stoerungsauskunftInterface/Dockerfile_GitLab - stoerungsauskunftInterface/Dockerfile_GitLab
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft" && $CI_COMMIT_BRANCH == "master" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft" && $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG && $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft"
#------------------------------ #------------------------------
# Deploy - DEV-Environment # Deploy - DEV-Environment
...@@ -841,7 +854,7 @@ deploy-dev-flyway: ...@@ -841,7 +854,7 @@ deploy-dev-flyway:
dependencies: dependencies:
- docker-build-flyway - docker-build-flyway
rules: rules:
- if: $CI_COMMIT_BRANCH == "DEVELOP" - if: $CI_PROJECT_NAME == "gridfailureinformation.backend" && $CI_COMMIT_BRANCH == "DEVELOP"
changes: changes:
- Dockerfile_Flyway - Dockerfile_Flyway
- src/main/resources/db/migration/* - src/main/resources/db/migration/*
...@@ -885,7 +898,7 @@ deploy-dev-mail-export: ...@@ -885,7 +898,7 @@ deploy-dev-mail-export:
- mailExport/**/* - mailExport/**/*
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport" && $CI_COMMIT_BRANCH == "DEVELOP" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.mailexport" && $CI_COMMIT_BRANCH == "DEVELOP"
.deploy-dev-stoerungsauskunft-interface: deploy-dev-stoerungsauskunft-interface:
stage: Deploy-Stoerungsauskuenfte stage: Deploy-Stoerungsauskuenfte
extends: .deploy-script extends: .deploy-script
variables: variables:
...@@ -896,15 +909,12 @@ deploy-dev-mail-export: ...@@ -896,15 +909,12 @@ deploy-dev-mail-export:
rules: rules:
- changes: - changes:
- stoerungsauskunftInterface/**/* - stoerungsauskunftInterface/**/*
exists:
- stoerungsauskunftInterface/Dockerfile_GitLab
if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft" && $CI_COMMIT_BRANCH == "DEVELOP" if: $CI_PROJECT_NAME == "gridfailureinformation.backend.interface.stoerungsauskunft" && $CI_COMMIT_BRANCH == "DEVELOP"
#------------------------------ #------------------------------
# Release # Release
#------------------------------ #------------------------------
release_job: .release_job:
stage: Release stage: Release
image: registry.gitlab.com/gitlab-org/release-cli:latest image: registry.gitlab.com/gitlab-org/release-cli:latest
needs: needs:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment