Menu

Trigger Jenkins

Overview

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.

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

Pulse Rules v9.0

Pulse Rules v9.1

TriggerJenkins.js

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

Setup Pulse Rule

  1. Review the 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. 
    Note: For the most up to date sample program code, view the QASymphony/PulseRules repository linked above.

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 v9.0

emitEvent=Update the values with a $ and all caps.

If you'd like to notify Slack that your Jenkins build has been triggered, fill out the variable with the Slack Event name. If not, remove the emitEvent line from this action.

Example: In triggerJenkins.js, please replace 

  • $YOUR_SLACK_EVENT_NAME

 

Pulse Rules v9.1

Variables do not need to be updated for Pulse 9.1 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 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. 
    Note: For the most up to date sample program code, view the QASymphony/PulseRules repository linked above.

Variables

Pulse Rules v9.0

emitEvent=Update the values with a $ and all caps.

Example: In CucumberJenkinsExecuteShell.sh, please replace 

  • $YOUR_PULSE_RULE_EVENT_URL
  • $YOUR_TEST_CYCLE_ID (where your test results will go in qTest Manager)
  • $YOUR_PROJECT_ID

Pulse Rules v9.1

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 your Jenkins repo 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 Build>Execute Shell section.
    jenkins_execute_shell_v2.png
  4. Enter the qTest Manager Project ID as the projectid value.
  5. Enter the qTest Manager Module ID as the test-cycleid value.
    Note: 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.
    object_ID_for_Jenkins.png
Powered by Zendesk