7.5 KiB
stage | group | info |
---|---|---|
none | unassigned | To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments |
Monthly release process
When a new GitLab version is released on the 22nd, we need to release the published documentation for the new version.
This should be done as soon as possible after the GitLab version is announced, so that:
- The published documentation includes the three most recent minor releases of the current major version, and the most recent minor releases of the last two major versions. For example 13.9, 13.8, 13.7, 12.10, and 11.11.
- Documentation updates after the 22nd are for the next release. The versions drop down
should have the current milestone with
-pre
appended to it, for example13.10-pre
.
Each documentation release:
- Has a dedicated branch, named in the format
XX.yy
. - Has a Docker image that contains a build of that branch.
For example:
- For GitLab 13.9, the
stable branch and Docker image:
registry.gitlab.com/gitlab-org/gitlab-docs:13.9
. - For GitLab 13.8, the
stable branch and Docker image:
registry.gitlab.com/gitlab-org/gitlab-docs:13.8
.
To set up a documentation release, follow these steps:
- Add the charts version, so that the documentation is built using the version of the charts project that maps to the GitLab release. This step may have been completed already.
- Create a stable branch and Docker image for the new version.
- Create a release merge request for the new version, which updates the version dropdown menu for the current documentation and adds the release to the Docker configuration. For example, the release merge request for 13.9.
- Update the three online versions, so that they display the new release on their
version dropdown menus. For example:
- The merge request to update the 13.9 version dropdown menu for the 13.9 release.
- The merge request to update the 13.8 version dropdown menu for the 13.9 release.
- The merge request to update the 13.7 version dropdown menu for the 13.9 release.
- Merge the release merge request and run the necessary Docker image builds.
Add chart version
To add a new charts version for the release:
- Make sure you're in the root path of the
gitlab-docs
repository. - Open
content/_data/chart_versions.yaml
and add the new stable branch version using the version mapping. Only themajor.minor
version is needed. - Create a new merge request and merge it.
NOTE:
If you have time, add anticipated future mappings to content/_data/chart_versions.yaml
. This saves
a step for the next GitLab release.
Create stable branch and Docker image for release
To create a stable branch and Docker image for the release:
-
Make sure you're in the root path of the
gitlab-docs
repository. -
Run the Rake task to create the single version. For example, to create the 13.9 release branch and perform others tasks:
./bin/rake "release:single[13.9]"
A branch for the release is created, a new
Dockerfile.13.9
is created, and.gitlab-ci.yml
has branches variables updated into a new branch. These files are automatically committed. -
Push the newly created branch, but don't create a merge request. After you push, the
image:docs-single
job creates a new Docker image tagged with the name of the branch you created earlier. You can see the Docker image in theregistry
environment at https://gitlab.com/gitlab-org/gitlab-docs/-/environments/folders/registry.
For example, see the 13.9 release pipeline.
Optionally, you can test locally by:
-
Building the image and running it. For example, for GitLab 13.9 documentation:
docker build -t docs:13.9 -f Dockerfile.13.9 . docker run -it --rm -p 4000:4000 docs:13.9
-
Visiting http://localhost:4000/13.9/ to see if everything works correctly.
Create release merge request
NOTE: An epic is open to automate this step.
To create the release merge request for the release:
-
Make sure you're in the root path of the
gitlab-docs
repository. -
Create a branch
release-X-Y
. For example:git checkout master git checkout -b release-13-9
-
Edit
content/_data/versions.yaml
and update the lists of versions to reflect the new release:- Add the latest version to the
online:
section. - Move the oldest version in
online:
to theoffline:
section. There should now be three versions inonline:
.
- Add the latest version to the
-
Update these Dockerfiles:
dockerfiles/Dockerfile.archives
: Add the latest version to the top of the list.Dockerfile.master
: Remove the oldest version, and add the newest version to the top of the list.
-
Commit and push to create the merge request. For example:
git add content/ Dockerfile.master dockerfiles/Dockerfile.archives git commit -m "Release 13.9" git push origin release-13-9
Do not merge the release merge request yet.
Update dropdown for online versions
To updatecontent/_data/versions.yaml
for all online versions (stable branches X.Y
of the
gitlab-docs
project):
-
Run the Rake task that creates all of the necessary merge requests to update the dropdowns. For example, for the 13.9 release:
git checkout release-13-9 ./bin/rake release:dropdowns
These merge requests are set to automatically merge.
-
Visit the merge requests page to check that their pipelines pass. After all MRs are merged, proceed to the following and final step.
Merge release merge request and run Docker image builds
The merge requests for the dropdowns should now all be merged into their respective stable branches. Each merge triggers a new pipeline for each stable branch. Wait for the stable branch pipelines to complete, then:
- Check the pipelines page and make sure all stable branches have green pipelines.
- After all the pipelines succeed, merge the release merge request.
- Finally, run the
Build docker images weekly
pipeline that builds the:latest
and:archives
Docker images.
As the last step in the scheduled pipeline, the documentation site deploys with all new versions.