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

retry at stage level in declarative pipeline fails

    Details

    • Similar Issues:

      Description

      Docs https://jenkins.io/doc/book/pipeline/syntax/ declare retry is allowed at stage level, but I get:

      WorkflowScript: 52: Unknown stage section "options". Starting with version 0.5, steps in a stage must be in a steps block. @ line 52, column 5.
             stage('test') {
             ^
      

      when doing:

       stage('test') {
            options {
              // TODO: Fix - some tests are flaky - sometimes pass, sometimes not
              retry(3)
            }
            steps {
              runCompose( 'test' )
            }
          }
      

        Attachments

          Activity

          Hide
          abayer Andrew Bayer added a comment -

          That was added in Declarative 1.2.6

          Show
          abayer Andrew Bayer added a comment - That was added in Declarative 1.2.6

            People

            • Assignee:
              Unassigned
              Reporter:
              davidkarlsen davidkarlsen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: