jenkins architect support - suggestion needed - jenkins

the problem i have is i have two different teams.
team 1 : support 800 applications
team 2 : 400 application
i want them on jenkins , but i want to keep there jobs seperate so team 1 can only see there jobs , while team 2 can only see there jobs.
is there where i can have one jenkins instance and then two slaves ? where one slave see only team 1 applications jobs, and slave 2 sees only team 2 application jobs. ?
any suggestion to which direction i can start looking into will help.
any plug in i can look at ?

I don't think a slave will do what you want. You are trying to control who can see the jobs. You could configure certain slaves to run certain jobs, but all jobs are still viewable through master.
Take a look at the Folders plugin. You can give each team a folder and separate access so they can only see the folder for their team.

#adam,
Same answer to your other question.
Use Jenkins Role Strategy Plugin.
This plugin adds a new role-based strategy to ease and fasten users
management. This strategy allows:
Creating global roles, such as admin, job creator, anonymous, etc., allowing to set Overall, Slave, Job, Run, View and SCM permissions on
a global basis.
Creating project roles, allowing to set only Job and Run permissions on a project basis.
Creating slave roles, allowing to set node-related permissions.
Assigning these roles to users.
Hope that helps.

Related

Create a read-only user UCD and UCB

I'm trying to create a read-only user at certain applications in urbancode deploy and ubuild, just to monitor some builds and deployments triggered from continous integration process.
Is there any shortcut to this requirement? or do i have to configure everything from scratch, like realms, roles, permissions and team?
thanks in advance
You will need to create a role to do this. You don't need another realm. In configuring the role, you'll specify the permissions that role is allowed (read only for what you want).
Then, create a team to map to that role. You'll then add the LDAP groups or members to that team. Should only take about 15 minutes to configure.

Share Jenkins credentials across multiple TFS projects

Is there a way to share Jenkins service endpoint credentials across multiple TFS projects? We have close to 30 projects, and each build requires us to configure the same set of credentials.
I would like to set an environment variable or something that would allow us to manage those credentials in one place for all TFS projects.
For a specific project, you click the gear here:
And then enter the credentials here:
This is not possible yet, there is a Feature Request about it, you can up vote there.
To automate the process you can create the Jenkins endpoints with the Rest API Endpoints - Create.
No. Service connections are scoped at the Team Project level. Team Projects are intended to be largely isolated from one another, so there is limited ability to share things between them. If you need to manage a service endpoint across many projects, you'll need to look at the REST APIs and write a programmatic solution.

Jenkins role / group based UI to isolate build jobs

We have got a requirement in Jenkins to our new instance, there are around 10 teams who use it and I'm looking if I could setup security strategy setup to separate out users:
Each team/group should be able to view/manage their own build jobs etc.
Should be able to manage their own transformations.
How can this be achieved?
Try Role Strategy Plugin.
From plugin info:
This plugin adds a new role-based strategy to ease and fasten users management. This strategy allows:
Creating global roles, such as admin, job creator, anonymous, etc., allowing to set Overall, Slave, Job, Run, View and SCM permissions on
a global basis.
Creating project roles, allowing to set only Job and Run permissions on a project basis.
Creating slave roles, allowing to set node-related permissions. Assigning these roles to users.
I would recommend Role-based Authorization Strategy plugin. I'm using it and it works well.
This plugin adds a new role-based strategy to ease and fasten users management. This > > strategy allows:
Creating global roles, such as admin, job creator, anonymous, etc.,
allowing to set > Overall, Slave, Job, Run, View and SCM permissions
on a global basis.
Creating project roles, allowing to set only Job
and Run permissions on a project basis.
Creating slave roles,
allowing to set node-related permissions.
Assigning these roles to
users

Jenkins - Role based authentication - Sing up with default role

I am setting up a Jenkins instance to run static-code-analysis for many projects. Each projects, on their own, create their code-analysis-jobs with their SCM and branches. I have the Role Strategy Plugin plugin installed but struck configuring the system with the below criteria.
The project leads should be able to signup the Jenkins and create/view/modify/run the jobs they only created. (Is it possible for this lead-role user to create user of developer role?)
The developers can view/build the jobs which they have privileges.
The project leads can assign the developers with jobs they can view/run.
How to do this, if at all possible? If not, how other ways you all do it considering the Jenkins to allow users signup, create/manage/run only their jobs (securing the jobs from other users)? (Also, the signed user should not be allowed to administer the Jenkins)
EDIT-1: I have an admin role (myself) user who has the all privileges to configure the system, but the admin to perform the role assignment of every user who signup.
The Role Strategy Plugin should suffice your request.
It even has regex pattern based setting where a user can only see certain projects.
I have been using this plugin extensively and its really helpful.

How do I jenkins permission on a per job basis?

Some jobs push to QA and some jobs push to Production.
Only devs should be allowed to push to QA and only QA should be allowed to push to production. Aside from making two separate build servers (with some way to share artifacts) how do I restrict permissions?
You need Project-based Matrix Authorization Strategy in Global Configuration, and on the Job Configuration, use Enable Project-based Security.
It's all explained here
Standard Security Explained
You have to manage restrictions with the tools that Jenkins provides.
If you have administrator status go to "Jenkins configuration" (picture 1) and then to "Manage and assign roles" (picture 2). Here you will see "Manage roles" and "Assign roles".
Use "Manage roles" to create/update roles and assign permissions to determined projects and also to manage the restrictions of each job.
Use "Manage and Assign roles" to assign roles to users or to other groups.
Role/permission matrix:
Thus you can configure groups to administrate determined jobs, to execute other jobs or to simply have the ability to visit and see job details.
You can use matrix-based security to achieve this.
Make sure the user account is created
Do not add that user to the global configuration security but do have project matrix enabled security enabled and authenticated users read access
Now go to the job and add that user and choose read.
You can now see that the user has only access to that specific job
I just found the ownership based security method for doing per-job and per-node permissions. Not applicable in all situations but sometimes very useful - like when other teams are running few jobs on your team's instance.

Resources