Jenkins · Parallel stages, post actions and libraries

React to the result

Run steps after the pipeline depending on the outcome.

post {
  success { echo 'Build passed' }
  failure { mail to: '[email protected]', subject: "Failed: ${env.JOB_NAME}", body: "See ${env.BUILD_URL}" }
  cleanup { cleanWs() }
}

Official Jenkins documentation

More parallel stages, post actions and libraries commands

All parallel stages, post actions and libraries commands · Jenkins cheatsheet

Was this page helpful?