-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins LTS 2.222.3 on Windows
jira-steps-plugin 1.6.0
Jira both on premise trial on linux using docker or atlassian cloud
I'm unable to download an attachment created using the JiraUploadAttachment pipeline command.
The Jenkins 2.222.3 I'm using is running on Windows 10 with the jira-steps-plugin 1.6.0 installed.
Here is a pipeline snippet:
jiraUploadAttachment idOrKey: 'NP-56', file: 'SRReport.zip', site: 'trial'
echo attachment.data.toString()
Both the issue and the attachment are successfully created, as it is visible on the Job output:
id:10115, key:NP-56, self:[http://jira.xxxx.net/rest/api/2/issue/10115 [Pipeline] jiraUploadAttachment JIRA: Site - test - Attaching file: D:\Jenkins\jobs\My Pipeline\workspace\SRReport.zip to NP-56 Successful. Code: 200
I can see the attachment opening the Jira task, but the link is using the full path and it is not downloadable, getting an error 400
- The full link is: https://jira.xxxx.net/secure/attachment/10015/D%3A%5CJenkins%5Cjobs%5CMy%20Pipeline%5Cworkspace%5CSRReport.zip
- The error message is*Type* Status Report
Message Invalid URI
Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
- I'm able to download the file changing the URL to https://jira.xxxx.net/secure/attachment/10015/anything_i_want
- the download file has the fullpath as filename: D__Jenkins_jobs_My Pipeline_workspace_SRReport.zip
I was not able to find how to change the uploaded file name to not contain the full path