Tutorial: Jira Trigger – new issue event listener
In this tutorial we will create a pipeline that will print out a log in the Kaholo console each time a new issue appears in your Jira project. We will Configure a trigger with a Jira account and a Command Line plugin with a console log of your choice.
I. Create a new blank pipeline.
First, if you’re not currently a Kaholo user, create a free account here, then create a new project and a new blank pipeline.
II. Create a Trigger
Go to Assets -> click on the Triggers -> “create new” button.
III. Configure the Trigger
Fill in the fields in a pop-up window that appears when you click on the Create New button..
Choose the Jira-trigger Plugin, and the “Jira new issue webhook” method. This method will allow Kaholo to watch a Jira board and execute a pipeline when a new issue appears in the project.
Fill in the Jira Project Key. You can find additional information on how to do that here. If you do not specify the Project Key, you will be notified about new issues added in any project.
IV. Add the Webhook to Jira
In your Jira project view, go to Settings -> System -> Webhooks.
Click on the “Create a Webhook” button and paste the Kaholo Webhook link, which you can find in the Trigger popup.
In the Jira Webhook configuration add the action that should trigger the Webhook, in this case, we’re using “Created”
V. Configure the Command Line plugin
Find the “Command Line” plugin in the Assets panel on the left side and drag and drop it onto the canvas. Choose the method called “Execute Command”.
In the Command switch the toggle button on and insert the code below:
"echo `console log`"
To test if your Webhook works properly, go to Jira and add a new issue to the backlog. You should now see the execution triggered by a Webhook in the Execution Results of the pipeline.
To find more details about the trigger, click on the link.
The window with the Trigger payload will pop up. You can find all the detailed information about the pipeline execution done by a selected trigger.