Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52745

Stage input runs before when conditional

    XMLWordPrintable

Details

    Description

      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"
                  }
              }
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              abayer Andrew Bayer
              rsandell rsandell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: