Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Started by user xxxxx
- [Pipeline] stage (Test)
- Entering stage Test
- Proceeding
- [Pipeline] node
- Running on master in /var/lib/jenkins/jobs/rpk-test/workspace
- [Pipeline] {
- [Pipeline] sh
- [workspace] Running shell script
- + exit 1
- [Pipeline] step
- [Pipeline] }
- [Pipeline] // node
- [Pipeline] End of Pipeline
- ERROR: script returned exit code 1
- Finished: FAILURE
- stage 'Test'
- node {
- try {
- sh 'exit 1'
- } finally {
- println currentBuild.result // this prints null
- step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'me@me.com', sendToIndividuals: true])
- }
- }
- stage 'Test'
- node {
- try {
- sh 'exit 1'
- currentBuild.result = 'SUCCESS'
- } catch (any) {
- currentBuild.result = 'FAILURE'
- throw any //rethrow exception to prevent the build from proceeding
- } finally {
- step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'me@me.com', sendToIndividuals: true])
- }
- }
- stage 'Test'
- node {
- catchError {
- sh 'exit 1'
- }
- step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'me@me.com', sendToIndividuals: true])
- }
- pipeline {
- agent any
- stages {
- stage('whatever') {
- steps {
- ...
- }
- }
- }
- post {
- always {
- step([$class: 'Mailer',
- notifyEveryUnstableBuild: true,
- recipients: "example@example.com",
- sendToIndividuals: true])
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement