We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88072d6 commit eb7a19bCopy full SHA for eb7a19b
1 file changed
JENKINS/parameters2
@@ -0,0 +1,18 @@
1
+Here is an example of a stage that will be executed based on the condition that we get from the choice parameter.
2
+
3
+The parameter name is ENVIRONMENT, and we access it in the stage as params.ENVIRONMENT.
4
+So when the choice parameter matches PROD, it will execute the steps mentioned in the stage.
5
6
+stage('Deploy to Production') {
7
+ when {
8
+ expression {
9
+ return params.ENVIRONMENT == 'PROD'
10
+ }
11
12
+ steps {
13
+ sh """
14
+ echo "deploy to production"
15
+ """
16
17
18
0 commit comments