[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title Liam Newman closed an issue as Fixed Bulk closing resolved issues. Jenkins / JENKINS-41185 [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any) Change By: Liam Newman Status: Resolved Closed Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.177946.1484779194000.16921.1571801058763%40Atlassian.JIRA.
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title SCM/JIRA link daemon commented on JENKINS-41185 Re: [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any) 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. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title Andrew Bayer updated JENKINS-41185 Jenkins / JENKINS-41185 [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any) Change By: Andrew Bayer Status: In Review Resolved Resolution: Fixed Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title SCM/JIRA link daemon commented on JENKINS-41185 Re: [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any) 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/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhenCondition.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhenContent.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhenExpression.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.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/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AndConditional.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/NotConditional.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/OrConditional.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/StageConditionalTranslator.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AndConditionalScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/NotConditionalScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/OrConditionalScript.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/whenAnd.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/whenAnd.groovy pipeline-model-definition/src/test/resources/whenNot.groovy pipeline-model-definition/src/test/resources/whenOr.groovy pipeline-model-extensions/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/DeclarativeStageConditionalDescriptor.java http://jenkins-ci.org/commit/pipeline-model-definition-plugin/da36bda7711bc66d056064ee8fbcde26d5cd561c Log: [FIXED JENKINS-41185] Add support for and/not/or of when conditions
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title Andrew Bayer commented on JENKINS-41185 Re: [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any) Real PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/125 Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title Andrew Bayer updated JENKINS-41185 Jenkins / JENKINS-41185 [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any) Change By: Andrew Bayer Status: In Progress Review Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title Andrew Bayer commented on JENKINS-41185 Re: [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any) Work-in-progress for post-1.0 PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/99 Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title Andrew Bayer commented on JENKINS-41185 Re: [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any) Starting preliminary work on this, but it won't land 'til post-1.0. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title Andrew Bayer started work on JENKINS-41185 Change By: Andrew Bayer Status: Open In Progress Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any)
Title: Message Title Liam Newman updated an issue Jenkins / JENKINS-41185 [Declarative Pipeline] Stage "when" should have logical operator steps (and, or, not, all, any) Change By: Liam Newman Summary: [Declarative Pipeline] Stage " when " should have logical operator steps (and, or, not, all, any) Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41185) [Declarative Pipeline] Stage when should have logical operator steps (and, or, not, all, any)
Title: Message Title Liam Newman created an issue Jenkins / JENKINS-41185 [Declarative Pipeline] Stage when should have logical operator steps (and, or, not, all, any) Issue Type: Improvement Assignee: Andrew Bayer Components: pipeline-model-definition-plugin Created: 2017/Jan/18 10:39 PM Priority: Major Reporter: Liam Newman The last change to the stage `when {}` block changed to using items like `branch` and `_expression_`. Multiple items cannot be used in the same when block. This makes sense because it would unclear whether those items should be "A or B", or if they should be "A and B". The `when` block should support logical blocks such as `and {}`, `or {}`, `not {}` to allow combining other conditions in a clear fashion. For example, when branch is master or parameter "FORCE_FULL_BUILD" is true: stage ('Build') { when { or { branch 'master' _expression_ { return params.FORCE_FULL_BUILD } } } } Alternative: use `all {}` instead of `and`, and use `any {}` instead of `or {}`: stage ('Build') { when { any { branch 'master' _expression_ { return params.FORCE_FULL_BUILD } } } }