-
This can not be published to artifacts folder as a file, unless to write some code to get list of fixed issues via restful api. Curious why need to publish this to artifacts folder?
-
I am attempting to automate the build revision history file so that I can package a txt file with the bug fixes and changes in it. This can then be bundled with the artifacts and published together. often in our business the installers are waiting for a specific bug fix or added feature and this would allow then just to read the build-history.txt file.
-
Below build spec can be used to publish fixed issues as file. You may use your own docker image instead of
1dev/build-environmentas long as your docker image has curl and jq installed. Also make sure to add a job secretaccess tokenwith value set to an access token allowed to access these restful apis.version: 37 jobs: - name: ci steps: - !CommandStep name: build runInContainer: true image: 1dev/build-environment:1.6 interpreter: !DefaultInterpreter commands: | build_id=$(curl -H "Authorization: Bearer @secret:access token@" -G @server_url@/~api/builds --data-urlencode 'query="Number" is "@project_path@#@build_number@"' --data-urlencode offset=0 --data-urlencode count=1 | jq '.[0].id') fixed_issue_ids=$(curl -H "Authorization: Bearer @secret:access token@" -G @server_url@/~api/builds/${build_id}/fixed-issue-ids | jq '.[]') for issue_id in $fixed_issue_ids; do issue_title=$(curl -H "Authorization: Bearer @secret:access token@" -G @server_url@/~api/issues/${issue_id} | jq -r '.title') issue_type=$(curl -H "Authorization: Bearer @secret:access token@" -G @server_url@/~api/issues/${issue_id}/fields | jq -r '.Type') echo $issue_type - $issue_title >> fixed_issues.txt done useTTY: true condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL - !PublishArtifactStep name: publish fixed issues artifacts: fixed_issues.txt condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL retryCondition: never maxRetries: 3 retryDelay: 30 timeout: 14400 -
Thank you Robin, great work.
-
Previous Value Current Value Open
Closed
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
How can I publish a list of issues fixed in a build to the build artifacts folder?