0

We have a created a Job in jenkins.

How can i give run permission to a user for this specific build Job.

I have referred some Jenkins sites but not got a clear understanding.

Thanks

Amit
  • 143
  • 5
  • 17

1 Answers1

1

If you are using Job DSL Plugin, then the easiest way you could specify per job permission would be to utilize Project-based Matrix Authorization Strategy (Manage Jenkins / Configure Global Security) and DSL script like the one below:

// adds the build permission for the special anonymous user
job('example-2') {
    authorization {
        permission('hudson.model.Item.Build', 'anonymous')
    }
}

Additionally, by setting Project-based Matrix Authorization Strategy you will be able to change project's permission manually, straight from job's configuration page.

luka5z
  • 7,525
  • 6
  • 29
  • 52