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

Add capability for globally configured Declarative when conditions

    XMLWordPrintable

Details

    Description

      It would be useful to be able to define when conditions that apply globally across all jobs, enabling things like skipping all stages with a certain name pattern (like, say, not running deploy stages on the weekend) or inspecting the stage to see if it is trying to use a service that's currently down. This would require some changes in Declarative to allow plugins to add when condition types that can't be specified in the Jenkinsfile, won't show up in validation, and won't be available in the snippet generator, and parsing/execution-side changes to support transparently adding any configured global conditions to all stages while retaining conditions directly defined on stages.

      Attachments

        Issue Links

          Activity

            abayer Andrew Bayer created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer added a comment -

            Draft PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/409 - still need to add more javadocs etc at a minimum.

            abayer Andrew Bayer added a comment - Draft PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/409 - still need to add more javadocs etc at a minimum.
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR #409 (Web Link)" [ 26406 ]
            abayer Andrew Bayer added a comment -

            This has been merged and should be in the next release of Declarative (either 1.7.3 or 1.8.0).

            abayer Andrew Bayer added a comment - This has been merged and should be in the next release of Declarative (either 1.7.3 or 1.8.0).
            abayer Andrew Bayer made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Fixed but Unreleased [ 10203 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: