Created
November 10, 2016 00:46
-
-
Save abayer/02d13d1cf9546fc4b96179384a5f2a34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!groovy | |
pipeline { | |
agent none | |
stages { | |
stage("First") { | |
steps { | |
echo "First stage runs" | |
} | |
} | |
stage("Second") { | |
when { | |
0 == 1 | |
} | |
steps { | |
echo "Second stage skipped due to condition" | |
} | |
} | |
stage("Third") { | |
steps { | |
error "Third stage fails" | |
} | |
} | |
stage("Fourth") { | |
steps { | |
echo "Fourth stage skipped due to failure" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment