Issue
Administrators need to control which types of job that can be created in a folder.
The goal is to restrict the types of job available in a folder and its sub-folders.
Environment
- CloudBees Jenkins Enterprise - Managed Master (CJEMM)
- CloudBees Jenkins Enterprise - Operations Center (CJEOC)
- CloudBees Jenkins Platform - Client Master (CJPCM)
- CloudBees Jenkins Platform - Operations Center (CJPOC)
- CloudBees Folder plugin
- CloudBees Folder Plus plugin
- CloudBees Templates plugin
- CloudBees RBAC plugin
Resolution
Let’s make available the Pipeline job type only.
- Create a new Folder (let’s call it FolderSample)
a. Enable the Restrict the kind of children in this folder property
b. Select the Pipeline type only
c. Save - Create a new Folder Template at root level (let’s call it TeamFolder)
a. Add as description; for example:Create a Folder with restricted job types list
b. Configure it with your specific needs
c. Save - Go back to the FolderSample configuration
a. Select the new TeamFolder type as well as Pipeline in
Restrict the kind of children in this folder section
b. Save - Go back to the TeamFolder configuration
a. From Transformer section, fill the Load Prototype Job field withFolderSample
and click on Load
b. Save
You are now able to create a Folder based on this new template.
Let’s call it TeamARootFolder.
From this folder, when you click on New Item, the available types are
Pipeline and TeamFolder only.
For all sub-folders, these two types will be the only ones available.
Of course, you are available to define the Group(s) that is(are) allowed to
access these folders.
0 Comments