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

Add a possiblity to skip/override the normal build in case of a release.

    XMLWordPrintable

Details

    Description

      It'd be really cool to be able to run a special release build instead of the normal one, either by skipping the normal one (and defining the special build in pre-/post-actions) or by overriding it by a defined release actions.

      Attachments

        Issue Links

          Activity

            dantran dan tran added a comment - see JENKINS-27875
            hshah Harsh Shah added a comment -

            If the core is modified the issue will be solved.

            hshah Harsh Shah added a comment - If the core is modified the issue will be solved.
            hshah Harsh Shah added a comment -

            We found a way to have the jenkins release-plugin to notify Jenkins core to skip the default build
            1. Introduce a ‘release build step’, once it is executed and return back to Jenkins core[1] with an instance of Environment [2]
            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
            This means we need help from Jenkins core dev to add new capability in Jenkins core to skip the default build step. Will file an RFE with Jenkins core
            Thanks
            [1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Build.java
            [2] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Environment.java

            hshah Harsh Shah added a comment - We found a way to have the jenkins release-plugin to notify Jenkins core to skip the default build 1. Introduce a ‘release build step’, once it is executed and return back to Jenkins core [1] with an instance of Environment [2] 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 This means we need help from Jenkins core dev to add new capability in Jenkins core to skip the default build step. Will file an RFE with Jenkins core Thanks [1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Build.java [2] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Environment.java
            hshah Harsh Shah added a comment -

            Hi,
            Any updates to this issue? I have the same issue and I am trying to customize the plugin to override build goal with the release goal. Here is the link https://issues.jenkins-ci.org/browse/JENKINS-27723.

            To remove ambiguity I have added one more field called "release goal" in the configure release settings(see the link) where I add the goals. I am able to work this out but some how it is not overriding the default build goal. It executes the build goal and then the release goal.

            I am a newbie to Jenkins would appreciate any help provided.

            hshah Harsh Shah added a comment - Hi, Any updates to this issue? I have the same issue and I am trying to customize the plugin to override build goal with the release goal. Here is the link https://issues.jenkins-ci.org/browse/JENKINS-27723 . To remove ambiguity I have added one more field called "release goal" in the configure release settings(see the link) where I add the goals. I am able to work this out but some how it is not overriding the default build goal. It executes the build goal and then the release goal. I am a newbie to Jenkins would appreciate any help provided.
            petehayes Peter Hayes added a comment -

            Sorry for not being responsive. I do something similar to what you do with a post build deploy. I use separate deploy jobs all together that are triggered by the upstream build job. The downstream jobs use the lastSuccessfulBuild perma link or are parameterized and then curl the artifacts from the build job and run the deployment. I wasn't aware that Jenkins will not archive the release artifacts when using the m2release plugin. That may be a problem for us as we convert to use that plugin. I'm sure I'll be investigating this further over the next few weeks or so.

            petehayes Peter Hayes added a comment - Sorry for not being responsive. I do something similar to what you do with a post build deploy. I use separate deploy jobs all together that are triggered by the upstream build job. The downstream jobs use the lastSuccessfulBuild perma link or are parameterized and then curl the artifacts from the build job and run the deployment. I wasn't aware that Jenkins will not archive the release artifacts when using the m2release plugin. That may be a problem for us as we convert to use that plugin. I'm sure I'll be investigating this further over the next few weeks or so.

            People

              Unassigned Unassigned
              rakuda Krzesmir Florek
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: