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

Can I change the button label "Approve" to something else in promoted build plugin

      Can I change the button label "Approve" to something else in promoted build plugin?

      I am using promoted-build-plugin and I created a promotion process. In that process I am getting a button called "Approve". After analyzing, it appears that this button label ("Approve" for the first time and 2nd time onwards it appears as "Re-execute promotion") is coming from plugins/script-security/WEB-INF/lib/script-security.jar file.

      My requirements are:

      1. Can I add a new button called "Reject" may be by using some extension plugin or by adding some customization? On that button click, I want to reject the promotion process.
      2. If above is not possible, I am trying to use a choice parameter for "Approve" or "Reject" and use this exiting button to execute the promotion based on choice selection. Can I change the label of this button (may be "Execute") by any configuration or using some extension?

          [JENKINS-36146] Can I change the button label "Approve" to something else in promoted build plugin

          ayan bose added a comment -

          Hi oleg_nenashev, We are ready with the change. Can you please help us to create a branch for us so that we can put our changes and create a pull request for you? Also give me (ayan_b23@yahoo.co.in) and Nuupur (nuupuradathiya@gmail.com) write access for that branch.

          ayan bose added a comment - Hi oleg_nenashev , We are ready with the change. Can you please help us to create a branch for us so that we can put our changes and create a pull request for you? Also give me (ayan_b23@yahoo.co.in) and Nuupur (nuupuradathiya@gmail.com) write access for that branch.

          Oleg Nenashev added a comment -

          ayan_b23 In Jenkins project we commonly use another approach based on GitHub forks. So you could fork the repo in GitHub to your account, push changes there and then create a pull request from the fork

          Oleg Nenashev added a comment - ayan_b23 In Jenkins project we commonly use another approach based on GitHub forks. So you could fork the repo in GitHub to your account, push changes there and then create a pull request from the fork

          ayan bose added a comment -

          Thanks oleg_nenashev

          While creating the pull request today after fixing our side of code, we found that the build is still failing due to some test-case failure. We also tried removing all our changes and build the master code; that also lead to the same failure. This implies that the failing test case ConfigurationDoCheckTest has some problem.

          Please find the promotion links as below:

          Latest pull request of our changes: https://github.com/jenkinsci/promoted-builds-plugin/commit/3aeb44a4265b9fa87d51bc3c1101da64af3db408

          Please check and let us know.

          ayan bose added a comment - Thanks oleg_nenashev While creating the pull request today after fixing our side of code, we found that the build is still failing due to some test-case failure. We also tried removing all our changes and build the master code; that also lead to the same failure. This implies that the failing test case ConfigurationDoCheckTest has some problem. Please find the promotion links as below: Master code (without our changes): https://jenkins.ci.cloudbees.com/job/plugins/job/promoted-builds-plugin/318/console Master code + our changes: https://jenkins.ci.cloudbees.com/job/plugins/job/promoted-builds-plugin/316/ Latest pull request of our changes: https://github.com/jenkinsci/promoted-builds-plugin/commit/3aeb44a4265b9fa87d51bc3c1101da64af3db408 Please check and let us know.

          Oleg Nenashev added a comment -

          Don't care about this test right now. There is a known issue on the PR builder side. To be fixed

          Oleg Nenashev added a comment - Don't care about this test right now. There is a known issue on the PR builder side. To be fixed

          ayan bose added a comment -

          Commit link: https://github.com/jenkinsci/promoted-builds-plugin/commit/8a51bf50493841b91f29f994b0ae191b1567b9d5
          Please review and merge this to master. Let us know in case of any comments.

          ayan bose added a comment - Commit link: https://github.com/jenkinsci/promoted-builds-plugin/commit/8a51bf50493841b91f29f994b0ae191b1567b9d5 Please review and merge this to master. Let us know in case of any comments.

          ayan bose added a comment - - edited

          ayan bose added a comment - - edited Updated pull request: https://github.com/jenkinsci/promoted-builds-plugin/compare/master...nuupur9:master

          ayan bose added a comment -

          oleg_nenashev: Can you please check the latest pull request and merge the code to master if it is good now?

          ayan bose added a comment - oleg_nenashev : Can you please check the latest pull request and merge the code to master if it is good now?

          ayan bose added a comment -

          Any update on the pull request which we created?

          ayan bose added a comment - Any update on the pull request which we created?

          Oleg Nenashev added a comment -

          Please stop reassigning the issue to me. Pings in GitHub are enough.
          The pull request is not ready to merge, my previous comments have not been addressed yet

          Oleg Nenashev added a comment - Please stop reassigning the issue to me. Pings in GitHub are enough. The pull request is not ready to merge, my previous comments have not been addressed yet

          ayan bose added a comment -

          We are addressing all the comments including addition of test-case. But for now, we will go ahead without localization change for approve button label (as it was currently also English hardcoded in jelly file). Once we get some time after our consumption of this change, we will take out some time to address this as well. Hope that should be fine; let us know.

          ayan bose added a comment - We are addressing all the comments including addition of test-case. But for now, we will go ahead without localization change for approve button label (as it was currently also English hardcoded in jelly file). Once we get some time after our consumption of this change, we will take out some time to address this as well. Hope that should be fine; let us know.

            ayan_b23 ayan bose
            ayan_b23 ayan bose
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: