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 controller (CJEMM)
-
CloudBees Jenkins Enterprise - Operations Center (CJEOC)
-
CloudBees Jenkins Platform - Client controller (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)
-
Enable the Restrict the kind of children in this folder property
-
Select the Pipeline type only
-
Save
-
-
Create a new Folder Template at root level (let’s call it TeamFolder)
-
Add as description; for example:
Create a Folder with restricted job types list
-
Configure it with your specific needs
-
Save
-
-
Go back to the FolderSample configuration
-
Select the new TeamFolder type as well as Pipeline in Restrict the kind of children in this folder section
-
Save
-
-
Go back to the TeamFolder configuration
-
From Transformer section, fill the Load Prototype Job field with
FolderSample
and click on Load -
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.