New

Launching a Sandbox from Jenkins Pipeline

  • 19 April 2021
  • 0 replies
  • 113 views

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

To use the plugin, you will need to instantiate a Blueprint object with using the colony global object. This object can then be used to start or end a Torque Sandbox. 
To view the built in documentation of the Jenkins Plugin, please follow these steps: 
  1. In Jenkins' web UI, open your project's page.
  2. Click Pipeline Syntax and then Global Variable Reference.
    Jenkins-global-variable-reference-new.png

For reference, here's an example of a pipeline that starts a Torque sandbox:

def sandbox
 def artifacts = [:]
 def inputs = [Input1:"value1", input2:"value2"]
 
 sandbox = colony.blueprint("SpaceName", "BlueprintName", "SandboxName", "PT2H", artifacts, inputs, 15).startSandbox()

Where Input1 and Input2 are the input names of the blueprint, "PT2H” is the sandbox's scheduled uptime (2 hours, ISO 8601 format) and the timeout to create is 15 minutes

To learn more about creating a blueprint, see The Blueprint YAML File.

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.


This topic has been closed for comments