post statement only if changes
This commit is contained in:
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@@ -63,6 +63,8 @@ pipeline {
|
||||
// }
|
||||
|
||||
post {
|
||||
def hasChanges = currentBuild?.rawBuild?.changeSets?.any { it.items && it.items.length > 0 }
|
||||
if (hasChanges) {
|
||||
success {
|
||||
echo 'Pipeline erfolgreich!'
|
||||
discordSend description: "Running ${env.BUILD_ID} on ${env.JENKINS_URL}, ${params.GIT_REF}", footer: 'Pipeline succeeded', link: env.BUILD_URL, result: currentBuild.currentResult, title: env.JOB_NAME, webhookURL: 'https://discordapp.com/api/webhooks/1389470542691831819/NdMO17sLBG2dplp_-oh6Ff0cbPOoADl0QwXKM9UzduxU44av_ZQkQjKTmpdK7YuwcZDc'
|
||||
@@ -73,4 +75,5 @@ pipeline {
|
||||
discordSend description: "Running ${env.BUILD_ID} on ${env.JENKINS_URL}, ${params.GIT_REF}", footer: 'Pipeline failed', link: env.BUILD_URL, result: currentBuild.currentResult, title: env.JOB_NAME, webhookURL: 'https://discordapp.com/api/webhooks/1389470542691831819/NdMO17sLBG2dplp_-oh6Ff0cbPOoADl0QwXKM9UzduxU44av_ZQkQjKTmpdK7YuwcZDc'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user