Skip to content

Automatically show release notes on deployment approval pages for tagged deployments

Release notes

Screenshot 2024-10-16 at 16.09.22.png

Have you ever wondered what might be included in a deployment that you are asked to approve for deployment? While GitLab allowed you to create a release with detailed description about its content or instructions for testing, the related environment-specific deployment did not show this data. We are happy to share that GitLab now show you the release notes under the related deployment details page.

As GitLab releases are created always from a git tag, the release notes are shown only on deployments related to the tag-triggered pipeline.

Problem to solve

As a release manager, I want to get all the available information when I'm asked to approve a new deployment, so I can make informed decisions.

See various comments from the feedback issue. This comment gives a good overview in general: #450700 (comment 1930049327)

Proposal

When the deployment approval is related to a tagged build, we should show the related release notes automatically on the deployment approval page.

It would be up to the user to populate the release notes with the information they prefer.

Design proposal

Screenshot 2024-10-16 at 16.09.22.png

Intended users

Feature Usage Metrics

No new metrics. We already have metrics for releases and MAU of approval pages.

Does this feature require an audit event?

no

Implementation plan

  1. Create a new graphql query relatedRelease, that accepts fullPath and tagName and returns the release's id, name, and descriptionHtml:

    query relatedRelease($fullPath: ID!, $tagName: String!) {
      project(fullPath: $fullPath) {
        id
        release(tagName: $tagName) {
          id
          name
          descriptionHtml
          links {
            selfUrl
          }
        }
      }
    }
  2. Use the new query in the showDeployment component:

    • we should fetch the release data only for the deployments that have a tag, skip the query if !this.deployment?.tag
    • for the tagName variable use deployment's ref (this.deployment?.ref), which should represent the git tag name in this case.
  3. Provide the release data to the deployment_header component as a non-required prop.

  4. Render the related release description only if the release data is provided.

  5. Use GlTruncateText component to show the release notes. Set lines number to 2.

  6. Render the descriptionHtml similarly to how it's done on the environment page.

  7. Add a section title <releaseName> release notes: and link releaseName to the release page using release.links.selfUrl.

  8. Update the related specs:

Edited by Viktor Nagy (GitLab)