diff --git a/010-when b/010-when new file mode 100644 index 0000000..1c219f6 --- /dev/null +++ b/010-when @@ -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' + } + } + } +} \ No newline at end of file