doc/development/documentation/site_architecture/deployment_process.md
The GitLab documentation site is a static site hosted by GitLab Pages. The deployment is done by the Pages deploy jobs.
The website hosts documentation only for the supported GitLab versions.
Documentation for older versions is available:
The documentation release process involves:
main and relevant stable branches.docs-gitlab-com container registry used for the build environment.A stable branch (for example, 17.2) is created in the documentation project for each GitLab release.
This branch pulls content from the corresponding stable branches of included projects:
gitlab project (for example, 17-2-stable-ee).gitlab-runner project (for example, 17-2-stable).omnibus-gitlab project (for example, 17-2-stable).charts/gitlab project (for example, 7-2-stable).
charts/gitlab versions are mapped to GitLab versions.gitlab-org/cloud-native/gitlab-operator.cli project.The Technical Writing team creates the stable branch for the docs-gitlab-com project, which makes use of the stable branches created by other teams.
When merge requests that target stable branches of docs-gitlab-com are merged,
a pipeline builds the documentation using Hugo and deploys it as a parallel deployment.
Documentation is hosted at the following locations:
docs.gitlab.com/VERSION/.archives.docs.gitlab.com/VERSION/.When a new minor version is released, the oldest version on docs.gitlab.com gets moved to archives.docs.gitlab.com.
The image:docs-single
job in each pipeline runs automatically. It takes what is built, and pushes it to the
archives container registry for use in building and testing environments.
To rebuild any of the stable documentation images, create a new pipeline for the stable branch to rebuild. You might do this:
17.9 documentation to include changes subsequently merged in the gitlab project's
17-9-stable-ee branch.docs-gitlab-com project itself to a stable branch. For example, CSS style changes.The latest (upcoming and unreleased) documentation is built from the default branch (main) of docs-gitlab-com and deployed to docs.gitlab.com.
The process involves:
build:compile_site job):
gitlab, gitlab-runner, omnibus-gitlab, gitlab-operator and charts).pages job):
docs.gitlab.com with GitLab Pages.graph LR
A["Default branches
of upstream projects"]
B["build:compile_site job"]
C["pages job"]
D([docs.gitlab.com])
A--"Content pulled"-->B
B--"Compiled site"-->C
C--"Deployed with
GitLab Pages"-->D
The process runs automatically when changes are merged to the default branch.
This ensures docs.gitlab.com always shows the latest documentation for the upcoming release.
Docker images are used in the build process, but only as part of the build environment, not for serving the documentation.
The deployment of all documentation versions is handled by two GitLab Pages jobs:
pages job:
docs.gitlab.com.main).build:compile_site job.pages-archives job:
docs.gitlab.com/VERSION/.archives.docs.gitlab.com/VERSION/ using the gitlab-docs-archives project.build:compile_archive job.graph LR
A["build:compile_site job"]
B["build:compile_archive job"]
C["pages job"]
D["pages-archives job"]
E([docs.gitlab.com])
F([docs.gitlab.com/VERSION/])
G([archives.docs.gitlab.com/VERSION/])
A--"Compiled site"-->C
B--"Compiled site"-->D
C--"Deploys upcoming version"-->E
D--"Deploys current stable and two previous versions"-->F
D--"Deploys earlier versions"-->G
For example, a pipeline that contains the
pages job.
Documentation is deployed to production automatically when changes are merged to the appropriate branches. However, maintainers can manually trigger a deployment if needed:
Build docs.gitlab.com every hour, select Run schedule pipeline ({{< icon name="play" >}}).The updated documentation is available in production after the pages and pages:deploy jobs
complete in the new pipeline.
If you do not have the Maintainer role to perform this task, ask for help in the
#docs Slack channel.
The dockerfiles directory
contains Dockerfiles needed to build, test, and deploy https://docs.gitlab.com.