Using the Jenkins Spoke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 12:49 PM
So I am just starting to try and use Flow Designer for integration. We currently use Jenkins as well as ServiceNow. Is there a guide that will walk me through how to call a job or perform a build? I am just looking for a basic guide to get started. Thank you for any help.
- Labels:
-
Orchestration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 12:52 PM
you can use below to get started
https://www.youtube.com/watch?v=03xJ_l93b8s
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 12:56 PM
So this video is all about qtest. I need to know how to use Flow Designer and the Jenkins spoke.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 11:46 PM
Hi Bill,
Here is the Jenkins Spoke Guide documentation:
The bare minimum actions you would use to test performing a build would be the following:
1. Get CSRF Token Action
2. Perform a Build Action
What I would do is make copies of those actions and then configure the required parameters like Connection Alias for the "Get CSRF Token Action" and Job Path for the "Perform a Build" Action.
**be sure to publish those newly created actions or you won't be able to use them in any Flows. Also make sure you have already created your Jenkins Connection and Credential Alias as stated in the ServiceNow Documentation I gave the link for above.
Once you have published the actions, go into Flow Designer and make a simple Flow that uses them.
**hint, I usually use Run Once as my trigger when first making Flows and testing them out.
! notice that I used the "CSRF Token" Data Pill that was the output of the "Jenkins Test - Get CSRF Token" Action in the CSFR Token Parameter Field of the "Jenkins Test - Perform a Build" Action. Just pull it over and drop it in.
Example of a *very* simple Flow that would invoke a Jenkins build.
-here is also the documentation for Jenkins that talks about Remote API Access. Might help you have issues calling the Jenkins API. https://wiki.jenkins.io/display/JENKINS/Remote+access+API
I hope that helps to get you started.
Cheers,
Ezra

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2020 12:37 AM
Hi Ezra,
I tried executing action Get CSRF Token which return value. But when the Build still fails with the error as No valid CSRF token was included in the request.
I did include in the script section of Perform a Build Action, along with including it in the inputs & input variables , csrf_token.
Script::
(function execute(inputs, outputs) {
inputs = new JenkinsUtils().trimStringInputs(inputs);
outputs.csrf_token = inputs.csrf_token;
Is there any other place where i need to include the csrf_token other than the script section of Perform a Build Action ?