fixed jenkinsfile syntax w/ burnettk

This commit is contained in:
jasquat 2024-04-02 13:43:34 -04:00
parent 64b72f439b
commit 0c945c7eea
No known key found for this signature in database
1 changed files with 12 additions and 10 deletions

22
Jenkinsfile vendored
View File

@ -85,16 +85,18 @@ pipeline {
} }
} // stages } // stages
post { post {
always { script { always {
sh 'docker image prune -f' } script {
if (params.DISCORD_WEBHOOK_CRED) { sh 'docker image prune -f'
def result = currentBuild.result.toLowerCase() ?: 'unknown' if (params.DISCORD_WEBHOOK_CRED) {
discordNotify( def result = currentBuild.result.toLowerCase() ?: 'unknown'
header: "SpiffWorkflow Docker image build ${result}!", discordNotify(
cred: params.DISCORD_WEBHOOK_CRED, header: "SpiffWorkflow Docker image build ${result}!",
) cred: params.DISCORD_WEBHOOK_CRED,
} )
} } } // if
} // script
} // always
cleanup { cleanWs() } cleanup { cleanWs() }
} // post } // post
} // pipeline } // pipeline