New

Launching a Sandbox from TeamCity Pipeline

  • 19 April 2021
  • 0 replies
  • 55 views

After installing and configuring the TeamCity plugin, you can launch sandboxes from your TeamCity Pipeline. Note that this plugin only supports sandbox environments.

Use the available build steps to create a sandbox from any blueprint, retrieve its details, start your tests and end the sandbox when it's no longer needed.

Launching a Sandbox from your Pipeline

Open TeamCity and perform the following steps: 

  1. Open any project’s Build Configuration Settings page and click Build Steps.
  2. Click Add Build Step.
  3. Select Colony as your Runner Type and update the following parameters:
    • Colony Action: Select Start Sandbox.
    • Space: Enter the name of your Torque space.
    • Blueprint Name: Enter the name of the environment blueprint. 

      NOTE: To specify one of Torque’s sample blueprints, use a [Sample] prefix, i.e: [Sample]Java Spring Website AWS EU (Ireland) or [Sample]Java Spring Website Azure (West US).

    • Sandbox Name: Enter a name for your sandbox.
      NOTE: Make sure this name will allow you to easily find it in the future. 
    • Artifacts: If your blueprint requires artifacts, enter a comma separated list of artifacts in the following format: [artifact name]=[artifact location].
    • Inputs: If your blueprint requires inputs, enter a comma separated list of inputs in the following format: [input name]=[input value].
    • Leave Sandbox Up: Define whether Torque should keep the sandbox up or terminate it in case of a deployment error.
    • Timeout: Set the timeout for this step. If your sandbox will not be ready when this timeout is reached, Torque will abort the deployment.
    • (Output) Sandbox Id Parameter Name: Define the name of the parameter in which Torque will return the ID of the new sandbox. The Sandbox ID is required to stop this sandbox in the ‘Stop Sandbox’ build step.
    • (Output) Sandbox Data Parameter Name: Define the name of the parameter in which Torque will return the sandbox's details. You may query this parameter to get instances' IP addresses, ports and other infrastructure details you need to properly run your tests.
    • Connectivity Details (Domain Name or IP, Port and Token): These parameters allow you to override the project’s connectivity details. Normally you will not need to use them.

NOTE: In AWS environments, the applications may be inaccessible immediately after the environment becomes Active. This issue should resolve itself within a few moments when the AWS DNS propagation process completes.

Ending a Sandbox from your Pipeline

Open TeamCity and perform the following steps: 

  1. Open a project’s Build Configuration Settings page and click Build Steps.
  2. Click Add Build Step.
  3. Select Colony as your Runner Type and enter the following parameters:
    • Colony Action: Select Stop Sandbox.
    • Space: Enter the name of your Torque space.
    • Sandbox ID: Enter the ID of the sandbox you wish to end.
    • Connectivity Details (Domain Name or IP, Port and Token): These parameters allow you to override the project’s connectivity details. Normally you will not need to use them.

This topic has been closed for comments