Hey everyone! I’m trying to figure out how to change Jira issues directly from my Jenkins pipeline script. I know there’s a Jira Issue Updater plugin, but I’m not sure if I can use it as a step in my pipeline.
I could use the Jira REST API, but I’d rather use the plugin if possible. It would be great if I could do something like this:
I’ve implemented a similar solution in our CI/CD pipeline. The Jira Issue Updater plugin is indeed a viable option for your use case. Here’s a more robust example that might help:
This approach allows for more flexible issue updates, including adding comments. Remember to configure the Jira site in Jenkins global configuration. Also, ensure your Jenkins has the necessary permissions in Jira to make these changes.
I’ve actually tackled this issue in my previous job. While the Jira Issue Updater plugin is great, I found using the Jira REST API gave me more flexibility and control. Here’s a snippet that worked well for me: