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

Possibility to change pipeline version in later tasks or stages

    XMLWordPrintable

Details

    Description

      Possibility to change pipeline version in later tasks or stages. Reported by Patrice Matignon.

      Attachments

        Issue Links

          Activity

            Was created from this one

            patbos Patrik Boström added a comment - Was created from this one

            Thanks Patrik!

            pmatignon Patrice Matignon added a comment - Thanks Patrik!
            pmatignon Patrice Matignon added a comment - - edited

            What should be the logic for setting the version then ?
            If I understand correctly, using "Create Delivery Pipeline version" sets an env variable "PIPELINE_VERSION", and also passes it on as a build parameter to jobs downstream, whether or not the "set Build display name" is actually checked.

            Also, currently the default behavior is to use the first build's display name (whether or not it was set by the mechanism above) as the pipeline instance version.

            I would propose that the pipeline would look at the PIPELINE_VERSION env variable, starting from the end of the pipeline and moving backwards if necessary (to reflect the fact that you can set/override the pipeline version later in the pipeline). If that env var is not found anywhere in the pipeline instance builds, then the logic would default to the current behavior, in order to maintain backward-compatibility.

            Does that sound sensible?
            Thanks for your feedback!

            pmatignon Patrice Matignon added a comment - - edited What should be the logic for setting the version then ? If I understand correctly, using "Create Delivery Pipeline version" sets an env variable "PIPELINE_VERSION", and also passes it on as a build parameter to jobs downstream, whether or not the "set Build display name" is actually checked. Also, currently the default behavior is to use the first build's display name (whether or not it was set by the mechanism above) as the pipeline instance version. I would propose that the pipeline would look at the PIPELINE_VERSION env variable, starting from the end of the pipeline and moving backwards if necessary (to reflect the fact that you can set/override the pipeline version later in the pipeline). If that env var is not found anywhere in the pipeline instance builds, then the logic would default to the current behavior, in order to maintain backward-compatibility. Does that sound sensible? Thanks for your feedback!
            pmwheatley Phillip Wheatley added a comment - Pull request submitted: https://github.com/Diabol/delivery-pipeline-plugin/pull/89
            tommysdk Tommy Tynjä added a comment -

            patbos, pmatignon, pmwheatley: Is this issue still relevant?

            tommysdk Tommy Tynjä added a comment - patbos , pmatignon , pmwheatley : Is this issue still relevant?
            tommysdk Tommy Tynjä added a comment -

            Closing due to inactivity.

            tommysdk Tommy Tynjä added a comment - Closing due to inactivity.

            People

              patbos Patrik Boström
              patbos Patrik Boström
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: