0

I have jenkins instance running in a machine and i want to share with others the job i have created in it. I want them to clone and make changes to their job but not edit the config of my job.

I added the Extended Read Plugin in my jenkins instance. If I give Job/Configure permission for my job, others are able to clone it. But unfortunately it gives them the edit configuration permission for my job too which do not want.

Any suggestions to overcome this issue.

Sugan
  • 447
  • 1
  • 4
  • 16

1 Answers1

1

Let's imagine that your jenkins job is git repository.

  • You want to share with John your Job:
    • Git solution : Grant permissions to John in git web console.
    • Jenkins Solution: Create user for John in jenkins console.
  • I want John to clone and make changes to his job but I can not edit the settings of my job
    • Git solution : John must to create a branch based on master and to do whatever he wish without touch the master branch.
    • Jenkins solution: Create a new job based on origin job, using the copy from option. Grant read permission to John in the origin job and full access in the new job.

Copy from OPTION

copy from

Role Strategy Plugin

Here a simple way to restrict view of jobs per user

Community
  • 1
  • 1
JRichardsz
  • 14,356
  • 6
  • 59
  • 94
  • I want the users to clone the job by themselves. That being said, I tried using Role-Based Strategy as suggested in the above links. In Manage and Assign roles -> Global Roles i gave Read Access and in Project roles i gave the other permissions including configure for that project. – Sugan Mar 12 '19 at 11:18
  • But when the user tries to copy the job, it expects Job/Configure permissions in the Global roles. If i give that permission, the user is able to change the configuration of the original job. If i do not give I am not able to copy the job. Getting the below error. May not copy project as it contains secrets and user has Job/ExtendedRead but not /Configure – Sugan Mar 12 '19 at 11:25