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

Allow multiple positional (i.e., unnamed) parameters in Pipeline Model Definition steps etc

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The declarative subset rule says that if you have multiple parameters to a step/function/whatever in the model, they have to be named parameters. That's causing problems - any pre-existing global library method with multiple parameters (and a closure body - not 100% sure this bombs out when you don't have a closure body, but this is bad enough as is!) will not work outside of a script block. That'd be bad enough on its own, but wait, it gets worse! The sandbox is somehow swallowing the MissingMethodException that's getting thrown when Groovy is looking for someMethod(Map, CpsClosure), resulting in the method never being executed without any error or explanation. That, my friends, is Bad.

      So...since I can't figure out how to deal with that swallowed exception for the life of me, I'm intending to remove the named parameters requirement. Yay.

        Attachments

          Issue Links

            Activity

            Show
            abayer Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/9 ...
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            SYNTAX.md
            src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPositionalArgumentList.groovy
            src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTValue.groovy
            src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy
            src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
            src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.groovy
            src/main/resources/ast-schema.json
            src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
            src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
            src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
            src/test/resources/errors/globalLibraryUnnamedParameters.groovy
            src/test/resources/globalLibrarySuccess.groovy
            src/test/resources/json/globalLibrarySuccess.json
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/080ae00ba0c5c0b301a98019b1c69bb604a2c83a
            Log:
            [FIXED JENKINS-38047] Allow multiple positional parameters.

            Phew. That was kind of nutty.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: SYNTAX.md src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPositionalArgumentList.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTValue.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.groovy src/main/resources/ast-schema.json src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java src/test/resources/errors/globalLibraryUnnamedParameters.groovy src/test/resources/globalLibrarySuccess.groovy src/test/resources/json/globalLibrarySuccess.json http://jenkins-ci.org/commit/pipeline-model-definition-plugin/080ae00ba0c5c0b301a98019b1c69bb604a2c83a Log: [FIXED JENKINS-38047] Allow multiple positional parameters. Phew. That was kind of nutty.

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                abayer Andrew Bayer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: