Prior to setting up a controller, you must configure the availability pattern for bundles and specify bundles that can be assigned to controllers from the controller configuration screen.
|Once you have configured bundle availability and set up a controller, users with the Configure permission can access the controller configuration screen to assign a different bundle to the controller.|
|CasC bundle validation is automatically performed when the bundle is added to the operations center. If problems are detected, error and warning messages are displayed on the Configuration as Code bundles screen. For more information, refer to Troubleshooting CasC for controllers.|
To configure the bundle availability:
Ensure you are signed in to the operations center as a user with the Administer permission.
From the operations center dashboard, in the left pane, select Manage Jenkins.
Select Configuration as Code bundles. For each bundle, the following attributes are displayed:
Bundle name: The bundle name. It matches the name of the directory containing the bundle in the filesystem.
Used by: The names of controllers assigned to the bundle.
Availability pattern: The full path to one or more controllers in the operations center that can use the bundle.
Save: When selected, the bundle uses the availability pattern defined in the UI and the icon is displayed.
Clear: When selected, the bundle uses the availability pattern defined in the
bundle.yamlfile and the icon is displayed.
Available for: Controllers that can be assigned to the bundle based on the Availability pattern.
Define the Availability pattern for the controller. This is the full path to the controllers that can use the bundle and specifies the bundles you can assign to a controller from the controller configuration screen. The availability pattern must be a regular expression and use the Java implementation of regular expression pattern matching.
Table 1. Availability pattern examples Example scenario Example Availability pattern
A controller with the name "casc-controller" created directly in the root of operations center.
A controller with the name "casc-controller" created inside the "folder1" folder.
Two controllers with the name "casc-controller-1" and "casc-controller-2", created directly in the root of operations center.
Any controller in the "folder1" folder.
All Team controllers
When defining the availability pattern, you have the following options:
Option 1 (default): Define the availability pattern in the
bundle.yamlfile and select Clear. The icon is displayed. For more information, refer to bundle.yaml.
Option 2: Define the availability pattern in the Availability pattern field and select Save. The icon is displayed.
Option 3: Leave the Availability pattern field empty. Under Settings, select the Availability pattern checkbox and select Save. When the Availability pattern field is empty, the bundle can be used by any controller. This option provides more flexibility, but is less secure.
Optionally, select a Default bundle to pre-select a bundle in the controller configuration screen when setting up a new controller.
Selecting a Default bundle does not assign the bundle to a controller. When setting up a new controller, you must select Save or Apply from the controller configuration screen to assign the pre-selected bundle to the controller.