Stage input runs before when conditional

This issue is archived. You can view it, but you can't modify it. Learn more

      The input step in below example will run even if the pipeline isn't building a matching tag

      But the steps won't execute, so the input is kinda void anyway.

      pipeline {
          agent any
          stages {
              stage ("First") {
                  steps {
                      echo "Hello"
                  }
              }
              stage ("Second") {
                  options {
                      timeout 15
                  }
                  when {
                      tag "release-*"
                  }
                  input {
                      message 'Deploy to production?'
                      ok 'Fire zee missiles!'
                  }
                  steps {
                      echo "World"
                  }
              }
          }
      }
      

            Assignee:
            Andrew Bayer
            Reporter:
            rsandell
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: