These instructions are for use during installation only. Use these steps to configure a repository during installation. |
CloudBees CD/RO features options to configure GitOps repositories during Helm installation. These options allow devops administrators to:
-
Create repository plugin configuration(s) based on supplied credentials
-
Create source code synchronization object(s) (
scmSync
) for supplied repositories. For more information, refer to Adding a source code synchronization object. -
Attach a polling trigger to the
scmSync
object. For more information, refer to Configuring a trigger for source code synchronization.
Creating a values configuration for GitOps
You can configure GitOps support on CloudBees CD/RO during installation using the following values:
gitops: enabled: true repo: # Either specify the secret where the gitToken is stored under # the 'CBF_GIT_TOKEN' key (recommended for production) or specify gitToken: existingSecret:
Example configuration
In the following example, an scmSync
object is created in the GitOps project. This points to the sample GitHub repository, gitopsdemo, which creates a sample procedure as part of the Helm chart installation.
To create a GitOps configuration:
-
Create the secret to use in your GitOps configure-caption:
kubectl create secret generic my-gitops-token \ --from-literal=CBF_GIT_TOKEN='ghp_rdfdffdffdfdummmytoken' \ -n <namespace>
-
Append the GitOps configuration to your custom configuration (such as
myvalues.yaml
):gitops: enabled: true repo: https://github.com/flow-on-kubernetes/gitopsdemo.git existingSecret: my-gitops-token
Once configured, you can view the
scmSync
object on the Source code synchronizations page. ThescmSync
object is in the GitOps project.