we have a JIRA-Jenkins pipeline where Attachment should be provided from Jira to Jenkins job .
So, Once required Transition of the workflow is clicked, the attachment will be provided from JIRA to the corresponding Jenkins job , which will be triggered and do its work, where aforementioned attachment will be used.
I am aware that there is concept of custom_fields which are mapped to corresponding parameters defined in Jenkins job, with help of Groovy script. Here, issue is there is NO custom_field for attachment as such in Jira form , which can be used to map it to our ‘file parameter’ in Jenkins job in “This project is parameterized” option.
The ask here is what should be used in Groovy script for assigning this attachment to file_parameter in Jenkins job?
I got to know there is some JIRA API which can be used to achieve this. As in, once transition is triggered , corresponding JIRA API will be assigned to a variable , which in turn will be mapped to this “FILE Parameter” in Jenkins job.
But need to have more insight about this specific JIRA API.
Please help.