New

Integrating Torque with CircleCI

  • 19 April 2021
  • 0 replies
  • 79 views

To integrate Torque with the CircleCI plugin, make sure to complete all four steps, as detailed in this article:

Note that plugin only supports sandbox environments.

Step 1: Enable CircleCI to Use 3rd Party Tools

  1. On the Settings > Security page for your organization, enable use of 3rd-party orbs.
  2. 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 Torque in the CircleCI Config File

  1. Add a single line to your version 2.1 .circleci/config.yaml file:
    version: 2.1
  2. Import the orbs key in your .circleci/yml/config.yml file.
  3. Add the orbs stanza below your version, invoking the orb:
    orbs:
    cloudshell-colony: quali/cloudshell-colony@1.0.4

Step 3: Define Required Environment Variables for Torque

  1. While logged in to CircleCI, in a separate browser window In Torque, open the Settings page and select Integrations
  2. Under the CircleCI icon, select Connect.
  3. Copy the automatically generated token value and return to the CircleCI browser window.
  4. From your CircleCI dashboard, select Project Settings > Build Settings > Environment Variables.
  5. Add the following Environment Variables:

    CS_COLONY_SERVER< = The URL for the CloudShell Torque Server (https://app.qtorque.io)

    CS_COLONY_TOKEN = In CloudShell Torque, the automatically generated token from step 3

    CS_COLONY_SPACE = Your CloudShell Torque Space name

Step 4: Use Torque's Tasks in Your CircleCI Workflow

  1. In the config.yml, declare the cloudshell-colony/start-sandbox and cloudshell-colony/end-sandbox commands to start and stop the sandbox in Torque. Review examples here.
  2. See the parameters list for orb behavior command customization here.

To learn more about how to work with the Torque Orb, check out this live code example on Github. 

 


This topic has been closed for comments