Added all commands
This commit is contained in:
23
06-basicWhen.groovy
Normal file
23
06-basicWhen.groovy
Normal file
@@ -0,0 +1,23 @@
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage("One") {
|
||||
steps {
|
||||
echo "Hello"
|
||||
}
|
||||
}
|
||||
stage("Two") {
|
||||
when {
|
||||
echo "Should I run?"
|
||||
return true
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
echo "World"
|
||||
echo "Heal it"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user