Connect a source control provider
Setting up an SCM Connection in Plural to integrate with Github, GitLab, or BitBucket
Overview
Plural has the ability to spawn pull requests, post review comments, and other functionality to integrate with your standard SCM (Source Control Management) workflows. The most impactful of these is the PR Automation api, which allows you to spawn templated pull requests to do common tasks like:
- provision new clusters
- drive deployment pipelines
- in conjunction with Stacks, provision associated kubernetes or cloud infrastructure (databases, IAM, networks)
To get this working you'll first need to give your Plural Console scoped access tokens to your SCM.
Prerequisites
Some things you'll need to run this tutorial:
- Plural Console
admin
Permissions - SCM Provider Personal Access Token
- SCM Provider Organization
admin
Permissions- This is only required when creating the webhook
- The workload cluster can still be created without the SCM webhook
Create a New SCM Connection
Creating an SCM Connection is easiest just using our UI. You can then reference that created resource via k8s CRD to drive other workflows. Step by step, you'll want to:
- Navigate to
https://{your-console-domain}/pr/scm
- Click the Create Connection Button at the Top Right
- Fil in the Required Fields
- Provider Type: The SCM Provider Hosting Git Repositories
- Name: Reference Name for the Provider
- ℹ️ NOTE: The cluster-creator PR Automation looks for
github
by default, but is arbitrary and can be changed
- ℹ️ NOTE: The cluster-creator PR Automation looks for
- Token: The Personal Access Token to use.
- Click
Create