Below are CI/CD examples for GitHub, GitLab, BitBucket, and CircleCI. The examples illustrate using pipelines to automate the build, test and deploy phases. Two examples per source control system are provided. One using Terraform and the other using the CLI. TheDocumentation Index
Fetch the complete documentation index at: https://docs.controlplane.com/llms.txt
Use this file to discover all available pages before exploring further.
README.md in the examples provide instructions for using the respective pipeline. These examples are provided as a starting point and your own unique delivery and/or deployment requirements will dictate the steps needed in your situation.
Terraform
Control Plane provides a Terraform plugin allowing you to build your Control Plane infrastructure declaratively. The following examples include the plugin installation instructions, containerizing and pushing an app to the org’s private image registry and a sample Terraform configuration file defining a GVC and a workload.Examples
- The GitHub and Bitbucket example uses the Terraform Cloud to store the state file.
- The GitLab example leverages their managed Terraform state backend to store the state file.
CLI
The CLI apply command creates and updates Control Plane resources. The command can be used in a pipeline to manage the deployment of an application. It takes as an input a JSON or YAML file containing the properties of the resource to manage. The command can accept a YAML file containing multiple resources. Each resource must be separated using---. If a resource has a reference to another resource (e.g., a workload refers to a GVC), the referenced resource must be defined in its own file and processed in order.
If the name of an exisiting resource is changed, the cpln apply command will create a new resource. Any orphaned resources will need to be manually deleted.
The examples below include installation of the CLI, containerizing and pushing an application to the org’s private repository. The examples contain two sample YAML files. One that manages a GVC, and one for a workload.