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

ordinal not optional

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The documentation clearly says the 'ordinal' is optional, but executing this pipeline:

      pipeline {
        agent any
        stages {
          stage ('step 1') {
            steps {
              milestone()
              echo "hello 2"
            }
          }
          stage ('step 2') {
            steps {
              milestone()
              echo "hello 2"
            }
          }
        }
      }
      

       

      I get the following exception

       

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: 8: Missing required parameter: "ordinal" @ line 8, column 9.
      milestone()
      ^
      WorkflowScript: 14: Missing required parameter: "ordinal" @ line 14, column 9.
      milestone()

        Attachments

          Issue Links

            Activity

            Hide
            silbernm Matthias Silbernagl added a comment -

            Passing "null" for the parameter "ordinal" works as expected:

            milestone null

             

            If I understand https://github.com/jenkinsci/workflow-step-api-plugin#creating-a-basic-synchronous-step correctly, this issue can only be solved by making the parameter "ordinal" optional. This would however mean that we would always need to pass it by name, e.g. we would break the following code:

            milestone 1
            
            Show
            silbernm Matthias Silbernagl added a comment - Passing "null" for the parameter "ordinal" works as expected: milestone null   If I understand https://github.com/jenkinsci/workflow-step-api-plugin#creating-a-basic-synchronous-step correctly, this issue can only be solved by making the parameter "ordinal" optional. This would however mean that we would always need to pass it by name, e.g. we would break the following code: milestone 1

              People

              • Assignee:
                amuniz Antonio Muñiz
                Reporter:
                imod Dominik Bartholdi
              • Votes:
                6 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: