Check how the Jenkins pipeline script calls the CloudShell Colony API

Let’s check how Jenkins is configured to call the Colony API. The Jenkins Sandbox you deployed earlier preloaded the Colony plugin that provides pre-defined functions (Groovy code) that you can call when defining a new script.

Note: If you have an existing Jenkins instance, you would install and configure the Jenkins plugin for Colony from the Colony Integrations page and follow these instructions.

1. Click on the “demo” link to the pre-loaded pipeline script. 40_page 2. Click on Configure. 40_page 3. Navigate to the Pipeline tab. Note that the “Use Groovy Sandbox” box is checked. 40_page 4. Scroll down the script until you reach the “Integration Tests” stage. You use the startSandbox() method to run sandbox from a blueprint passing all needed parameters. 40_page 5. Then, once the sandbox is ready, you use the getEndpoint() function to take application endpoint, which could be used to perform some tests (not covered by this job). 40_page 6. At the end you terminate the sandbox with the endSandbox() method, and move on to the next stage. 40_page For more information, you can check out the detailed syntax of these functions in our documentation.