Skip to content

Add release script

What does this MR do and why?

This MR adds the Docs version release task automation. The following make commands are added,

  1. Task - Create stable branch: Creating release version branch with versioned Dockerfile (i.e. if version is 17.8, this task will create a branch 17.8 off of main branch with the appropriate Dockerfile 17.8.Dockerfile.
  2. Task - Create merge request: Create merge request that updates versions.json based on latest version.

Screenshots, screen recordings, or links to review app

Stable branch creation task:

  1. DRY_RUN not set. Overwriting file = "n"

image

  1. DRY_RUN not set. Overwriting file = "y", branch is created.

image

NOTE: This was during the test. I deleted it.

image

  1. DRY_RUN is set. Just logs should appear. No file creation. Not overwriting anything.

image

Merge request creation task:

  1. Normal run with VERSION and TOKEN provided.

image

example:

!300 (closed)

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. For create stable branch:
  • DRY_RUN=false make create-stable-branch VERSION=17.8 to run the actual code where it creates the release branch and pushes the release Dockerfile to it. Remove branch after testing from local.
  • DRY_RUN=true make create-stable-branch VERSION=17.8 to run a dry run (not perform any code logic - for practice only).
  1. For merge request task: set a personal access token (that has api access only) and set it as GITLAB_TOKEN in .zshrc file then run make create-release-merge-request VERSION=17.8

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #39 (closed)

Edited by Hiru Fernando

Merge request reports

Loading