To properly integrate the CircleCI plugin, make sure to complete all four steps, as detailed in this article:
- Step 1: Enable CircleCI to Use 3rd Party Tools
- Step 2: Declare Colony in the CircleCI Config File
- Step 3: Define Required Environment Variables for Colony
- Step 4: Use Colony's Tasks in Your CircleCI Workflow
Step 1: Enable CircleCI to Use 3rd Party Tools
- On the Settings > Security page for your organization, enable use of 3rd-party orbs.
- If your project was added to CircleCI before version 2.1, on the Project Settings > Advanced Settings page, enable "pipelines" to use the orbs key.
Step 2: Declare Colony in the CircleCI Config File
- Add a single line to your version 2.1 .circleci/config.yaml file:
- Import the orbs key in your .circleci/yml/config.yml file.
- Add the orbs stanza below your version, invoking the orb:
Step 3: Define Required Environment Variables for Colony
- While logged in to CircleCI, in a separate browser window In CloudShell Colony, open the Settings page and select Integrations.
- Under the CircleCI icon, select Connect.
- Copy the automatically generated token value and return to the CircleCI browser window.
- From your CircleCI dashboard, select Project Settings > Build Settings > Environment Variables.
- Add the following Environment Variables:
CS_COLONY_SERVER = The URL for the CloudShell Colony Server (https://cloudshellcolony.com)
CS_COLONY_TOKEN = In CloudShell Colony, the automatically generated token from step 3
CS_COLONY_SPACE = Your CloudShell Colony Space name
Step 4: Use Colony's Tasks in Your CircleCI Workflow
- In the config.yml, declare the
commands to start and stop the sandbox in Colony. Review examples here.
- See the parameters list for orb behavior command customization here.
To learn more about how to work with the Colony Orb, check out this live code example on Github.