Can a Jenkins pipeline have an optional input step?
问题 Is it possible to create a Jenkins pipeline with an optional input stage? The below snippet doesn't achieve this goal. Expected behaviour The stage (and therefore the input prompt) should only run for specific branches. Actual behaviour This stage runs for all branches. The when filter is ignored when an input step is used. stage('Approve') { when { expression { BRANCH_NAME ==~ /^qa[\w-_]*$/ } } input { message "Approve release?" ok "y" submitter "admin" parameters { string(name: 'IS_APPROVED