Skip to content

Development of Release CLI

Problem to solve

Effect the instruction in the :release node of .gitlab-ci.yaml. These instructions are converted into command line commands and passed to the Runner. The Runner then calls a to-be-developed CLI and passes the commands to it.

The MVC supports creation of a Release object in Rails, based on definitions in .gitlab-ci.yml. The Release is created with name and description. Description can be passed from a file inside the repo, eg: CHANGELOG.md

release_upload:
  image: registry.gitlab.com/gitlab-org/release-cli:v0.1.0
  script:
    - gitlab-releaser create --name="My Release" --description="My Release description"
  • Note: The CLI name and commands are not finalised.

Intended users

Proposal

Develop a Release CLI tool to implement .gitlab-ci.yaml instructions. The CLI will be developed in Golang and is launched in a Docker environment by the Runner. The commands will be assembled by the GitLab Rails and passed to this CLI by the Runner.

In this iteration, the Release CLI will:

The CLI will have access to all CI variables. The MVC will need to access two variables:

  • $CI_JOB_TOKEN - for authentication to the GitLab Releases API
  • $CI_PROJECT_ID - project ID in which to create the Release

Permissions and Security

Authentication via $CI_JOB_TOKEN, available as an environment variable in the Docker container.

Documentation

Yes, this change will require documentation.

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Links / references

Edited by Jaime Martinez