To integrate Torque with 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 Torque in the CircleCI config file
- Step 3: Define required environment variables for Torque
- Step 4: Use Torque’s tasks in your CircleCI workflow
Note that plugin only supports sandbox environments.
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 Torque in the CircleCI config file
- Add a single line to your version 2.1 .circleci/config.yml 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 Torque
- While logged in to CircleCI, in a separate browser window In Torque, 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:
TORQUE_SERVER = Torque Server URL (https://app.qtorque.io)
TORQUE_TOKEN = In Torque, the automatically generated token from step 3
TORQUE_SPACE = Torque space name
Step 4: Use Torque's tasks in your CircleCI workflow
- In the config.yml, declare the torque/start-sandbox and torque/end-sandbox commands to start and stop the sandbox in Torque. Review examples here.
- See the parameters list for orb behavior command customization here.