Skip to content

Automate release issue creation

Sofia Vistas requested to merge automate-release-issue into master

Context

When a new release is created, Engineers usually manually open a Release Plan issue for that particular release (example). This implies going through a set of manual instructions which are now getting automated.

This MR creates a Release issue automatically when there is a new tag pushed to the Container Registry.

💻 Implementation

  1. Picks up the changelog from the release tag commit message
  2. Uses the template for a Release Issue and updates the [copy changelog here] section with 1.
  3. Opens an issue with labels assigned and release title

Shortcomings

The milestone is not assigned directly to the issue, this still needs human intervention.

🐎 Workflow

  • In a release pipeline, the release-issue job comes before all other jobs which trigger version bumps on several projects (cng, omnibus, charts, etc...). While this is being triggered manually (for now) the reason is due to the association of related merge requests to a release.

  • This MR pairs with a release cop MR, which introduces a cron job that runs daily to monitor the release's state and update the release issue accordingly.

🔍 Testing

This MR was tested separately on a sandbox project which imitates the workflow for a release in the Container Registry. The command used go run cmd/internal/releaseissue/main.go --target-project-id <my-project-id> --gitlab-auth-token $ACCESS_TOKEN --source-version v3.59.0-gitlab --target-branch main targeted a project that contained several tags/releases with commits formatted similar to test changelog extraction.

Edited by Sofia Vistas

Merge request reports