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
- Run stages in parallel
- Run a matrix of combinations
- Use a shared library
- Use Groovy in a declarative pipeline
All parallel stages, post actions and libraries commands · Jenkins cheatsheet