Update 012-when.groovy

This commit is contained in:
2026-03-04 15:32:34 +00:00
parent 3caa4d7e13
commit a953d446c4

27
012-when.groovy Normal file
View File

@@ -0,0 +1,27 @@
pipeline {
agent any
parameters {
choice(name: 'OS', choices: ['android', 'ios'], description: 'Pick your OS something')
}
environment {
ENV = "$OS"
}
stages {
stage ('Deploy ANDROID') {
when {
environment name: "ENV", value: "android"
}
steps {
echo 'Android execution'
}
}
stage ('Deploy IOS') {
when {
environment name: "ENV", value: "ios"
}
steps {
echo 'ios execution'
}
}
}
}