I am using Jenkins declarative pipeline and want to perform some post build actions depending on the build status.
To be more precise, I want these conditions to be true:
beforeAgent true && jobName == 'Cypress Test'
Here's my code:
post {
always {
script {
passwordIDs.each{ pw ->
credentialFetch.deleteTemporaryCredential(env.BUILD, pw, expireTime)
}
}
}
}
Any idea where can I use my conditions? Also, how to use them since Post doesn't support when condition