Skip to content
Snippets Groups Projects
Commit 391b97ca authored by Lars Bilke's avatar Lars Bilke Committed by GitHub
Browse files

Merge pull request #1805 from bilke/notifications

[Jenkins] Added build failure notifications for ufz/master.
parents 19095d89 888a2a50
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env groovy #!/usr/bin/env groovy
@Library('jenkins-pipeline@1.0.6') _ @Library('jenkins-pipeline@1.0.7') _
def builders = [:] def builders = [:]
def helper = new ogs.helper() def helper = new ogs.helper()
...@@ -78,6 +78,7 @@ if (currentBuild.result == "SUCCESS" || currentBuild.result == "UNSTABLE") { ...@@ -78,6 +78,7 @@ if (currentBuild.result == "SUCCESS" || currentBuild.result == "UNSTABLE") {
if (tag != "") { if (tag != "") {
keepBuild() keepBuild()
currentBuild.displayName = tag currentBuild.displayName = tag
helper.notification(msg: "Marked build for ${tag}.", script: this)
node('mac') { node('mac') {
dir('ogs') { checkoutWithTags() } dir('ogs') { checkoutWithTags() }
...@@ -85,6 +86,12 @@ if (currentBuild.result == "SUCCESS" || currentBuild.result == "UNSTABLE") { ...@@ -85,6 +86,12 @@ if (currentBuild.result == "SUCCESS" || currentBuild.result == "UNSTABLE") {
} }
} }
} }
} else {
if (helper.isOriginMaster(this)) {
helper.notification(title: "${env.JOB_NAME} failed!", script: this,
msg: "Build failed", url: "${env.BUILD_URL}/flowGraphTable/")
}
} }
} // end timestamps } // end timestamps
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