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,
-
Task - Create stable branch: Creating release version branch with versioned Dockerfile (i.e. if version is
17.8
, this task will create a branch17.8
off ofmain
branch with the appropriate Dockerfile17.8.Dockerfile
. - 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:
- DRY_RUN not set. Overwriting file = "n"
- DRY_RUN not set. Overwriting file = "y", branch is created.
NOTE: This was during the test. I deleted it.
- DRY_RUN is set. Just logs should appear. No file creation. Not overwriting anything.
Merge request creation task:
- Normal run with
VERSION
andTOKEN
provided.
example:
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md. -
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).
-
For merge request task: set a personal access token (that has api
access only) and set it asGITLAB_TOKEN
in .zshrc file then runmake 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.
-
I have evaluated the MR acceptance checklist for this merge request.
Closes #39 (closed)
Edited by Hiru Fernando