Closes #576 - RoleStrategy Demo
This commit is contained in:
parent
580a968b2e
commit
520d742577
|
|
@ -1,7 +1,7 @@
|
|||
# role-strategy-plugin
|
||||
|
||||
https://plugins.jenkins.io/role-strategy
|
||||
<https://plugins.jenkins.io/role-strategy>
|
||||
|
||||
## sample
|
||||
## sample
|
||||
|
||||
TODO
|
||||
Check out the example yaml file [role-strategy-auth.yaml] which is taken from the plugins' integration test resources <https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/integrations/src/test/resources/io/jenkins/plugins/casc/RoleStrategy1.yml>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
jenkins:
|
||||
[..]
|
||||
authorizationStrategy:
|
||||
roleBased:
|
||||
roles:
|
||||
global:
|
||||
- name: "admin"
|
||||
description: "Jenkins administrators"
|
||||
permissions:
|
||||
- "Overall/Administer"
|
||||
assignments:
|
||||
- "admin"
|
||||
- name: "readonly"
|
||||
description: "Read-only users"
|
||||
permissions:
|
||||
- "Overall/Read"
|
||||
- "Job/Read"
|
||||
assignments:
|
||||
- "authenticated"
|
||||
items:
|
||||
- name: "FolderA"
|
||||
description: "Jobs in Folder A, but not the folder itself"
|
||||
pattern: "A/.*"
|
||||
permissions:
|
||||
- "Job/Configure"
|
||||
- "Job/Build"
|
||||
- "Job/Delete"
|
||||
assignments:
|
||||
- "user1"
|
||||
- "user2"
|
||||
- name: "FolderB"
|
||||
description: "Jobs in Folder B, but not the folder itself"
|
||||
pattern: "B.*"
|
||||
permissions:
|
||||
- "Job/Configure"
|
||||
- "Job/Build"
|
||||
assignments:
|
||||
- "user2"
|
||||
agents:
|
||||
- name: "Agent1"
|
||||
description: "Agent 1"
|
||||
pattern: "agent1"
|
||||
permissions:
|
||||
- "Agent/Build"
|
||||
assignments:
|
||||
- "user1"
|
||||
|
||||
securityRealm:
|
||||
local:
|
||||
allowsSignup: false
|
||||
users:
|
||||
- id: "admin"
|
||||
password: "1234"
|
||||
- id: "user1"
|
||||
password: ""
|
||||
|
||||
nodes:
|
||||
- dumb:
|
||||
mode: NORMAL
|
||||
name: "agent1"
|
||||
remoteFS: "/home/user1"
|
||||
launcher: jnlp
|
||||
- dumb:
|
||||
mode: NORMAL
|
||||
name: "agent2"
|
||||
remoteFS: "/home/user1"
|
||||
launcher: jnlp
|
||||
Loading…
Reference in New Issue