Jenkins create user Role Project permissions

Source: Internet
Author: User
Tags svn
Install role-based Strategy plugin

Plugin's official website documentation

1, after the installation of Plug-ins, into the System Settings page, configured as follows:

After saving, click on the System Admin page and click Manage and Assign roles to enter the role Management page:

1, Management Role (Manage Roles)
2, Role Permissions configuration

Here we go back to system Management – Managing Users:

Click New User:

If previous projects were connected to the SCM version management system (such as SVN, GIT, etc.) and acquired the source code, Jenkins would read some user information from SVN and see those users in the View User menu

Click on the corresponding user ID, then click the Settings button, you can change the password and other personal information.

Then we go back to Manage and Assign roles–> Manage Roles:

About the Pattern department fill in:

Official documentation This option supports regular expressions, such as roger-. Represents all items that start with roger-,
(? i) roger-.* represents items that begin with roger-and is case-insensitive.
Items that start with ABC can be configured as abc| Abc.*,
Official Documents > Https://wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin

We're going to configure assign Roles.

System Configuration –manage and Assign roles–assign Roles

Click Save, OK.
Consider the example above, the user name Zhougz only see items named Ggindex after logging in.

Because Jenkins is English, it is best to assign a picture of Jenkins permission;

The Pattern Department detailed

There ' s nothing so much as say here, this is self-explanatory. The only tricky field are the pattern one. This field consists in a regular expression aimed at matching the "full name" (including the folder name, if you ' re using Cl Oudbees Folders Plugin) of the jobs which the role would apply to. For example, if your set the field to "roger-.*", then the role would match all jobs which name starts with "roger-". Note this is case-sensitive. To perform a case-insensitive match, use (? i) Notation:upper, "roger-.*" vs. Lower, "roger-.*" vs. case-insensitive, "(? I ) roger-.* ". If you are have a nested folder structure where you want to provide the particular access to the second folder (or deeper), CO NSider has a TWO-LEVEL security structure as OK (Say you want to provide exclusive, write/modify type access to foo/b  Ar and not everything else under "foo": "A", "Assign" User/group to Read/discover permissions with pattern "^foo.* ", then assign that same user/group to the more parTicular permissions with the pattern "^foo/bar.*"-Similar to what your ' d do in a unix/linux environment. 

Chinese meaning:

There is nothing to say, it is self-evident. The only tricky thing here is pattern. This pattern is for job roles that match the full name of the regular expression (including the name of the folder, if you use the Cloudbees folder plug-in). For example, if you enter "roger-.*" in the pattern, the role will match all Jobs's name with "roger-". Note that this regular expression differs in case. If you don't want to be case-sensitive,
You can use the (? i) symbol: First letter uppercase "roger-." vs lowercase "roger-." vs. case insensitive
"(? i) roger-.*".
If you have a nested folder structure, you need to provide specific access to the second folder (or depth), consider having a level two security structure (say you want to provide exclusive write/modify type access Foo/bar and no other "foo": First, assign user/group read/Discover permission Mode "^ Foo." ", and then assign the same user/group more specific permission mode" ^ Foo/bar. "--something like what you would do in a unix/linux environment.

Reference address

Https://wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin
Http://www.cnblogs.com/love19791125/p/5113980.html
Http://www.cnblogs.com/davidwang456/p/3701972.html
Http://www.cnblogs.com/zz0412/p/jenkins_jj_14.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.