Setting Up Jenkins Integration

DUE MID-FEBRUARY 2020: Now, there are two new parameter types: Multi-Line String and Run Parameter.

Jenkins is a cross-platform, open-source build automation tool for delivery pipelines. Whether your goal is continuous integration or continuous delivery Jenkins can help automate it.

In order to retrieve the list of parameters for each job, the following Jenkins plugins – Build with Parameters and Extended Read Permission must be installed on your instance of Jenkins. The user configured on the Jenkins integration setup in Plutora must have the Extended Read permission. 


1. Set up Jenkins to trigger builds remotely

To build an environment with a single click, using Plutora and Jenkins:

  1. Open Jenkins.
  2. Click a blue-linked job Name.
    Click to open an item in Jenkins red arrow
  3. Click Configure.
    Click Configure in Jenkins red arrow
  4. Click to select the Trigger builds remotely (e.g., from scripts) checkbox.
    Build Triggers Jenkins red arrow
  5. Type an Authentification Token.
  6. Click Save.


2. Enable Plutora’s Jenkins integration and Create and Enable a New Jenkins Integration

To enable Jenkins Integration and create and enable a new Jenkins integration:

  1. Go to Settings > Customization > Integrations.
  2. Click Jenkins.
  3. Click to select the Enable Jenkins Integration checkbox to toggle on Jenkins Integration.
  4. Click + New Jenkins Instance at the bottom of the left-hand panel.
  5. Type the Jenkins URL.
  6. Type the Username. (Mandatory field.)
    Username was previously called Login
  7. Type the Password/Token. (Mandatory field.)
    Now, you can use either a Username and Password or a Username and API Token to authenticate. 
  8. Click Test Connection.
    If the connection fails, check the Jenkins URL, username, and password or token.
  9. If the connection is successful, click Create.
  10. Enable the new instance by clicking the OFF toggle switch in the left-hand panel until it is blue and ON.


3. Enable Jobs

Jenkins Integration now retrieves only the top-level (root) folder of Jenkins jobs and the contents of folders are only retrieved when clicked. This minimizes the level of data coming back in response requests and prevents timeouts.

To enable Jenkins jobs in the new Jenkins instance:

  1. Click Fetch Jobs. The Job Names column should populate with jobs and jobs folders.

    Jenkins now retrieves a job token at runtime, so there is no need to predefine one.
  2. Click to select the job checkboxes to enable the jobs.

    Only enabled jobs will appear in the available jobs list in Environments.
  3. Click Save.


4. Select and Sequence Jenkins Jobs

Jenkins integration is no longer required to use Continuous Delivery Pipeline.

To select and sequence the Jenkins jobs to be used by an Environment:

  1. Go to Environment > Manager.
  2. Click to open an Environment.
  3. Click the Release Automation tab:
    • In the left-hand panel are all the jobs that were enabled in Jenkins Integration.
    • In the right-hand Build Sequence panel are the jobs that will be run, in order from top to bottom.
  4. Click to select the Enable Automation checkbox.
  5. Manage Jenkins jobs:
    1. Add jobs:
      1. Drag and drop Jenkins jobs from the left-hand panel to the right-hand Build Sequence panel.
    2. Order jobs:
      1. Drag and drop the Jenkins jobs in the right-hand panel to sort them into build sequence. The jobs at the top of the list are executed first.
    3. Remove jobs:
      1. Click the red X beside the job to remove it from the sequence. (The job will not be deleted.)


5. Choose the Displayed Version Number

Now that Plutora handles more than one Jenkins instance and many jobs, the administrator has to choose which job’s Version Number will display under the Environment’s Details tab in the Technical Specs and Configuration panel, and in the Continuous Development Pipeline where all the selected jobs will be run, but only the selected job’s version number will appear.

To choose the version number job:

  1. Click to select a checkbox beside a job in the Build Sequence panel.
  2. Click Save.


6. Define Parameters

  1. Add Parameter values:
    1. Click  + Parameters on a Jenkins job in the Build Sequence panel.

      • The Parameters for that job are retrieved from Jenkins.
      • Parameter String Query displays the full list of all the defined Parameters. It is not editable like a text field.
      • Only the following Parameter types are currently supported:
        • Boolean.
        • Choice.
        • Password.
        • String.
        • Text.
        • Multi-Line String.
        • Run Parameter.
    2. Type or select a value for the Parameters.
    3. Click Save & Close.


7. Select a Component to Update

Now set which of the Environment’s components will be updated:

  1. Click the Environment’s Details tab.
  2. Click to select the Summary Version checkbox of the Component which is updated by the job:

  3. Click Update on Build.

    The component’s icon becomes a Jenkins icon.

    • The component’s Version will contain a build version number when a build is initiated.
    • Only one Component can be active with Jenkins at a time.
  4. Click Save & Close.


8. See Plutora and Jenkins in action!

  1. Go to Environment > Requests.
  2. Click the TECR tab.
  3. Click a blue link to open a TECR.
    Environments in the Progression Path of the TECR will contain the Jenkins icon.

    The buttons below the Jenkins icon have the following functions:

    • Jobs: Opens the fields that are also found in the Environment’s Release Automation tab. See sections 4-6 above for how to fill them in.
    • Build: If there is a build that is “Ready to build”, clicking Build will start it.  The “Ready to build” status bar will show the numbered progress through the jobs, for example, 2 of 5.
    • View History: Shows the list of logs from each build. Each job has its own log.
  4. Click Build to trigger the job execution.
  5. Once the job is complete, Jenkins will update the Environment component’s version number.
    • Plutora Analytics has a Jenkins Executions data cube located under Home / Environments. Track the number of times Jenkins executions have run, for which Environment, for how long, whether the result was a success or a fail, and more.
    • Currently, data created by Jenkins, such as the build version number, will only exist in Plutora if triggered by Plutora. Any changes made in Jenkins alone will not flow back into Plutora. (Unless the user is viewing the versions in the Pipeline.)


Back to the top arrow

Be the first to find out about new features. Subscribe to the Release Notes email. Subscribe Now
8 found this helpful.