-
New Feature
-
Resolution: Unresolved
-
Major
-
None
A typical workflow in the ASF is:
- upload patch to a Jira issue
- set state to Patch Available via Submit Patch
- Jenkins testing + human reviews
- upload new patch
- go back to step 3 until reviews are all positive and Jira is closed or work is abandoned
To enable this workflow, we currently handle the JIRA+Jenkins integration via the Apache Yetus' precommit-admin script located [here|https://github.com/apache/yetus/blob/master/precommit/src/main/python/jenkins-admin.py]. As more users move to pipeline jobs, authing via REST to trigger the other jobs is harder since Pipelines don't support token-based auth. Before we start reworking this code (likely as Groovy code that calls buildJob() via hackery), we thought we'd check in on what Jenkins plug-ins have to offer.
jira-trigger-plugin is the closest to handle this workflow. With it, checking the state is relatively easy (changelog matching, status = Patch Available). However, it doesn't appear that jira-trigger-plugin gives any sort of state of the attachment or that there was a new one uploaded. In fact, my attempts to debug this led to trying to setting the Parameter mapping to 'attachment' or anything closely related causing nothing getting executed. (I don't have access to the logs to see if there is a stack trace, but I suspect that there is.)
Hopefully I'm just missing something, but if not:
My feature request would be this: we need a way to trigger specifically on attachment changes and expose attachment details.
Thank you for the ticket. The jira-trigger-plugin is heavily relying on JIRA webhook feature, if the value that you are interested in is not available, it will not be available.
I understand that you have managed to get your job triggered with status = Patch Available. One way you can achieve what you need is by utilising the jira-trigger-plugin injected environment variable, JIRA_ISSUE_KEY. You can use the issue key to hit JIRA back to retrieve the attachment information you need.