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

10
Jenkinsfile vendored
View File

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