After installing and configuring the Azure DevOps (VSTS) plugin, you can launch sandboxes from your Azure DevOps (VSTS).
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.
In this article:
Preparing the Azure DevOps Build
- Open your visualstudio.com project.
- In the Build and release page, create a new build or edit an existing build.
- Create a New Task in one of your build agent’s jobs.
- In the New Task form search for CloudshellColony.
The following tasks are displayed:
- CloudShell Colony End Sandbox (ends a sandbox with CloudShellColony).
- CloudShell Colony Start Sandbox (starts a sandbox with CloudShell Colony).
NOTE: If you do not see above tasks, it means that the plugin was not successfully installed.
Launching a Sandbox
- Add the CloudShell Colony Start Sandbox task to your pipeline.
- Open the task settings and enter the following parameters:
- Service Connection – Enter "Colony." This is the name of the connection that you entered when you created the Colony service connection during the plugin configuration.
- Timeout - Set the timeout for this step, if your sandbox will not be ready when the timeout is reached, CloudShell Colony will abort the deployment.
- Space name - Enter a name for your CloudShell Colony space.
- Blueprint name - Enter the name of the blueprint you would like to use for creating this sandbox.
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 the sandbox
- Artifacts - If this blueprint has artifacts, you may specify them in a comma separated list of artifact names and their values; e.g., artifact1 name=value1, artifact2 name=value2
- Inputs - If this blueprint has inputs, you may specify them in a comma separated list of input names and their values; e.g., input1 name=value1, input2 name=value2
- Expand the Output Variable section and in the Reference name field, enter "Colony." CloudShell Colony uses this variable to return the following sandbox details:
- Colony.Sandbox_Id – The identifier of the created sandbox. You will use this identifier to end your sandbox when needed.
- Colony.Sandbox_Details – All the sandbox details including instances' IP addresses, ports and other infrastructure details required to properly run your tests. You may query this parameter to get the required information.
Ending a Sandbox from your Pipeline
- Add the CloudShell Colony End Sandbox task to your pipeline.
- Open the task's settings and enter the following parameters:
- Service Connection – Enter "Colony." This is the name of the connection that you entered when you created the Colony service connection during the plugin configuration.
- Space name - Enter the name of your CloudShell Colony space.
- Sandbox ID - Enter the ID of the sandbox you want to end. Use $(Colony.Sandbox_Id) to dynamically get the sandbox Id from the CloudShell Colony object that was returned from a Start Sandbox task.
Comments
0 comments
Please sign in to leave a comment.