After installing and configuring the TeamCity plugin, you can launch sandboxes from your TeamCity Pipeline.
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:
- Open any project’s Build Configuration Settings page and click Build Steps.
- Click Add Build Step.
- Select Colony as your Runner Type and update the following parameters:
- Colony Action: Select Start Sandbox.
- Space: Enter the name of your CloudShell Colony space.
- Blueprint Name: Enter the name of the environment blueprint.
NOTE: To specify one of CloudShell Colony’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 Colony 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, CloudShell Colony will abort the deployment.
- (Output) Sandbox Id Parameter Name: Define the name of the parameter in which CloudShell Colony 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 CloudShell Colony 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:
- Open a project’s Build Configuration Settings page and click Build Steps.
- Click Add Build Step.
- Select Colony as your Runner Type and enter the following parameters:
- Colony Action: Select Stop Sandbox.
- Space: Enter the name of your CloudShell Colony 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.
Comments
0 comments
Please sign in to leave a comment.