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

Artifactory Release Promotion should be able to mark build as promoted

      Hello,

      when using Jenkins Artifactory plugin, I have noticed that after doing Release promotion, build is not marked in any way. This way it is not possible to identify which builds were promoted in Artifactory from Jenkins side. Or am I looking at wrong direction?

      Also, it is desirable to mark "Keep this build forever", to prevent Jenkins deleting promoted build.

      At the moment I workaround this issue by using "Promoted builds plugin" and manually running promotion for the second time to have visual/scriptable identification mark on the build. This also allows to automatically mark build as permanent, however such process is error prone.

          [JENKINS-32497] Artifactory Release Promotion should be able to mark build as promoted

          As it seemed easy, I have tried to update plugin and it worked on a test Jenkins system without authentication. I have updated UnifiedPromotionBuildAction.java file and added build.keepLog(true) and build.setDescription() to protected void perform(TaskListener listener) function.

          On production Jenkins system with AD authentication enabled and Matrix security I have got an authentication error due to my updates. Matrix security provides only Workspace, Read, View permissions for anonymous user, which is intended and not likely to be changed.

          Question: Can anyone suggest where and how to enable this plugin to authenticate to Jenkins, when doing a promotion? Or should I add build update in some another place?

          Error:

          ERROR: anonymous is missing the Run/Update permission
          hudson.security.AccessDeniedException2: anonymous is missing the Run/Update permission
          at hudson.security.ACL.checkPermission(ACL.java:63)
          at hudson.model.Run.checkPermission(Run.java:1441)
          at hudson.model.Run.keepLog(Run.java:2136)
          at org.jfrog.hudson.release.UnifiedPromoteBuildAction$PromoteWorkerThread.perform(UnifiedPromoteBuildAction.java:298)
          at hudson.model.TaskThread.run(TaskThread.java:128)

          Cannot publish suggested patch yet due to internal legal mumbo jumbo, but it is in the process.

          Elvinas Piliponis added a comment - As it seemed easy, I have tried to update plugin and it worked on a test Jenkins system without authentication. I have updated UnifiedPromotionBuildAction.java file and added build.keepLog(true) and build.setDescription() to protected void perform(TaskListener listener) function. On production Jenkins system with AD authentication enabled and Matrix security I have got an authentication error due to my updates. Matrix security provides only Workspace, Read, View permissions for anonymous user, which is intended and not likely to be changed. Question: Can anyone suggest where and how to enable this plugin to authenticate to Jenkins, when doing a promotion? Or should I add build update in some another place? Error: ERROR: anonymous is missing the Run/Update permission hudson.security.AccessDeniedException2: anonymous is missing the Run/Update permission at hudson.security.ACL.checkPermission(ACL.java:63) at hudson.model.Run.checkPermission(Run.java:1441) at hudson.model.Run.keepLog(Run.java:2136) at org.jfrog.hudson.release.UnifiedPromoteBuildAction$PromoteWorkerThread.perform(UnifiedPromoteBuildAction.java:298) at hudson.model.TaskThread.run(TaskThread.java:128) Cannot publish suggested patch yet due to internal legal mumbo jumbo, but it is in the process.

          I'm having similar issues. I posted an email to the Artifactory mailing list but haven't received any response yet.

          Here's the post:
          http://forums.jfrog.org/Problem-promoting-build-with-jenkins-artifactory-plugin-td7580784.html

          I'd really appreciate some help on how I can get this working.

          Stefan Freyr Stefansson added a comment - I'm having similar issues. I posted an email to the Artifactory mailing list but haven't received any response yet. Here's the post: http://forums.jfrog.org/Problem-promoting-build-with-jenkins-artifactory-plugin-td7580784.html I'd really appreciate some help on how I can get this working.

          Patch to mark builds for promotion.

          Elvinas Piliponis added a comment - Patch to mark builds for promotion.

          As creating a pull request is too much for me due to legal mumbo jumbo (both from my employer and JFrog) I am posting patch here. If someone wants to use it, I am fine. I have got legal permission from my employer to post the patch upstream. It took two months to get approval. F*** corporate licensing and patent sh****! I am not going to make another round to clarify if I can sign JFrog CLA.

          See attached patch file and have a nice day.

          Elvinas Piliponis added a comment - As creating a pull request is too much for me due to legal mumbo jumbo (both from my employer and JFrog) I am posting patch here. If someone wants to use it, I am fine. I have got legal permission from my employer to post the patch upstream. It took two months to get approval. F*** corporate licensing and patent sh****! I am not going to make another round to clarify if I can sign JFrog CLA. See attached patch file and have a nice day.

            eyalbe Eyal Ben Moshe
            elvinas_p Elvinas Piliponis
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: