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

ozg-7324 adjust jenkinsfile

parent 8e640587
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ pipeline {
when {
not {
anyOf {
branch 'master'
branch 'main'
branch 'release'
}
}
......@@ -70,7 +70,7 @@ pipeline {
script {
try {
if (env.BRANCH_NAME == 'master') {
if (env.BRANCH_NAME == 'main') {
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
}
......@@ -147,7 +147,7 @@ pipeline {
stage('Trigger Dev rollout') {
when {
branch 'master'
branch 'main'
}
steps {
script {
......@@ -193,7 +193,7 @@ pipeline {
}
failure {
script {
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'release') {
if (env.BRANCH_NAME == 'main' || env.BRANCH_NAME == 'release') {
sendFailureMessage()
}
}
......@@ -237,8 +237,8 @@ String buildVersionName() {
return "${getPomVersion('pom.xml')}-${validateBranchName(env.BRANCH_NAME)}-${env.GIT_COMMIT.take(7)}".replaceAll("_", "-")
}
Boolean isMasterBranch() {
return env.BRANCH_NAME == 'master'
Boolean isMainBranch() {
return env.BRANCH_NAME == 'main'
}
Boolean isReleaseBranch() {
......@@ -357,11 +357,11 @@ Boolean matchRegexVersion(List versions, String regex) {
Void sendFailureMessage() {
def room = ''
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", \
"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"
}
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