Trying to use release-cli from .gitlab-ci.yml, it looks to me like the command line isn’t assembled correctly for Powershell.
The following (normally the url is a package link build from variables, but I also tried this one with a fixed dummy url to see whether I fail at that point)
#option to manually push a tagged commit to production
Release:
stage: release
#to not let the pipeline wait if noone klicks this
allow_failure: true
when: manual
only:
- tags
needs:
["SaveBuild"]
dependencies:
["SaveBuild"]
script:
- echo Will do release
release:
name: 'Release $CI_COMMIT_TAG'
description: 'ReleaseDetails.md'
tag_name: '$CI_COMMIT_TAG'
ref: '$CI_COMMIT_SHA'
assets:
links:
- name: 'Release binaries'
url: 'http://git.com'
link_type: 'package'
used from windows/powershell runner leads to
...
$ release-cli create --name "Release $CI_COMMIT_TAG" --description "ReleaseDetails.md" --tag-name "$CI_COMMIT_TAG" --ref "$CI_COMMIT_SHA" --assets-link "{\"name\":\"Release binaries\",\"url\":\"http://git.com\",\"link_type\":\"package\"}"
time="2021-07-05T13:56:56+02:00" level=info msg="Creating Release..." cli=release-cli command=create name="Release 00.07" project-id=102 ref=18683a0eccbe2f078e55e8c90c2755f3ed632ad7 server-url="..." tag-name=00.07 version=0.6.0
time="2021-07-05T13:56:56+02:00" level=fatal msg="new CreateReleaseRequest: failed to parse assets: invalid JSON: \"{\\\\\"" cli=release-cli version=0.6.0
So it seems to me that the JSON string is no given in the correct format because powershell likes to fuck up the quotes.
I also tried to use the notes added here:
To do it by hand. This resulted in a call which looked a lot like the one created by the “release” yml entries, but my resulting scripts also failed. In the moment (after a lot of different tries at escaping the quotes correctly) I fall back to --assets-links-name and --assets-links-url since they don’t rely on an argument being a valid JSON String.
Has anyone seen this working on a powershell runner or is it a new issue?