Build a job only with one specific user on one particular slave

Issue

  • Build a job only with one specific user on one particular slave

Environment

Resolution

This job needs to be inside a folder so you can use the CloudBees Folder Plus Plugin to assign the slave to a folder.

Our documentation explains how to assign a folder to a slave step by step.

By default, Jenkins triggers all the builds as SYSTEM user, so in order to configure projects to run with specified authorization you need to install the Authorize Project plugin.

Once the plugin is installed, you need to go to http:///configureSecurity/ and enable Access Control for Builds -> Configure Build Authorizations in Project Configuration -> Run as User who Triggered Build

Now, for each project the following property needs to be enabled:

After this, only users with Slave->Build permission will be able to build on this particular project for a particular slave. Only users with Slave->Build permission will have access to build on any controlled slave.

If you want to isolate the user who has access to a particular job so they cannot build other jobs inside folders with controlled slaves, you might want to declare this user at folder level and then assign the Slave->Build permission.

NOTE: In case you are on a CJOC environment notice that the Authorize Project plugin will need to be installed and configured at client master level.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.