Jenkins
Jenkins can be connected to Stretchy by installing the Stretchy Jenkins Plugin.
With the help of the plugin, you can set up one or more Stretchy Clouds in a single Jenkins instance. Each Stretchy Cloud links Jenkins to a single organization in Stretchy.
Plugin Installation
Please see the chapter Managing Plugins in Jenkins’ documentation for instructions on how to install Stretchy Jenkins Plugin.
Connecting Jenkins with Stretchy
The first step is to create a connection in Stretchy Orchestrator:
-
Go to Connections, click on Add connection and select the connection type Jenkins.
-
Enter a memorable name of your choosing, the address of the Jenkins instance you want to connect, and a strong password that the Jenkins instance will use to authenticate to Stretchy Orchestrator.
-
Back in the list of connections, click on Set up next to the Jenkins connection you just created. Stretchy Orchestrator will display all necessary information to set up the Stretchy Cloud in Jenkins.
The second step takes you to Jenkins, where you have to set up a Stretchy Cloud:
-
Go to Manage Jenkins, Clouds. Click on Add Cloud.
-
Pick a memorable name of your choosing for the name of the cloud and select Stretchy as type before clicking on Create.
-
On the configuration page, enter the URL of Stretchy Orchestrator and the username and password as displayed by Stretchy Orchestrator.
Jenkins is now ready and set to send jobs to Stretchy.
The third and last step is to create at least one Jenkins project in Stretchy Orchestrator:
-
Go to Projects, click on Add project and select the project type Jenkins.
-
Select the previously created connection and enter a memorable name of your choosing before clicking on Create.
| Stretchy’s projects have no equivalent in Jenkins. Therefore, no particular mapping is enforced. Create as few or as many projects as it makes sense for you. The only requirement is that there is at least one project. |
Pipeline Configuration
To send jobs to Stretchy, add a Label Expression to your Jenkins pipeline configuration that directs the pipeline or stage to Stretchy.
Stretchy Orchestrator will happily generate a suitable label expression for you. In Stretchy Orchestrator, go to Projects and click on Set up next to the Jenkins project that the pipeline or stage should be routed to.
| You can route an arbitrary number of Jenkins pipelines or stages to a single project. |