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

Stages within stage thoriwng error

    Details

    • Similar Issues:

      Description

      I'm trying to build pipeline using declarative pipeline by referring pipeline syntax .

      From this, I'm getting the following -

      WorkflowScript: 31: Unknown stage section "stages". Starting with version 0.5, steps in a stage must be in a steps block. @ line 31, column 17.
                         stage('Branch C') {
                         ^
      
      WorkflowScript: 31: No "steps" or "parallel" to execute within stage "Branch C" @ line 31, column 17.
                         stage('Branch C') {
                         ^
      
      2 errors
      
      	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
      

      also from this -

      Running in Durability level: MAX_SURVIVABILITY
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: 14: Unknown stage section "stages". Starting with version 0.5, steps in a stage must be in a steps block. @ line 14, column 9.
                 stage('Sequential') {
                 ^
      
      WorkflowScript: 14: No "steps" or "parallel" to execute within stage "Sequential" @ line 14, column 9.
                 stage('Sequential') {
                 ^
      
      2 errors
      
      	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)

        Attachments

          Activity

          Hide
          vivek Vivek Pandey added a comment -

          Shivu R H Please attach pipeline code thats causing this error.

          Show
          vivek Vivek Pandey added a comment - Shivu R H Please attach pipeline code thats causing this error.
          Hide
          abayer Andrew Bayer added a comment -

          What version of "Pipeline: Declarative" do you have installed? You need 1.3 or later for sequential stages, and it looks like you have 1.2.9 or earlier, based on the error messages.

          Show
          abayer Andrew Bayer added a comment - What version of "Pipeline: Declarative" do you have installed? You need 1.3 or later for sequential stages, and it looks like you have 1.2.9 or earlier, based on the error messages.
          Hide
          shivurh Shivu R H added a comment - - edited

          Thank you Vivek Pandey and Andrew Bayer for your paying attention.

          Vivek Pandey I tried this snippet.

          Andrew Bayer I'm having older versions -

          • Jenkins (2.107.1)
          • Pipeline: Declarative(1.2.7)

          Seems to be I need to upgrade to avail the nesting at sub stages.

           

           

           

          Show
          shivurh Shivu R H added a comment - - edited Thank you Vivek Pandey and Andrew Bayer for your paying attention. Vivek Pandey I tried this snippet. Andrew Bayer I'm having older versions - Jenkins (2.107.1) Pipeline: Declarative(1.2.7) Seems to be I need to upgrade to avail the nesting at sub stages.      
          Hide
          shivurh Shivu R H added a comment -

          Thanks Andrew Bayer, I've upgraded to jenkins to 2.150.2 and Pipeline: Declarative to - 1.3.4.1. Will update once my nesting of jobs works fine.

          Show
          shivurh Shivu R H added a comment - Thanks Andrew Bayer , I've upgraded to jenkins to 2.150.2 and Pipeline: Declarative to - 1.3.4.1. Will update once my nesting of jobs works fine.

            People

            • Assignee:
              Unassigned
              Reporter:
              shivurh Shivu R H
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: