Release Configuration in .yml + Job Token for release generation from .yml
Problem to solve
Now that we have a releases page (https://gitlab.com/gitlab-org/gitlab-ce/issues/41766), there should be a straightforward way to create a release from the .gitlab-ci.yml
without making curls to the Releases API. This issue will just support the release configuration not generation.
Target audience
Automation engineers who are working on releases and want a native way to add releases without using script:
elements to curl an API
Further details
This is good polish for the releases feature in that it makes the integration feel better integrated into the product. Also, this provides better overall experience once features like https://gitlab.com/gitlab-org/gitlab-ce/issues/56023 are implemented.
Proposal
Build release configuration in yml:
stages:
- build
- test
- release
release:
stage: release
only: tags
script:
- make changelog | tee release_changelog.txt
release:
name: Release $CI_TAG_NAME
description: ./release_changelog.txt
assets:
links:
- name: cool-app.zip
url: http://my.awesome.download.site/1.0-$CI_COMMIT_SHORT_SHA.zip
- url: http://my.awesome.download.site/cool-app.exe
These keys and links will be built in this iteration and exposed via the API. Binary Assets will be supported in a follow-up issue #36133 (closed)
-
release:assets
adds assets to the release. -
release:assets:links
an array of link-type assets -
release:assets:links:name
(optional) specifies the asset name as an improvement over a raw url -
release:assets:links:url
specifies a link to the asset, which is stored externally and pre-created or created byscript
.
Uploading of binary or packaged assets into object storage or the GitLab Package repository are not supported by this iteration.
See also the proposed documentation