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

Pipeline Config: ability to skip whole pipeline or stages based on boolean condition

    Details

    • Similar Issues:

      Description

      A common enough pattern is to skip either a whole pipeline or a stage based on the branch of execution. This is pretty common in deployment focused pipelines, and would be a strong reason to break out of config and that would be a shame.

      It would be nice if this was somewhat first class in pipeline config. Some may be able to be done with a block scoped step... but not clear if all can be.

      A general way of saying "if this boolean condition is false, skip this stage" would be the way to go - a branch matching would be one particular use of this, but the right thing to do is go generic.

        Attachments

          Issue Links

            Activity

            abayer Andrew Bayer created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Summary Pipeline Config: ability to skip whole pipeline or stages based on branch Pipeline Config: ability to skip whole pipeline or stages based on boolean condition
            Description A common enough pattern is to skip either a whole pipeline or a stage based on the branch of execution. This is pretty common in deployment focussed pipelines, and would be a strong reason to break out of config and that would be a shame.

            It would be nice if this was somewhat first class in pipeline config. Some may be able to be done with a block scoped step... but not clear if all can be.

            In scope:

            * on-branch declaration as a peer with postBuild or stages
            * same on-branch pattern per stage
            A common enough pattern is to skip either a whole pipeline or a stage based on the branch of execution. This is pretty common in deployment focused pipelines, and would be a strong reason to break out of config and that would be a shame.

            It would be nice if this was somewhat first class in pipeline config. Some may be able to be done with a block scoped step... but not clear if all can be.

            A general way of saying "if this boolean condition is false, skip this stage" would be the way to go - a branch matching would be one particular use of this, but the right thing to do is go generic.

            Hide
            antonpiatek Anton Piatek added a comment -

            It is easy enough to skip a stage with an if block, but then the view of that pipeline gets cleared every time the number of stages changes. It would be nice to report a stage as N/A or skipped, and perhaps have it coloured white to show clearly that it wasn't actually run during this particular build.

            Show
            antonpiatek Anton Piatek added a comment - It is easy enough to skip a stage with an if block, but then the view of that pipeline gets cleared every time the number of stages changes. It would be nice to report a stage as N/A or skipped, and perhaps have it coloured white to show clearly that it wasn't actually run during this particular build.
            abayer Andrew Bayer made changes -
            Assignee Andrew Bayer [ abayer ] rsandell [ rsandell ]
            Hide
            hrmpw Patrick Wolf added a comment -

            James Dumay Michael Neale How would this affect Blue Ocean display?

            Show
            hrmpw Patrick Wolf added a comment - James Dumay Michael Neale How would this affect Blue Ocean display?
            Hide
            abayer Andrew Bayer added a comment -

            Well, we'd still "run" the stage - we just wouldn't actually do anything in it, like we now do with stages after a failed stage, so that we preserve the execution plan regardless of status.

            Show
            abayer Andrew Bayer added a comment - Well, we'd still "run" the stage - we just wouldn't actually do anything in it, like we now do with stages after a failed stage, so that we preserve the execution plan regardless of status.
            Hide
            hrmpw Patrick Wolf added a comment -

            As pointed out above by Anton, showing it as "Successful", "Failed", or "Unstable" wouldn't be entirely accurate.

            Also, would this skip the "post" actions entirely as well?

            Show
            hrmpw Patrick Wolf added a comment - As pointed out above by Anton, showing it as "Successful", "Failed", or "Unstable" wouldn't be entirely accurate. Also, would this skip the "post" actions entirely as well?
            Hide
            abayer Andrew Bayer added a comment -

            As of now, there's no way to set a stage to a specific status, so it'll just be whatever the overall status is.

            I'd say yes, we would skip post-stage actions as well.

            Show
            abayer Andrew Bayer added a comment - As of now, there's no way to set a stage to a specific status, so it'll just be whatever the overall status is. I'd say yes, we would skip post-stage actions as well.
            Hide
            jamesdumay James Dumay added a comment - - edited

            Patrick Wolf Andrew Bayer what if "skipped" stages were not displayed at all? However, if we did want skipped stages to show we should introduce a skipped state.

            Show
            jamesdumay James Dumay added a comment - - edited Patrick Wolf Andrew Bayer what if "skipped" stages were not displayed at all? However, if we did want skipped stages to show we should introduce a skipped state.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTScriptBlock.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.java
            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/validator/ModelValidator.java
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.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/WhenStageTest.java
            pipeline-model-definition/src/test/resources/simpleWhen.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/dfab9e247559bf258b0aa35e4160cc91b45e0abc
            Log:
            JENKINS-37781 Adding Stage.when to specify if a stage should run or not

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTScriptBlock.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.java 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/validator/ModelValidator.java pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.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/WhenStageTest.java pipeline-model-definition/src/test/resources/simpleWhen.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/dfab9e247559bf258b0aa35e4160cc91b45e0abc Log: JENKINS-37781 Adding Stage.when to specify if a stage should run or not
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.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/WhenStageTest.java
            pipeline-model-definition/src/test/resources/simpleWhen.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/9676206a2bc0ec8b93624ae8fc7cf907e8273b4e
            Log:
            JENKINS-37781 fixing the compilation of the compiler

            and cleaned up some debug echo

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.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/WhenStageTest.java pipeline-model-definition/src/test/resources/simpleWhen.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/9676206a2bc0ec8b93624ae8fc7cf907e8273b4e Log: JENKINS-37781 fixing the compilation of the compiler and cleaned up some debug echo
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhen.java
            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/ast-schema.json
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java
            pipeline-model-definition/src/test/resources/simpleWhen.groovy
            pipeline-model-definition/src/test/resources/when/simpleWhen.groovy
            pipeline-model-definition/src/test/resources/when/whenEmpty.groovy
            pipeline-model-definition/src/test/resources/when/whenException.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/819bbdfeb1ba3a6351baf142a558bb5ccdc599af
            Log:
            JENKINS-37781 More tests

            Fixed some issues those tests revealed.
            Also fixed a bug where the last line of a script or when closure wasn't parsed

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhen.java 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/ast-schema.json pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java pipeline-model-definition/src/test/resources/simpleWhen.groovy pipeline-model-definition/src/test/resources/when/simpleWhen.groovy pipeline-model-definition/src/test/resources/when/whenEmpty.groovy pipeline-model-definition/src/test/resources/when/whenException.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/819bbdfeb1ba3a6351baf142a558bb5ccdc599af Log: JENKINS-37781 More tests Fixed some issues those tests revealed. Also fixed a bug where the last line of a script or when closure wasn't parsed
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/eddf70b8c5747b8c516752e8c033891b6cfc9daa
            Log:
            JENKINS-37781 Fixed empty when validation

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/eddf70b8c5747b8c516752e8c033891b6cfc9daa Log: JENKINS-37781 Fixed empty when validation
            Hide
            nirro Stanislav Tyurikov added a comment -

            It would be awesome to have such functionally!
            From my point of view having DSL like: stage(name: "My Stage", skip: true) would be good enough. If a stage is skipped make it gray on the board.

            Show
            nirro Stanislav Tyurikov added a comment - It would be awesome to have such functionally! From my point of view having DSL like: stage(name: "My Stage", skip: true) would be good enough. If a stage is skipped make it gray on the board.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            pipeline-model-api/pom.xml
            pipeline-model-declarative-agent/pom.xml
            pipeline-model-definition/pom.xml
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
            pom.xml
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/b8463d5ab69d6ae10871d80892150fa04d323d82
            Log:
            Merge branch 'master' of github.com:jenkinsci/pipeline-model-definition-plugin into JENKINS-37781

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: pipeline-model-api/pom.xml pipeline-model-declarative-agent/pom.xml pipeline-model-definition/pom.xml pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy pom.xml http://jenkins-ci.org/commit/pipeline-model-definition-plugin/b8463d5ab69d6ae10871d80892150fa04d323d82 Log: Merge branch 'master' of github.com:jenkinsci/pipeline-model-definition-plugin into JENKINS-37781
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/AbstractModelASTCodeBlock.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTScriptBlock.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhen.java
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/efe93beefe8be357adc0cab0e2d319a05502fcda
            Log:
            JENKINS-37781 Split ModelASTScriptBlock and ModelASTWhen

            Into having one common ancestor instead of when extending script

            Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/d65d3dc3117f...efe93beefe8b

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/AbstractModelASTCodeBlock.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTScriptBlock.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWhen.java pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/efe93beefe8be357adc0cab0e2d319a05502fcda Log: JENKINS-37781 Split ModelASTScriptBlock and ModelASTWhen Into having one common ancestor instead of when extending script Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/d65d3dc3117f...efe93beefe8b
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            pipeline-model-declarative-agent/pom.xml
            pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgent.java
            pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgentDescriptor.java
            pipeline-model-definition/pom.xml
            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/AbstractBuildConditionResponder.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Agent.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/JobProperties.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/MappedClosure.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/NestedModel.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Parameters.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stages.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/StepsBlock.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Tools.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Triggers.groovy
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ModelStepLoader.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipeline.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfile.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/Label.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/model/BuildCondition.java
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.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/AgentTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelAndOtherFieldAgent.java
            pipeline-model-definition/src/test/resources/fromAlternateDockerfile.groovy
            pipeline-model-definition/src/test/resources/fromDockerfile.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/8c766601a1394bc2f5652c7a5fd8c6497563f265
            Log:
            Merge remote-tracking branch 'origin/master' into JENKINS-37781

            Conflicts:
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy

            Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/efe93beefe8b...8c766601a139

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: pipeline-model-declarative-agent/pom.xml pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgent.java pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgentDescriptor.java pipeline-model-definition/pom.xml 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/AbstractBuildConditionResponder.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Agent.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/JobProperties.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/MappedClosure.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/NestedModel.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Parameters.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stages.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/StepsBlock.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Tools.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Triggers.groovy pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ModelStepLoader.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipeline.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfile.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/Label.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/model/BuildCondition.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.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/AgentTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelAndOtherFieldAgent.java pipeline-model-definition/src/test/resources/fromAlternateDockerfile.groovy pipeline-model-definition/src/test/resources/fromDockerfile.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/8c766601a1394bc2f5652c7a5fd8c6497563f265 Log: Merge remote-tracking branch 'origin/master' into JENKINS-37781 Conflicts: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/efe93beefe8b...8c766601a139
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            README.md
            SYNTAX.md
            pipeline-model-api/pom.xml
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPipelineDef.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStep.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWrapper.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWrappers.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.java
            pipeline-model-declarative-agent/pom.xml
            pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgent.java
            pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgentDescriptor.java
            pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgentScript.java
            pipeline-model-definition/pom.xml
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Agent.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Wrappers.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/WrappersToMap.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/agent/impl/Any.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipeline.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/Label.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/None.java
            pipeline-model-definition/src/main/resources/ast-schema.json
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ClosureModelTranslator.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/WrappersToMapTranslator.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelScript.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/NoneScript.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/AgentTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/EnvironmentTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ToolsTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WrappersTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelAndOtherFieldAgent.java
            pipeline-model-definition/src/test/resources/agentAnyInStage.groovy
            pipeline-model-definition/src/test/resources/agentTypeOrdering.groovy
            pipeline-model-definition/src/test/resources/environmentInStage.groovy
            pipeline-model-definition/src/test/resources/errors/agentMissingRequiredParam.groovy
            pipeline-model-definition/src/test/resources/errors/agentUnknownParamForType.groovy
            pipeline-model-definition/src/test/resources/errors/invalidWrapperType.groovy
            pipeline-model-definition/src/test/resources/errors/unknownAgentType.groovy
            pipeline-model-definition/src/test/resources/errors/unknownBareAgentType.groovy
            pipeline-model-definition/src/test/resources/json/agentTypeOrdering.json
            pipeline-model-definition/src/test/resources/json/environmentInStage.json
            pipeline-model-definition/src/test/resources/json/errors/agentMissingRequiredParam.json
            pipeline-model-definition/src/test/resources/json/errors/agentUnknownParamForType.json
            pipeline-model-definition/src/test/resources/json/errors/invalidWrapperType.json
            pipeline-model-definition/src/test/resources/json/errors/unknownAgentType.json
            pipeline-model-definition/src/test/resources/json/errors/unknownBareAgentType.json
            pipeline-model-definition/src/test/resources/json/multipleWrappers.json
            pipeline-model-definition/src/test/resources/json/simpleWrapper.json
            pipeline-model-definition/src/test/resources/json/toolsInStage.json
            pipeline-model-definition/src/test/resources/multipleWrappers.groovy
            pipeline-model-definition/src/test/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelAndOtherFieldAgentScript.groovy
            pipeline-model-definition/src/test/resources/simpleWrapper.groovy
            pipeline-model-definition/src/test/resources/toolsInStage.groovy
            pom.xml
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/d65d3dc3117f30a4502cfa7ad48c7494b9c0915d
            Log:
            Merge branch 'master' of github.com:jenkinsci/pipeline-model-definition-plugin into JENKINS-37781

            Conflicts:
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.java
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.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

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: README.md SYNTAX.md pipeline-model-api/pom.xml pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPipelineDef.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStep.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWrapper.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTWrappers.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.java pipeline-model-declarative-agent/pom.xml pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgent.java pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgentDescriptor.java pipeline-model-declarative-agent/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/DeclarativeAgentScript.java pipeline-model-definition/pom.xml pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Agent.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Wrappers.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/WrappersToMap.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/agent/impl/Any.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipeline.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/Label.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/None.java pipeline-model-definition/src/main/resources/ast-schema.json pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ClosureModelTranslator.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/WrappersToMapTranslator.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/NoneScript.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/AgentTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/EnvironmentTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ToolsTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WrappersTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelAndOtherFieldAgent.java pipeline-model-definition/src/test/resources/agentAnyInStage.groovy pipeline-model-definition/src/test/resources/agentTypeOrdering.groovy pipeline-model-definition/src/test/resources/environmentInStage.groovy pipeline-model-definition/src/test/resources/errors/agentMissingRequiredParam.groovy pipeline-model-definition/src/test/resources/errors/agentUnknownParamForType.groovy pipeline-model-definition/src/test/resources/errors/invalidWrapperType.groovy pipeline-model-definition/src/test/resources/errors/unknownAgentType.groovy pipeline-model-definition/src/test/resources/errors/unknownBareAgentType.groovy pipeline-model-definition/src/test/resources/json/agentTypeOrdering.json pipeline-model-definition/src/test/resources/json/environmentInStage.json pipeline-model-definition/src/test/resources/json/errors/agentMissingRequiredParam.json pipeline-model-definition/src/test/resources/json/errors/agentUnknownParamForType.json pipeline-model-definition/src/test/resources/json/errors/invalidWrapperType.json pipeline-model-definition/src/test/resources/json/errors/unknownAgentType.json pipeline-model-definition/src/test/resources/json/errors/unknownBareAgentType.json pipeline-model-definition/src/test/resources/json/multipleWrappers.json pipeline-model-definition/src/test/resources/json/simpleWrapper.json pipeline-model-definition/src/test/resources/json/toolsInStage.json pipeline-model-definition/src/test/resources/multipleWrappers.groovy pipeline-model-definition/src/test/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelAndOtherFieldAgentScript.groovy pipeline-model-definition/src/test/resources/simpleWrapper.groovy pipeline-model-definition/src/test/resources/toolsInStage.groovy pom.xml http://jenkins-ci.org/commit/pipeline-model-definition-plugin/d65d3dc3117f30a4502cfa7ad48c7494b9c0915d Log: Merge branch 'master' of github.com:jenkinsci/pipeline-model-definition-plugin into JENKINS-37781 Conflicts: pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.java pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.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
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/AbstractModelASTCodeBlock.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTScriptBlock.java
            pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.java
            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/validator/ModelValidator.java
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.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/ast-schema.json
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java
            pipeline-model-definition/src/test/resources/when/simpleWhen.groovy
            pipeline-model-definition/src/test/resources/when/whenEmpty.groovy
            pipeline-model-definition/src/test/resources/when/whenException.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ec6f0ea92278c82b854b65710d4fc0e8f65f3413
            Log:
            Merge pull request #41 from jenkinsci/JENKINS-37781

            JENKINS-37781 Adding Stage.when to specify if a stage should run

            Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/eee41f81b547...ec6f0ea92278

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/AbstractModelASTCodeBlock.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTScriptBlock.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.java 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/validator/ModelValidator.java pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.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/ast-schema.json pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java pipeline-model-definition/src/test/resources/when/simpleWhen.groovy pipeline-model-definition/src/test/resources/when/whenEmpty.groovy pipeline-model-definition/src/test/resources/when/whenException.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ec6f0ea92278c82b854b65710d4fc0e8f65f3413 Log: Merge pull request #41 from jenkinsci/ JENKINS-37781 JENKINS-37781 Adding Stage.when to specify if a stage should run Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/eee41f81b547...ec6f0ea92278
            rsandell rsandell made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            rsandell rsandell made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            rsandell rsandell made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Done [ 10000 ]
            Hide
            jamesdumay James Dumay added a comment -

            rsandell do you know what skipped sections look like as far as the Blue Ocean visualisation goes?

            Show
            jamesdumay James Dumay added a comment - rsandell do you know what skipped sections look like as far as the Blue Ocean visualisation goes?
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Robert Sandell
            Path:
            SYNTAX.md
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/71c3d60ee486e48757bbd76315dc69a9e0418775
            Log:
            Update SYNTAX.md

            Noting changes introduced in JENKINS-37792, JENKINS-37781 and JENKINS-37778

            Also fixed the script example and marked the code sections as groovy
            so that GitHub hopefully can color the code a bit more nicely.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: SYNTAX.md http://jenkins-ci.org/commit/pipeline-model-definition-plugin/71c3d60ee486e48757bbd76315dc69a9e0418775 Log: Update SYNTAX.md Noting changes introduced in JENKINS-37792 , JENKINS-37781 and JENKINS-37778 Also fixed the script example and marked the code sections as groovy so that GitHub hopefully can color the code a bit more nicely.
            Hide
            jamesdumay James Dumay added a comment -

            Patrick Wolf not sure if this was documented? May have slipped through the cracks.

            Show
            jamesdumay James Dumay added a comment - Patrick Wolf not sure if this was documented? May have slipped through the cracks.
            Hide
            tknerr Torben Knerr added a comment - - edited

            Is this a blue ocean only thing?

            I'm wondering if there is a "skipped" state in plain Pipeline DSL / Stage View Plugin, but haven't found it yet...

            Also not clear how to use it in the DSL. Can you point me to an example?

            *update: * found the docs:
            https://github.com/jenkinsci/pipeline-model-definition-plugin/commit/71c3d60ee486e48757bbd76315dc69a9e0418775#diff-fa1a1fd4274e733b635b3978b3d39ce6R88

            Show
            tknerr Torben Knerr added a comment - - edited Is this a blue ocean only thing? I'm wondering if there is a "skipped" state in plain Pipeline DSL / Stage View Plugin, but haven't found it yet... Also not clear how to use it in the DSL. Can you point me to an example? *update: * found the docs: https://github.com/jenkinsci/pipeline-model-definition-plugin/commit/71c3d60ee486e48757bbd76315dc69a9e0418775#diff-fa1a1fd4274e733b635b3978b3d39ce6R88
            Hide
            mkobit Mike Kobit added a comment -

            Is skipped available for pipelines that don't use the pipeline model definition plugin ?

            Show
            mkobit Mike Kobit added a comment - Is skipped available for pipelines that don't use the pipeline model definition plugin ?
            Hide
            jamesdumay James Dumay added a comment -

            Mike Kobit you can use groovy's "if" statement to skip stages.

            Show
            jamesdumay James Dumay added a comment - Mike Kobit you can use groovy's "if" statement to skip stages.
            Hide
            mkobit Mike Kobit added a comment - - edited

            James Dumay the ways I can think of are:

            if(condition) {
              stage('myStage') {
                // things
              }
            }
            

            Which causes it to not show up if the condition is false (at least in the Pipeline Stage View Plugin. With that view, it also has some weird display issues if new pipelines have different stage executions than previous ones.

            The other option is to:

            stage('myStage') {
              if(condition) {
                // things
              }
            }
            

            This case seems to always mark it has a successful stage (haven't looked at actual status).

            *Note: *We haven't updated to the Blue Ocean 1.0 yet, and have not made concerted efforts for the pipeline model to see how well it will work for us

            Show
            mkobit Mike Kobit added a comment - - edited James Dumay the ways I can think of are: if(condition) { stage('myStage') { // things } } Which causes it to not show up if the condition is false (at least in the Pipeline Stage View Plugin . With that view, it also has some weird display issues if new pipelines have different stage executions than previous ones. The other option is to: stage('myStage') { if(condition) { // things } } This case seems to always mark it has a successful stage (haven't looked at actual status). *Note: *We haven't updated to the Blue Ocean 1.0 yet, and have not made concerted efforts for the pipeline model to see how well it will work for us
            Hide
            jamesdumay James Dumay added a comment -

            Mike Kobit I'd so something like this to make it clear that the stage was skipped but it would keep the stage itself as successful.

            stage('myStage') {
              if(condition) {
                // steps
              } else {
                 echo 'Skipped'
              }
            }
            
            Show
            jamesdumay James Dumay added a comment - Mike Kobit I'd so something like this to make it clear that the stage was skipped but it would keep the stage itself as successful. stage( 'myStage' ) { if (condition) { // steps } else { echo 'Skipped' } }
            Hide
            mkobit Mike Kobit added a comment -

            I know this was closed, but I would like to be able to mark the stages in a scripted pipeline as skipped to get the same visual benefits in https://issues.jenkins-ci.org/browse/JENKINS-39628 . Nobody in our organization uses the Pipeline Model plugin yet, and will most likely not switch for a while.

            Show
            mkobit Mike Kobit added a comment - I know this was closed, but I would like to be able to mark the stages in a scripted pipeline as skipped to get the same visual benefits in https://issues.jenkins-ci.org/browse/JENKINS-39628 . Nobody in our organization uses the Pipeline Model plugin yet, and will most likely not switch for a while.
            Hide
            jamesdumay James Dumay added a comment -

            Sorry Mike Kobit - for the time being the nice new visualisation bells and whistles will be declarative only

            Show
            jamesdumay James Dumay added a comment - Sorry Mike Kobit - for the time being the nice new visualisation bells and whistles will be declarative only
            Hide
            msrylander Mike Rylander added a comment -

            James Dumay Is there a ticket that I could watch/vote for adding this to the scripted pipeline?

            Show
            msrylander Mike Rylander added a comment - James Dumay Is there a ticket that I could watch/vote for adding this to the scripted pipeline?
            Hide
            reinholdfuereder Reinhold Füreder added a comment -

            Ad comments/requests from Mike Kobit and Mike Rylander: I'd be happy about that too, especially since due to https://issues.jenkins-ci.org/browse/JENKINS-46547 most non-straightforward declarative pipelines in shared libraries need to be converted into scripted pipelines...

            Show
            reinholdfuereder Reinhold Füreder added a comment - Ad comments/requests from Mike Kobit and Mike Rylander : I'd be happy about that too, especially since due to https://issues.jenkins-ci.org/browse/JENKINS-46547 most non-straightforward declarative pipelines in shared libraries need to be converted into scripted pipelines...
            Hide
            jamesdumay James Dumay added a comment -

            Mike Rylander there isn't a ticket for supporting this in scripted pipeline.

            Show
            jamesdumay James Dumay added a comment - Mike Rylander there isn't a ticket for supporting this in scripted pipeline.
            Hide
            reinholdfuereder Reinhold Füreder added a comment -

            => therefore filed https://issues.jenkins-ci.org/browse/JENKINS-47286 "Support skipping stages in scripted pipelines for nice visualization in blue ocean and classic UI stage view"

            Show
            reinholdfuereder Reinhold Füreder added a comment - => therefore filed https://issues.jenkins-ci.org/browse/JENKINS-47286 "Support skipping stages in scripted pipelines for nice visualization in blue ocean and classic UI stage view"
            reinholdfuereder Reinhold Füreder made changes -
            Link This issue is related to JENKINS-47286 [ JENKINS-47286 ]
            Hide
            comscience15 Nat Sr added a comment -

            James Dumay rsandell I see this ticket is resolved and wonder when and what release will it out? Could you guys please answer it? Thanks

            Show
            comscience15 Nat Sr added a comment - James Dumay rsandell I see this ticket is resolved and wonder when and what release will it out? Could you guys please answer it? Thanks
            Hide
            lucasocio Leandro Lucarella added a comment -

            It's "resolved" as POSTPONED. So it's not fixed. Also, closing issues like that doesn't allow people to vote for them, which kind of sucks (I've seen it for other issues like supporting labels to steps).

            Show
            lucasocio Leandro Lucarella added a comment - It's "resolved" as POSTPONED. So it's not fixed. Also, closing issues like that doesn't allow people to vote for them, which kind of sucks (I've seen it for other issues like supporting labels to steps).
            Hide
            abayer Andrew Bayer added a comment -

            Huh? We released the when directive for Declarative ages ago.

            Show
            abayer Andrew Bayer added a comment - Huh? We released the when directive for Declarative ages ago.
            Hide
            lucasocio Leandro Lucarella added a comment - - edited

            Sorry, I think I got the comments mixed up, I was replying about scripted pipelines:

            => therefore filed https://issues.jenkins-ci.org/browse/JENKINS-47286 "Support skipping stages in scripted pipelines for nice visualization in blue ocean and classic UI stage view"

            Show
            lucasocio Leandro Lucarella added a comment - - edited Sorry, I think I got the comments mixed up, I was replying about scripted pipelines: => therefore filed https://issues.jenkins-ci.org/browse/JENKINS-47286 "Support skipping stages in scripted pipelines for nice visualization in blue ocean and classic UI stage view"
            Hide
            bitwiseman Liam Newman added a comment -

            Bulk closing resolved issues.

            Show
            bitwiseman Liam Newman added a comment - Bulk closing resolved issues.
            bitwiseman Liam Newman made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                rsandell rsandell
                Reporter:
                abayer Andrew Bayer
              • Votes:
                3 Vote for this issue
                Watchers:
                18 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: