Unable to add an asset link to an existing release
Summary
I would like to add an asset link (using --assets-link) to my existing GitLab release.
However release-cli is unable to do perform this action. The API does allow this. Here is an example using the GitLab API (POST request):
curl --request POST \
--data name="Asset name" \
--data url="https://example.com/downloads/asset.tar" \
"https://gitlab.com/api/v4/projects/$project_id/releases/$tag_name/assets/links"
Steps to reproduce
Trying to use the release-cli update:
release-cli --job-token ${CI_JOB_TOKEN} --project-id ${CI_PROJECT_ID} update --tag-name YOUR_TAG_NAME_ --assets-link '[{"name":"Asset1","url":"https://example.com/some/location/1","link_type":"other","filepath":"xzy"}, {"name":"Asset2","url":"https://example.com/some/location/2"}]'
This command will fail because release-cli doesn't allow you to provide --assets-link with update.
Example Project
I was trying to use release-cli on my own project to replace my custom bash scripting.
What is the current bug behavior?
Missing asset link feature in release-cli update.
What is the expected correct behavior?
Also support adding asset links to an existing release.
Possible fixes
Just support the parameter on your release-cli command and use the GitLab API as shown in my curl example above.
~"devops::release" ~"group::release" GitLab Release CLI Category:Release Orchestration
Edited by Melroy van den Berg