Flow Designer has a built-in step to start a build in Jenkins, enabling you to automatically build a project in response to upstream steps in the flow.
Adding Jenkins steps to your flow
- To add a Jenkins step to your flow, go to the Apps panel in the palette, expand the Jenkins section and drag the step onto the canvas.
- Connect the step to the previous step in the flow. This lets you access any event properties and outputs of previous steps when configuring the inputs.
- Double-click the step to edit it, and use the Setup tab to configure the inputs. You can use plain text, input variables, or a combination of both. See the sections below for detailed information on the inputs.
- If you include request parameters in the Build Parameters Query String input, make sure you URL encode the string.
- On the Run Location tab, set where you want the step to run: in the cloud or on an xMatters Agent installed behind your firewall.
- On the Endpoint tab, configure an endpoint that points to your Jenkins instance (or, if you already have one, select it from the list).
- To configure a new endpoint:
- Enter the base URL of your Jenkins instance (for example, https://jenkins.example.com).
- In Authentication, add the credentials of a user with permissions to build the project: enter their Jenkins username in the Username field and an API token created for that user in Jenkins in the Password field. You must use an API token as the password; using the user's Jenkins login password will result in errors. If you want to authenticate using the login password, check out the Jenkins step over on xMatters Labs.
- Make sure Preemptive is selected before saving the endpoint configuration.
Use the Build Project step to automatically start a build in Jenkins in response to previous steps in the flow. You can map outputs from previous steps to the inputs to dynamically set the values at runtime.
Inputs with an asterisk* are required.
The absolute path to the project or pipeline to build (for example, orion/job/betelgeuse/)
The path cannot contain spaces; if it does, Jenkins will return an error when the step runs.
Build Parameters Query String
Add any build parameters you want to append to the request as a single string, making sure you URL encode the string (for example, delay=10s&message=for%20Antares). Confirm that
your project expects build parameters; if you include parameters and the project does not expect them, Jenkins will throw an error when the step runs.
This step has no outputs.