3

I have two jobs in Jenkins, one is chained to the other. The first Job compiles a project and stores a temp "archived" zip file. If the build job is successful the second job is triggered which copies the archived item from the first job to the second job. This is done so that only successful builds are saved.

I don't want the second build to have a 'Schedule Build' button, as it should NEVER be manually triggered. I do not want to 'hide' the build in another view, just disable the 'build' button.

haysclark
  • 1,080
  • 8
  • 16

2 Answers2

3

I haven't tried this, but one way to do this would be to enable Project-based Matrix Authorization Strategy in the Authorization Section of Manage Jenkins and uncheck Build option for all users for the specific job that you do not want to be built manually.

Raghuram
  • 51,854
  • 11
  • 110
  • 122
  • That would work; if you want to disable "Build Now" for all users, you can just set the permissions for the Anonymous and Authenticated groups rather than specifying the permissions for each user. – gareth_bowles Nov 28 '11 at 16:27
  • Any other alternative? My Jenkins is already configured with "Matrix-based security" and I don't want to alter it. – Baskar Oct 27 '14 at 23:33
2

Checkout Job Restrictions Plugin

Ankur Agarwal
  • 23,692
  • 41
  • 137
  • 208
  • 2
    You should mention that this still allows the job to be manually triggered, but it will be aborted immediately with an error: _"Build will be aborted: Manual launch is prohibited"_. It doesn't disable the manual trigger button. – ADTC Jan 09 '18 at 20:53