jenkins.yaml
This file is the main Configuration as Code configuration file that describes a controller or operations center configuration.
For more information on how to format this file, refer to the Jenkins Configuration-as-Code plugin documentation.
Example jenkins.yaml file
jenkins.yaml for a controller
jenkins: systemMessage: "Controller configured using CloudBees CasC" numExecutors: 0 securityRealm: ldap: configurations: - displayNameAttributeName: "cn" groupMembershipStrategy: fromGroupSearch: filter: "member={0}" groupSearchBase: "ou=Groups" inhibitInferRootDN: false managerDN: "cn=admin,dc=example,dc=org" managerPasswordSecret: ${LDAP_MANAGER_PASSWORD} rootDN: "dc=example,dc=org" server: "ldap://ldap-openldap:389" userSearchBase: "ou=People" disableMailAddressResolver: false groupIdStrategy: "caseInsensitive" userIdStrategy: "caseInsensitive" authorizationStrategy: "cloudBeesRoleBasedAccessControl"(1) globalCloudBeesPipelineTemplateCatalog:(2) catalogs: - branchOrTag: "main" scm: git: credentialsId: "credentials-id" id: "cf504eg3-4y5d-34w2-97b1-2q7xt2nm9731"(3) remote: "git@github.com:company/project-alpha.git" updateInterval: "1d"
1 | Required to use CloudBees RBAC configured using CasC. |
2 | Required if using CasC to create a job based on a Pipeline Template Catalog. |
3 | Required property that defines the unique ID for the SCM repository where the Pipeline Template Catalog is stored. |
jenkins.yaml for an operations center
jenkins: systemMessage: "Operations center configured using CloudBees CasC" numExecutors: 0 securityRealm: ldap: configurations: - displayNameAttributeName: "cn" groupMembershipStrategy: fromGroupSearch: filter: "member={0}" groupSearchBase: "ou=Groups" inhibitInferRootDN: false managerDN: "cn=admin,dc=example,dc=org" managerPasswordSecret: ${LDAP_MANAGER_PASSWORD} rootDN: "dc=example,dc=org" server: "ldap://ldap-openldap:389" userSearchBase: "ou=People" disableMailAddressResolver: false groupIdStrategy: "caseInsensitive" userIdStrategy: "caseInsensitive" authorizationStrategy: "cloudBeesRoleBasedAccessControl"(1) security: securitySettingsEnforcement: global: realmAndAuthorization: canCustomMapping: false canOverride: true defaultMappingFactory: "restrictedEquivalentRAMF" controllerExecutorCount: enforce: canOverride: false count: 0 cloudBeesCasCServer: visibility: true(2) unclassified: cascAutoControllerProvisioning: provisionControllerOnCreation: true(3) fireAndForget: true(4) initialDelay: 15 (5) timeout: 600(6) duration: 60(7) location: url: https://operations-center:8888/(8) bundleStorageService:(9) activated: true activeBundle: name: "local-folder" retriever: SCM: scmSource: git: id: "acf88621-05a0-4d50-9166-d7767868dc43" remote: "https://github.com/my-company/repo.git" traits: - "gitBranchDiscovery" pollingPeriod: 0 purgeOnDeactivation: false
1 | Required to use CloudBees RBAC configured using CasC. |
2 | Optional if using the items.yaml file to create a controller item. When visibility is set to true , all CasC bundles that do not have an availability pattern defined can be used by any controller. This option provides more flexibility, but is less secure. |
3 | When provisionControllerOnCreation is set to true , all managed controller items are provisioned automatically after they are created using CasC. |
4 | When fireAndForget is set to true , the automatic provisioning process starts immediately, and does not wait for the controller to be connected. |
5 | The amount of time, in seconds, to wait before starting the automatic provisioning process. |
6 | The amount of time, in seconds, to complete the automatic provisioning process. If fireAndForget is set to false , this timeout may prevent queued provisioning requests from being blocked. |
7 | The provisioning duration, in seconds. After the initial delay, controllers are provisioned at random in batches of 20 controllers, for this time period. Increase this value to increase the amount of time between controller provisioning requests. If provisioning more than 20 controllers, the provisioning process will exceed the specified duration. |
8 | Required to create client controller items. The url is the operations center URL. |
9 | Required if using a local folder on the operations center server or an SCM tool as the Configuration as Code bundle location. |