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 Colony Sandbox.
To view the built in documentation of the Jenkins Plugin, please follow these steps:
- In Jenkins' web UI, open your project's page.
- Click Pipeline Syntax and then Global Variable Reference.
For reference, here's an example of a pipeline that starts a Colony 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.
Comments
0 comments
Please sign in to leave a comment.