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 created issue -

          Oleg Nenashev added a comment -

          "Approve" text definitely comes from another location: https://github.com/jenkinsci/promoted-builds-plugin/blob/adfdf61f362fb79cf2e04c14524f460a4d2f41d2/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/index.jelly#L19

          Regarding the requirements, both ones require some development on the plugin side.
          It's a new feature, feel free to implement it and to create a pull request.

          Oleg Nenashev added a comment - "Approve" text definitely comes from another location: https://github.com/jenkinsci/promoted-builds-plugin/blob/adfdf61f362fb79cf2e04c14524f460a4d2f41d2/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/index.jelly#L19 Regarding the requirements, both ones require some development on the plugin side. It's a new feature, feel free to implement it and to create a pull request.
          Oleg Nenashev made changes -
          Assignee Original: Oleg Nenashev [ oleg_nenashev ]
          Oleg Nenashev made changes -
          Issue Type Original: Task [ 3 ] New: New Feature [ 2 ]

          ayan bose added a comment -

          Thanks a lot Oleg.
          We will make this change and send you the pull request in a day or two. You should get the pull request from nuupuradathiya@gmail.com.

          ayan bose added a comment - Thanks a lot Oleg. We will make this change and send you the pull request in a day or two. You should get the pull request from nuupuradathiya@gmail.com.
          ayan bose made changes -
          Assignee New: ayan bose [ ayan_b23 ]

          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_b23 ayan bose
            ayan_b23 ayan bose
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: