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

Skipped stage marked as succeeded when there's options { timeout }

    Details

    • Similar Issues:

      Description

      Hey,
      I'm using the new Matrix inside a stage of a declarative pipeline.
      As requested, one of the stages inside is skipping 2/5 the axes combinations.
      When I add a section of options to that stage that contains a "timeout" option, one of the two stages that were skipped is marked as "succeeded" with a green "V" on it.

      Look at my hover on that stage, and the results down the page:

       

      This is the code:

      stage('Unit Tests') {
          when {
              beforeAgent true
              anyOf {
                  environment name: 'PLATFORM', value: 'trusty'
                  environment name: 'PLATFORM', value: 'xenial'
                  environment name: 'PLATFORM', value: 'bionic'
              }
          }
          options {
              timeout(time:60, unit: 'MINUTES')
          }
          steps {
              sh "a build step..."
          }
      }
      

       

      To avoid this kind of weird error, I can set the timeout at the step scope, but this is less "declarative" and best practice than what I wanted.

       

      Thanks!

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              zachzoref Zach Zoref
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: