Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 50,057
    • Issues 50,057
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,564
    • Merge requests 1,564
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #26013
Closed (promoted) (promoted)
Open
Issue created Jan 07, 2019 by Jason Yavorska@jyavorskaContributor

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 by script.

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

Edited Feb 13, 2020 by Jackie Porter
Assignee
Assign to
Time tracking