Skip to main content
Version: Release 24.1

Create a Jenkins Task

This topic describes how to create a Jenkins task in Release, enabling integration with Jenkins to trigger builds and deployments.

Set up a Jenkins Server

To set up a Jenkins Server:

In Release, from the navigation pane, go to Configuration> Connections and click image under Jenkins: Server.

note

You can configure Jenkins servers on a folder level in Connections tab of the desired folder.

  1. In the Title field, enter the name of the Jenkins server. This name will display in Jenkins tasks.

  2. In the URL field, enter the URL of the Jenkins server.

  3. Two authentication methods available, do one of the following:

    • enter the server login Username and Password.
    • enter the server login Username and API token.
  4. Click Test for test the connection with server.

  5. Click Save.

    Authentication using Username/Password

    Authentication using Username/API Token

Create a Jenkins Task

With the Release Jenkins task you can run a Jenkins job that is triggered when the task becomes active. The task will complete when the job completes successfully on the Jenkins server; otherwise, the task will fail.

The options for the Jenkins task are:

OptionDescription
ServerThe Jenkins server where Release connects. You can configure Jenkins servers in Connections under the Configuration group of the navigation pane. You can configure Jenkins servers on a folder level in Connections tab of the desired folder.
UsernameOptional user name to use when connecting to the Jenkins server. Use this property to override the user that was configured on the Jenkins server.
PasswordOptional password to use when connecting to the Jenkins server. Use this property to override the password that was configured on the Jenkins server.
API TokenOptional api token to use when connecting to the Jenkins server. Use this property to override the api token that was configured on the Jenkins server.
Job NameThe name of the job that will be triggered. This job must be configured on the Jenkins server. If the job is located in one or more Jenkins folders, add a job segment between each folder. Example: For a job that is located at Applications/web/my portal, use Applications/job/web/job/my portal.
Job ParametersIf the Jenkins job requires parameters, you can provide them, one parameter per line. The names and values of the parameters are separated by the first = character.
BranchThe branch name for which the build is to be kicked off. For a Freestyle project, enter the branch as master

The output properties of the task are Build Number and the Build Status. They can be stored in a variable, for example ${buildNumber} and ${buildStatus}.

In the release flow editor, Jenkins tasks are marked with a blue border.

For more information about using Jenkins with Release, see Using the Release plugin for Jenkins.

Change the poll interval

Release will schedule the execution of the scripts and poll for the availability of a resource according to a configurable interval. The default poll interval is 5 seconds. You can change this behavior by configuring the interval in the XL_RELEASE_SERVER_HOME/conf/xl-release.conf file. See the configuration options for using scripts.

note

Changing the default polling interval will affect all custom script tasks, including the Jenkins task.