Skip to content
Snippets Groups Projects
Commit 3c37d2ce authored by Bastian's avatar Bastian
Browse files

ozg-7324 adjust jenkinsfile

parent 8e640587
Branches
Tags
No related merge requests found
...@@ -44,7 +44,7 @@ pipeline { ...@@ -44,7 +44,7 @@ pipeline {
when { when {
not { not {
anyOf { anyOf {
branch 'master' branch 'main'
branch 'release' branch 'release'
} }
} }
...@@ -70,7 +70,7 @@ pipeline { ...@@ -70,7 +70,7 @@ pipeline {
script { script {
try { try {
if (env.BRANCH_NAME == 'master') { if (env.BRANCH_NAME == 'main') {
withSonarQubeEnv('sonarqube-ozg-sh'){ withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar' sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
} }
...@@ -147,7 +147,7 @@ pipeline { ...@@ -147,7 +147,7 @@ pipeline {
stage('Trigger Dev rollout') { stage('Trigger Dev rollout') {
when { when {
branch 'master' branch 'main'
} }
steps { steps {
script { script {
...@@ -193,7 +193,7 @@ pipeline { ...@@ -193,7 +193,7 @@ pipeline {
} }
failure { failure {
script { script {
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'release') { if (env.BRANCH_NAME == 'main' || env.BRANCH_NAME == 'release') {
sendFailureMessage() sendFailureMessage()
} }
} }
...@@ -237,8 +237,8 @@ String buildVersionName() { ...@@ -237,8 +237,8 @@ String buildVersionName() {
return "${getPomVersion('pom.xml')}-${validateBranchName(env.BRANCH_NAME)}-${env.GIT_COMMIT.take(7)}".replaceAll("_", "-") return "${getPomVersion('pom.xml')}-${validateBranchName(env.BRANCH_NAME)}-${env.GIT_COMMIT.take(7)}".replaceAll("_", "-")
} }
Boolean isMasterBranch() { Boolean isMainBranch() {
return env.BRANCH_NAME == 'master' return env.BRANCH_NAME == 'main'
} }
Boolean isReleaseBranch() { Boolean isReleaseBranch() {
...@@ -357,11 +357,11 @@ Boolean matchRegexVersion(List versions, String regex) { ...@@ -357,11 +357,11 @@ Boolean matchRegexVersion(List versions, String regex) {
Void sendFailureMessage() { Void sendFailureMessage() {
def room = '' def room = ''
def data = """{"msgtype":"m.text", \ def data = """{"msgtype":"m.text", \
"body":"FachstelleServer: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${BLUE_OCEAN_URL}", \ "body":"ozgcloud-elster-transfer-operator: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${BLUE_OCEAN_URL}", \
"format": "org.matrix.custom.html", \ "format": "org.matrix.custom.html", \
"formatted_body":"FachstelleServer: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${BLUE_OCEAN_URL}'>${env.BUILD_NUMBER}</a>"}""" "formatted_body":"ozgcloud-elster-transfer-operator: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${BLUE_OCEAN_URL}'>${env.BUILD_NUMBER}</a>"}"""
if (env.BRANCH_NAME == 'master') { if (env.BRANCH_NAME == 'main') {
room = "!iQPAvQIiRwRpNOszjw:matrix.ozg-sh.de" room = "!iQPAvQIiRwRpNOszjw:matrix.ozg-sh.de"
} }
else if (env.BRANCH_NAME == 'release') { else if (env.BRANCH_NAME == 'release') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment