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

Regression: Multiple when conditions no longer work

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      So I borked this - I mistakenly thought we already had logic that prevented you from actually having multiple when conditions, but I was wrong. So now I'm going to reenable it, and it'll work basically like if the multiple when conditions were wrapped in an allOf condition, replicating previous behavior.

        Attachments

          Issue Links

            Activity

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

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhen.java
            pipeline-model-api/src/main/resources/ast-schema.json
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/StageConditionals.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
            pipeline-model-definition/src/test/resources/whenMultiple.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/3bc41e062a1edbf8d2a0323bc05c38d4d96dba67
            Log:
            [FIXED JENKINS-42762] Allow multiple conditions in when directly

            Reverts changes made in JENKINS-41185 fix. Does not affect the core of
            the changes in JENKINS-41185.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhen.java pipeline-model-api/src/main/resources/ast-schema.json pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/StageConditionals.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java pipeline-model-definition/src/test/resources/whenMultiple.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/3bc41e062a1edbf8d2a0323bc05c38d4d96dba67 Log: [FIXED JENKINS-42762] Allow multiple conditions in when directly Reverts changes made in JENKINS-41185 fix. Does not affect the core of the changes in JENKINS-41185 .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhen.java
            pipeline-model-api/src/main/resources/ast-schema.json
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/StageConditionals.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
            pipeline-model-definition/src/test/resources/json/basicWhen.json
            pipeline-model-definition/src/test/resources/json/errors/emptyWhen.json
            pipeline-model-definition/src/test/resources/json/errors/unknownWhenConditional.json
            pipeline-model-definition/src/test/resources/json/errors/whenInvalidParameterType.json
            pipeline-model-definition/src/test/resources/json/errors/whenMissingRequiredParameter.json
            pipeline-model-definition/src/test/resources/json/errors/whenUnknownParameter.json
            pipeline-model-definition/src/test/resources/json/skippedWhen.json
            pipeline-model-definition/src/test/resources/json/whenAnd.json
            pipeline-model-definition/src/test/resources/json/whenBranchFalse.json
            pipeline-model-definition/src/test/resources/json/whenEnvFalse.json
            pipeline-model-definition/src/test/resources/json/whenNot.json
            pipeline-model-definition/src/test/resources/json/whenOr.json
            pipeline-model-definition/src/test/resources/whenMultiple.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/2b88323cb2f73c194aba5abd0a99d6136c7f7f49
            Log:
            Merge pull request #138 from abayer/jenkins-42762

            [FIXED JENKINS-42762] Allow multiple conditions in when directly

            Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/6ead78cbcdca...2b88323cb2f7

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhen.java pipeline-model-api/src/main/resources/ast-schema.json pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/StageConditionals.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java pipeline-model-definition/src/test/resources/json/basicWhen.json pipeline-model-definition/src/test/resources/json/errors/emptyWhen.json pipeline-model-definition/src/test/resources/json/errors/unknownWhenConditional.json pipeline-model-definition/src/test/resources/json/errors/whenInvalidParameterType.json pipeline-model-definition/src/test/resources/json/errors/whenMissingRequiredParameter.json pipeline-model-definition/src/test/resources/json/errors/whenUnknownParameter.json pipeline-model-definition/src/test/resources/json/skippedWhen.json pipeline-model-definition/src/test/resources/json/whenAnd.json pipeline-model-definition/src/test/resources/json/whenBranchFalse.json pipeline-model-definition/src/test/resources/json/whenEnvFalse.json pipeline-model-definition/src/test/resources/json/whenNot.json pipeline-model-definition/src/test/resources/json/whenOr.json pipeline-model-definition/src/test/resources/whenMultiple.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/2b88323cb2f73c194aba5abd0a99d6136c7f7f49 Log: Merge pull request #138 from abayer/jenkins-42762 [FIXED JENKINS-42762] Allow multiple conditions in when directly Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/6ead78cbcdca...2b88323cb2f7

              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: