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

Add ability to skip the default build step triggered by downstream build step such as Jenkins release-plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi

      we would like to use Jenkins release-plugin[1] to run maven release for Jenkins Maven freestyle job. This plugin works by configuring the Jenkins release-plugin pre-build step with a top level maven build with –B release:prepare release:perform. This big drawback is after the successful pre-build step, it also runs the default build step(usually with clean deploy). This means the build time is double.

      To solve the issue[2][3], we need a way to get downstream build step(ie Jenkins release plugin) to notify Jenkins-core to skip the default build steps

      Here are the proposes implementations
      1. Introduce a ‘release build step’, once it is executed and return back to Jenkins core[4] with an instance of Environment [5]
      2. Set the return Environment instance to null, or introduce a new flag in the Environment class .
      3. Jenkins core’s Build.java ( and related concrete class ) skip the default build step base on the status of the return Environment instance or the status of the new flag

      A pull request will follow

      By doing the change in Jenkins core the same problem in “M2Release plugin” can also be addressed. Thus providing a leverage to release plugin.

      Thanks
      1)https://wiki.jenkins-ci.org/display/JENKINS/Release+Plugin
      2)https://issues.jenkins-ci.org/browse/JENKINS-11120
      3)https://issues.jenkins-ci.org/browse/JENKINS-27723
      4)https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Build.java
      5)https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Environment.java

        Attachments

          Issue Links

            Activity

            hshah Harsh Shah created issue -
            hshah Harsh Shah made changes -
            Field Original Value New Value
            Link This issue is blocking JENKINS-11120 [ JENKINS-11120 ]
            hshah Harsh Shah made changes -
            Link This issue is blocking JENKINS-27723 [ JENKINS-27723 ]
            hshah Harsh Shah made changes -
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            dantran dan tran made changes -
            Description Hi

             we would like to use Jenkins release-plugin[1] to run maven release plugin for Jenkins Maven freestyle job. This plugin works by configuring the Jenkins release-plugin pre-build step with a top level maven build with –B release:prepare release:perform. This big drawback is after the successful in the pre-build step, it also runs the default build step(usually with clean deploy). This means the build time is double.

            To solve the issue[2][3], we need a way to get downstream build step(ie Jenkins release plugin) to notify Jenkins-core to skip the default build steps

            Here are the propose implementations
            1. Introduce a ‘release build step’, once it is executed and return back to Jenkins core[4] with an instance of Environment [5]
            2. Set the return Environment instance to null, or introduce an new flag in the environment class which notifies to override the default build.
            3. Jenkins core’s Build.java ( and related concrete class ) skip the default build step base on the status of the return Env instance or the status of the new flag
            A pull request will follow

            By doing the change in Jenkins core the same problem in “M2Release plugin” can also be addressed. Thus providing a leverage to release plugin.

            Thanks
            1)https://wiki.jenkins-ci.org/display/JENKINS/Release+Plugin
            2)https://issues.jenkins-ci.org/browse/JENKINS-11120
            3)https://issues.jenkins-ci.org/browse/JENKINS-27723
            4)https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Build.java
            5)https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Environment.java
            Hi

             we would like to use Jenkins release-plugin[1] to run maven release for Jenkins Maven freestyle job. This plugin works by configuring the Jenkins release-plugin pre-build step with a top level maven build with –B release:prepare release:perform. This big drawback is after the successful pre-build step, it also runs the default build step(usually with clean deploy). This means the build time is double.

            To solve the issue[2][3], we need a way to get downstream build step(ie Jenkins release plugin) to notify Jenkins-core to skip the default build steps

            Here are the proposes implementations
            1. Introduce a ‘release build step’, once it is executed and return back to Jenkins core[4] with an instance of Environment [5]
            2. Set the return Environment instance to null, or introduce a new flag in the Environment class .
            3. Jenkins core’s Build.java ( and related concrete class ) skip the default build step base on the status of the return Environment instance or the status of the new flag

            A pull request will follow

            By doing the change in Jenkins core the same problem in “M2Release plugin” can also be addressed. Thus providing a leverage to release plugin.

            Thanks
            1)https://wiki.jenkins-ci.org/display/JENKINS/Release+Plugin
            2)https://issues.jenkins-ci.org/browse/JENKINS-11120
            3)https://issues.jenkins-ci.org/browse/JENKINS-27723
            4)https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Build.java
            5)https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Environment.java
            dantran dan tran made changes -
            Link This issue is related to JENKINS-11120 [ JENKINS-11120 ]
            dantran dan tran made changes -
            Link This issue is related to JENKINS-11120 [ JENKINS-11120 ]
            dantran dan tran made changes -
            Link This issue duplicates JENKINS-11120 [ JENKINS-11120 ]
            dantran dan tran made changes -
            Link This issue is blocking JENKINS-11120 [ JENKINS-11120 ]
            dantran dan tran made changes -
            Link This issue is duplicated by JENKINS-27723 [ JENKINS-27723 ]
            dantran dan tran made changes -
            Link This issue is blocking JENKINS-27723 [ JENKINS-27723 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 162468 ] JNJira + In-Review [ 180937 ]

              People

              Assignee:
              petehayes Peter Hayes
              Reporter:
              hshah Harsh Shah
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: