Support use of PRIVATE-TOKEN to create releases using the CLI
Release Notes
In this milestone, we added the ability to use the release-cli
with a PRIVATE-TOKEN
as defined in Create a release API documentation. This enables overriding the user that creates a release to support automation by allowing connection of a project level PRIVATE-TOKEN
or using a bot user account's PRIVATE-TOKEN
.
Further details
The following discussion from !5 (merged) should be addressed:
-
@sean_carroll started a discussion: (+1 comment) @jaime in this case would we be passing
PRIVATE-TOKEN
via the command line?
release-cli
outside of the GitLab CI environment
Support using the In #9 (closed) we decided that the release-cli
will support creating releases using the JOB-TOKEN
read from CI_JOB_TOKEN
(see CI Environment Variables). This means that the CLI can only be used inside GitLab's CI environment.
We should allow users to use the release-cli
with a PRIVATE-TOKEN
as defined in Create a release API documentation.
Options
Some options are
-
separate the -token
option into-job-token
and-private-token
(would break compatibility if !6 (merged) gets merged first) or - [-] add a boolean option like
-ci
, when set then let the code decide if we setPRIVATE-TOKEN
orJOB-TOKEN
. So if-ci=true
default token value toCI_JOB_TOKEN
read from the env vars
Implementation
- Add support for
-private-token
!32 (merged)