Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions declarative-examples/simple-examples/parameters-using-steps.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pipeline {
agent any

parameters {
text defaultValue: 'anonymous', description: 'my name', name: 'name'
booleanParam defaultValue: true, description: 'whether skip this', name: 'skip'
}

stages{
stage("one"){
steps{
echo params.name
}
}

stage("two"){
when{
anyOf{
expression{
return params.skip
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyOf can be removed in this case

}
}
steps{
echo "stage two"
}
}
}
}