Check how the Jenkins pipeline script utilizes Torque

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

Note: If you have an existing Jenkins instance, you would need to install and configure the Jenkins plugin for Torque. Follow these instructions to learn more.

1. Click the “demo” link to the pre-loaded pipeline script. 40_page 2. Click Configure. 40_page 3. Switch to the Pipeline tab (or scroll down to get to the pipeline script). Note that the “Use Groovy Sandbox” box is checked. 40_page 4. Scroll down the script until you reach the “Integration Tests” stage. We use the startSandbox() method to start a sandbox from a blueprint, passing all the needed parameters. 40_page 5. Then, once the sandbox is ready, we use the getEndpoint() function (which is defined further on in this script) to get new application endpoint url from the sandbox, which could be used later to perform some tests (not covered by this job). 40_page 6. At the end, we stop 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 methods in our documentation.