Commit 484e0d4c authored by Thomas Beermann's avatar Thomas Beermann
Browse files

adapt build variables

parent 10a8f70c
Pipeline #84937 failed with stages
in 47 seconds
......@@ -9,7 +9,6 @@ variables:
MAVEN_CLI_OPTS: "-s .m2/ci_settings.xml --batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
WEBAPP_PROJECT_VERSION: "0.0.2-SNAPSHOT"
WEBAPP_BRANCH: $CI_COMMIT_REF_NAME
cache:
key: "$CI_COMMIT_REF_NAME"
......
......@@ -4,6 +4,8 @@ build:
only:
- master
- merge_requests
- branches
- tags
stage: build
script: mvn compile
......@@ -11,6 +13,8 @@ test:
only:
- master
- merge_requests
- branches
- tags
stage: test
script: mvn test
......@@ -18,6 +22,8 @@ code_anaylsis:
only:
- master
- merge_requests
- branches
- tags
stage: code_quality_analysis
script: "mvn -P sonar clean verify sonar:sonar"
allow_failure: true
......@@ -26,15 +32,23 @@ deploy:
only:
- master
- merge_requests
- tags
stage: deploy
script:
- export WEBAPP_BRANCH=$CI_COMMIT_REF_NAME
- >
if [[ -z $CI_COMMIT_TAG && $CI_COMMIT_REF_NAME != "master" ]]; then
export WEBAPP_BRANCH=.$CI_COMMIT_REF_NAME
fi
if [[ -n $CI_COMMIT_TAG ]]; then
export WEBAPP_PROJECT_VERSION=$CI_COMMIT_TAG
fi
- mvn $MAVEN_CLI_OPTS deploy
trigger:
only:
- master
- merge_requests
- tags
variables:
WEBAPP_VERSION: $WEBAPP_PROJECT_VERSION
WEBAPP_BRANCH: $WEBAPP_BRANCH
......
Supports Markdown
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