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

m2 Release Plugin lock builds

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Component/s: m2release-plugin
    • Labels:
      None
    • Environment:
      Any
    • Similar Issues:

      Description

      Is it possible to have a configurable option per job to always keep a m2 release build locked.
      At the moment only the latest release build stays locked...

        Attachments

          Issue Links

            Activity

            tabmow Terry Sposato created issue -
            Hide
            tabmow Terry Sposato added a comment -

            I started creating a patch to implement this feature but I got stuck (I am not a developer)
            What I started can be found here: http://pastebin.com/raw.php?i=ZixnJ9Ut
            As far as I can tell the logic needs to be implemented to lock or not lock the release builds but everything else is there (I think).

            Show
            tabmow Terry Sposato added a comment - I started creating a patch to implement this feature but I got stuck (I am not a developer) What I started can be found here: http://pastebin.com/raw.php?i=ZixnJ9Ut As far as I can tell the logic needs to be implemented to lock or not lock the release builds but everything else is there (I think).
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: James Nord
            Path:
            src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java
            src/main/resources/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper/config.jelly
            src/main/webapp/help-projectConfig-help-numberOfReleaseBuildsToKeep.html
            src/test/java/org/jvnet/hudson/plugins/m2release/M2ReleaseActionTest.java
            http://jenkins-ci.org/commit/m2release-plugin/82e9e2c2fbdae06a4d04700ed5cf0bdcea9c8ce8
            Log:
            [FIXED JENKINS-12076] Add the ability to specify the number of release builds to keep.

            If the number is -1 then all builds are kept.
            a positive number will keep that many sucessfull release builds.
            Any other number (< -1 or 0) will cause no release builds to be kept.

            Compare: https://github.com/jenkinsci/m2release-plugin/compare/18712bd...82e9e2c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java src/main/resources/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper/config.jelly src/main/webapp/help-projectConfig-help-numberOfReleaseBuildsToKeep.html src/test/java/org/jvnet/hudson/plugins/m2release/M2ReleaseActionTest.java http://jenkins-ci.org/commit/m2release-plugin/82e9e2c2fbdae06a4d04700ed5cf0bdcea9c8ce8 Log: [FIXED JENKINS-12076] Add the ability to specify the number of release builds to keep. If the number is -1 then all builds are kept. a positive number will keep that many sucessfull release builds. Any other number (< -1 or 0) will cause no release builds to be kept. Compare: https://github.com/jenkinsci/m2release-plugin/compare/18712bd...82e9e2c
            scm_issue_link SCM/JIRA link daemon made changes -
            Field Original Value New Value
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            Hide
            dogfood dogfood added a comment -

            Integrated in plugins_m2release #69
            [FIXED JENKINS-12076] Add the ability to specify the number of release builds to keep. (Revision 82e9e2c2fbdae06a4d04700ed5cf0bdcea9c8ce8)

            Result = SUCCESS
            James Nord :
            Files :

            • src/main/resources/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper/config.jelly
            • src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java
            • src/main/webapp/help-projectConfig-help-numberOfReleaseBuildsToKeep.html
            • src/test/java/org/jvnet/hudson/plugins/m2release/M2ReleaseActionTest.java
            Show
            dogfood dogfood added a comment - Integrated in plugins_m2release #69 [FIXED JENKINS-12076] Add the ability to specify the number of release builds to keep. (Revision 82e9e2c2fbdae06a4d04700ed5cf0bdcea9c8ce8) Result = SUCCESS James Nord : Files : src/main/resources/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper/config.jelly src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java src/main/webapp/help-projectConfig-help-numberOfReleaseBuildsToKeep.html src/test/java/org/jvnet/hudson/plugins/m2release/M2ReleaseActionTest.java
            Hide
            dvenable David Venable added a comment - - edited

            This feature does not work from the master branch of GitHub due to an incorrect constructor argument name.
            I created a pull request on GitHub which fixes it.
            https://github.com/jenkinsci/m2release-plugin/pull/10

            Show
            dvenable David Venable added a comment - - edited This feature does not work from the master branch of GitHub due to an incorrect constructor argument name. I created a pull request on GitHub which fixes it. https://github.com/jenkinsci/m2release-plugin/pull/10
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: David Venable
            Path:
            src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java
            http://jenkins-ci.org/commit/m2release-plugin/456179363429f366e3bacc28bd8290986aae7a0b
            Log:
            [FIXED JENKINS-12076] The build parameter for the number of release builds to keep was not being saved and thus not used.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: David Venable Path: src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java http://jenkins-ci.org/commit/m2release-plugin/456179363429f366e3bacc28bd8290986aae7a0b Log: [FIXED JENKINS-12076] The build parameter for the number of release builds to keep was not being saved and thus not used.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: David Venable
            Path:
            src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java
            http://jenkins-ci.org/commit/m2release-plugin/e7633cb63acea8781e55b97d23480e0efd201fdc
            Log:
            JENKINS-12076 Corrected the name of the public setter for numberOfReleaseBuildsToKeep.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: David Venable Path: src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java http://jenkins-ci.org/commit/m2release-plugin/e7633cb63acea8781e55b97d23480e0efd201fdc Log: JENKINS-12076 Corrected the name of the public setter for numberOfReleaseBuildsToKeep.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: jtnord
            Path:
            src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java
            http://jenkins-ci.org/commit/m2release-plugin/a46f076df1c2cbcbb6d2577e27053148644f714c
            Log:
            Merge pull request #10 from dlvenable/fix-number-of-releases-to-keep

            [FIXED JENKINS-12076] Correctly save "number of release builds to keep" parameter

            Compare: https://github.com/jenkinsci/m2release-plugin/compare/2e22caafe9cb...a46f076df1c2

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: jtnord Path: src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java http://jenkins-ci.org/commit/m2release-plugin/a46f076df1c2cbcbb6d2577e27053148644f714c Log: Merge pull request #10 from dlvenable/fix-number-of-releases-to-keep [FIXED JENKINS-12076] Correctly save "number of release builds to keep" parameter Compare: https://github.com/jenkinsci/m2release-plugin/compare/2e22caafe9cb...a46f076df1c2
            Hide
            metyl Maciej Matys added a comment -

            How does it work, now I see 'Number of successful release builds to keep' with default value 0, moreover latest release build is NOT locked.

            Show
            metyl Maciej Matys added a comment - How does it work, now I see 'Number of successful release builds to keep' with default value 0, moreover latest release build is NOT locked.
            Hide
            teilo James Nord added a comment -

            See inline help, or comments above.
            If unclear please use the mailing list.

            Show
            teilo James Nord added a comment - See inline help, or comments above. If unclear please use the mailing list.
            teilo James Nord made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            Hide
            metyl Maciej Matys added a comment -

            There is no inline help only this message ERROR: Failed to load help file: Not Found

            Show
            metyl Maciej Matys added a comment - There is no inline help only this message ERROR: Failed to load help file: Not Found
            Hide
            teilo James Nord added a comment -

            Please raise an issue with your Jenkins version and setup info for the lack of help.

            If the number is -1 then all builds are kept. a positive number will keep that many sucessfull release builds. Any other number (< -1 or 0) will cause no release builds to be kept

            Show
            teilo James Nord added a comment - Please raise an issue with your Jenkins version and setup info for the lack of help. If the number is -1 then all builds are kept. a positive number will keep that many sucessfull release builds. Any other number (< -1 or 0) will cause no release builds to be kept
            metyl Maciej Matys made changes -
            Link This issue is blocking JENKINS-18215 [ JENKINS-18215 ]
            Hide
            metyl Maciej Matys added a comment -

            Issue created and linked, thx for info.

            Show
            metyl Maciej Matys added a comment - Issue created and linked, thx for info.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 142348 ] JNJira + In-Review [ 205540 ]
            teilo James Nord made changes -
            Assignee James Nord [ teilo ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tabmow Terry Sposato
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: