Skip to main content
Integrate with Jenkins

Learn how to integrate Jenkins with the Cutover platform.

Cutover Documentation Team avatar
Written by Cutover Documentation Team
Updated over 10 months ago

Jenkins is an open-source automation server that enables developers around the world to reliably build, test, and deploy their code. Jenkins can be implemented in-cloud as well as on-premise—Cutover is able to integrate with both setups. Use Cutover to gain visibility across your organization into complex, sequenced Jenkins jobs that can be configured in Cutover with or without additional parameters for an easy way to build the process that will seamlessly execute your next application release.

Prerequisites


You will need to have a self-hosted Jenkins Server URL (Endpoint) and a Jenkins Authentication token. You will also need the email address and username of the user with API access.

Permissions


To enable the integration, the Integrations Admin role is needed. Please contact your Customer Success Manager (CSM) for assistance in setting this up.

Integration features


Using Cutover, connect to Jenkins and trigger ‘jobs’, allowing you to perform work such as building software packages and running tests. Simply select the associated Jenkins Task Type to configure the Jenkins task. The Task Details panel can be edited to include the Jenkins automation information.

Add a Jenkins connection


Navigate to Settings > Integrations.

Any previously configured integrations will be displayed on the Integrations Connections page.

Note: If you have not previously added integrations, this page will be blank.

To find out more about our integrations, click Learn more at the top of the Integrations Connections page. To create your new predefined integration, click on + Create integration.

The New Integration Connection window displays. Click on the Predefined integration radio button.

The definition of a predefined integration is displayed. Predefined integrations are restricted to cloud to cloud authorisation and have predefined parameters.

Note: Please see our Developer Portal Integration pages if you would prefer to set up an integration based on your own requirements, authorisation and authentication.

Click in the Integration field to search for an integration. You can type the integration name or scroll to search.

Note: You will first need to create the integration before adding the integration action, as illustrated by the steps listed below.

Enter the following details:

  • Name: A default name is added however this can be manually changed in the Name field. The name entered here is what is displayed in the task edit panel when the integration is added

  • Image URL: This field is automatically populated

  • Base URL: The endpoint URL of your Jenkins integration

  • Username: Enter the user name associated with your Jenkins account

  • Password or Auth token: Enter the Jenkins auth token from Jenkins

When you have finished, click CREATE. The newly created integration will be listed at the bottom of the Integrations Connections page.

Add an integration action item


Select your newly added Jenkins connection and open the Edit Jenkins panel. Click New.

In the New Jenkins Action modal, complete the following details:

  • Action: Select the action you would like the integration to execute. The available action is Build Jenkins Job.

  • Name: Enter the specific Jenkins name for the action. This is what you will search for when you want to add this action to your runbook.

  • Image URL: Enter the image URL for your action item.

  • Trigger: Select the trigger for the action. The current available trigger is On Task Start. The integration will trigger when your task has been started.

  • Visibility: Select what workspace the integration is assigned to in this drop-down menu. In the drop-down, browse the available workspaces in your Cutover instance. By default, this field is set to “Global.”

Plus there are Additional Settings options:

  • Auto start: The task will automatically start upon the task's predecessor completing, without requiring manual intervention to get it underway. If the trigger is “On Task Start“ then this also means that the integration will fire automatically.

  • Enable fixed start time: It will be possible to add a fixed start time in a runbook’s editing panel for the task; this means the task can only be started at the day and time that has been set.

  • Cancelable: It will be possible to cancel a task during its execution.

  • Notify Webhook on Cancel: On task cancellation, an HTTP request will send an abort/cancel message to the specified URL.

Important: Aborting an integration prevents any further integration actions from being executed but will not stop any process that the integration has initiated when invoking the third-party API.

  • Finish task on success: The task will finish when the integration’s status is set to success.

  • Include context in Request: The outbound payload request will contain information about the runbook and task.

  • Execute in Rehearsal: The task can be executed when the runbook is in rehearsal mode.

Note: The Jenkins action item automatically includes custom fields, which are displayed under ‘Integration action custom fields’, as illustrated via the image below.

When you have finished, click CREATE.

Edit a Jenkins integration and action


Click on your Jenkins connection on the Integration Connections page to edit it. The Edit Jenkins panel will appear.

The integration name, image URL, and any other fields can be edited as needed. In addition to editing the integration details, you can edit any action within the integration itself by clicking the small cog icon next to the trigger details:

Clicking the cog will open an edit form for the integration action where all the default and custom settings are stored:

When you have finished editing, you can click Save or Discard to abandon any changes that have been made.

Use your integration


After your integration has been created, head over to an existing runbook or create a new runbook. Next, add a task—when adding a new task type, scroll and select the Jenkins integration you’ve created from the drop-down menu.

Fill in the exact Jenkins Job name and any additional Build parameters you wish to pass to Jenkins in the associated fields prior to starting the task — The Build status field is not user configurable but will display information returned from Jenkins while the Task is running.

Once the Integration is configured, save the Task. Next, start your runbook or task by clicking the Play icon located in the right upper-hand corner of your runbook to execute your integration.

The Jenkins task in Cutover will execute the job in Jenkins (using any additional parameters specified), and the status showing the progress of the integration will appear in the Build Status field.

These statuses are: Connecting, Queued, Build percentage, and Completed. These statuses are also shown in the Task status area.

If there is a failure with the integration due to the incorrect data being supplied, the Jenkins server will respond with an error which will display in Cutover against the integration task. These are errors such as:

  • Incorrect authorization - This means there is an error in your build parameters.

  • Incorrect Jenkins URL - This means that the Jenkins server is invalid or unreachable.

  • Incorrect job name - This means that the #{job_name} may not exist.

Once the job is finished in Jenkins, the task will be completed automatically in Cutover, and the next Task becomes available for execution.

Did this answer your question?