Trigger Jenkins

This 'Pulse Rule' sample triggers a Jenkins Job using the API of Jenkins. Set up 'Rules' for your own 'Trigger' (webhook) and use the sample 'Actions' provided below.

Your Jenkins instance should be configured to allow a remote trigger. Verify with CURL before using this action from Pulse.

Pulse Rules

TriggerJenkins.js

Set up 'Rules' for your own 'Trigger' (webhook) and use the sample 'Actions' provided below.

Setup Pulse Rule

  1. Review the qTest Pulse Quick Start Guide for your version of Pulse for complete instructions on how to add Pulse Triggers, Actions, and Rules.

  2. Enter the sample Program Code in the Pulse Actions.

    For the most up-to-date sample program code, view the Pulse Rules repository.

Constants

Anything that uses constants.X will need your own constants value.

  • constants.JenkinsUserName

  • constants.JenkinsURL

  • constants.JenkinsJobName

The following Constants information is found within your Jenkins application.

  • constants.JenkinsJobToken

  • constants.JenkinsAPIToken

Variables

Pulse Rules

Variables do not need to be updated for Pulse by the user.

CucumberJenkinsExecuteShell.sh

This 'Pulse Rule' sample is used for the Jenkins Execution Post Build Shell Action Configuration for Cucumber for Java with .json output.  Set up 'Rules' for your own 'Trigger' (webhook) and use the sample 'Actions' provided below.

Setup Pulse Rule

  1. Review the qTest Pulse Quick Start Guide for your version of Pulse for complete instructions on how to add Pulse Triggers, Actions, and Rules.

  2. Enter the sample Program Code in the Pulse Actions.

    For the most up-to-date sample program code, view the Pulse Rules repository.

Variables

Pulse Rules

There are no variables that need to be updated.

Additional Jenkins Configuration 

In your Jenkins environment, you need to enter the qTest Manager Project ID and Module ID for where the Test Execution data will store. 

  1. Access the Jenkins repository you are using with Pulse.

  2. Select the Configure button on the left panel to open your Jenkins repo configuration.

  3. In the Build Environment tab, scroll until you locate the Execute Shell section.

  4. Enter the qTest Manager Project ID as the projectid value.

  5. Enter the qTest Manager Module ID as the test-cycleid value.

    The Project and Module ID are located in the qTest Manager URL specific to the object. Select the Object on the Manager UI and the numeric value at the end of the URL is the id. The Project ID and Module ID are different numeric values.