Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2022-07-20 22:53:13 +0300
committerSarah German <sgerman@gitlab.com>2022-07-20 22:53:13 +0300
commit45d050a134210b8854b6a8f8f121272a9fc2c860 (patch)
tree4d348f86fa90bddeb00e7556f6d983d12fd85d4c
parentdce2fc32653a5410e6c1d148f8d5b32519f27809 (diff)
Revert "Update release process docs for new Versions menu"revert-vmenu-152
This reverts commit 9cab54922e0edd595e56c7a1ae10586515eb759c.
-rw-r--r--.gitlab/issue_templates/release.md8
-rw-r--r--Rakefile65
-rw-r--r--doc/releases.md29
3 files changed, 96 insertions, 6 deletions
diff --git a/.gitlab/issue_templates/release.md b/.gitlab/issue_templates/release.md
index 8702a32d..1919cea1 100644
--- a/.gitlab/issue_templates/release.md
+++ b/.gitlab/issue_templates/release.md
@@ -17,10 +17,12 @@ Documentation [for handling the docs release](https://gitlab.com/gitlab-org/gitl
created a Docker image tagged with the name of the branch. ([If it fails, how do I fix it?](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/releases.md#imagedocs-latest-job-fails-due-to-broken-links))
1. [ ] [Create a release merge request](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/releases.md#create-release-merge-request)
for the new version,
- which updates the version dropdown menu for all online versions, updates the archives list, and adds
+ which updates the version dropdown menu for the current documentation, and adds
the release to the Docker configuration.
- [ ] Mark as `Draft` and do not merge.
- - [ ] Check the review app to make sure the Versions menu displays correctly.
+1. [ ] [Update the three online versions](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/releases.md#update-dropdown-for-online-versions),
+ so they display the new release on their version dropdown menus.
+ - [ ] Check the review app to make sure the menus display correctly.
After the tasks above are complete, you don't need to do anything for a few days.
@@ -44,7 +46,7 @@ After release post is live on the 22nd, or the next Monday morning if the releas
scheduled pipeline to deploy all new versions to the public documentation site.
No manually-run jobs are needed for this second pipeline.
1. [ ] After the deployment completes, open `docs.gitlab.com` in a browser. Confirm
- both the latest version and the correct pre-release version are listed in the documentation version dropdown.
+ both the latest version and the correct `pre-` version are listed in the documentation version dropdown.
1. [ ] Check all published versions of the docs to ensure they are visible and that their version menus have the latest versions.
1. [ ] In this issue, create separate _threads_ for the retrospective, and add items as they appear:
- `## :+1: What went well this release?`
diff --git a/Rakefile b/Rakefile
index 8de2eed7..79e37c68 100644
--- a/Rakefile
+++ b/Rakefile
@@ -132,6 +132,71 @@ namespace :release do
puts "\n#{COLOR_CODE_GREEN}INFO: Created new Dockerfile:#{COLOR_CODE_RESET} #{dockerfile}."
puts "#{COLOR_CODE_GREEN}INFO: To push the new branch, run:#{COLOR_CODE_RESET} git push origin #{version}."
end
+
+ desc 'Creates merge requests to update the dropdowns in all online versions'
+ task :dropdowns do
+ # Check if you're on the default branch before starting. Fail if you are.
+ abort("\n#{COLOR_CODE_RED}ERROR: You are on the default branch. Create the current release branch and run the Rake task again.#{COLOR_CODE_RESET}") if `git branch --show-current`.tr("\n", '') == ENV['CI_DEFAULT_BRANCH']
+
+ # Load online versions
+ versions = YAML.load_file('./content/_data/versions.yaml')
+
+ # The first online version should be the current stable one
+ current_version = versions['online'].first
+
+ # The release branch name
+ release_branch = "release-#{current_version.tr('.', '-')}"
+
+ # Check if a release branch has been created, if not fail and warn the user
+ abort("\n#{COLOR_CODE_RED}ERROR: A release branch for the latest stable version has not been created.#{COLOR_CODE_RESET}") if `git rev-parse --verify #{release_branch}`.empty?
+
+ # Create a merge request to update the dropdowns in all online versions
+ versions['online'].each do |version|
+ # Set the commit title
+ mr_title = "Update #{version} dropdown to match that of #{current_version}"
+ mr_description = "Update version dropdown of #{version} release for the #{current_version} release."
+ branch_name = "update-#{version.tr('.', '-')}-for-release-#{current_version.tr('.', '-')}"
+
+ puts "\n#{COLOR_CODE_GREEN}INFO: Fetching #{version} stable branch..#{COLOR_CODE_RESET}"
+ `git fetch origin #{version}`
+
+ puts "\n#{COLOR_CODE_GREEN}INFO: Creating a new branch off of the online version..#{COLOR_CODE_RESET}"
+ `git checkout -b #{branch_name} origin/#{version}`
+ `git reset --hard origin/#{version}`
+
+ puts "\n#{COLOR_CODE_GREEN}INFO: Copying the versions.yaml content from the release-#{current_version} branch..#{COLOR_CODE_RESET}"
+ `git checkout release-#{current_version.tr('.', '-')} -- content/_data/versions.yaml`
+
+ puts "\n#{COLOR_CODE_GREEN}INFO: Committing and pushing to create a merge request..#{COLOR_CODE_RESET}"
+ `git commit -m "Update dropdown to #{current_version}"`
+ `git push --set-upstream origin #{branch_name} -o merge_request.create -o merge_request.target=#{version} -o merge_request.remove_source_branch -o merge_request.title="#{mr_title}" -o merge_request.description="#{mr_description}" -o merge_request.label="Technical Writing" -o merge_request.label="release" -o merge_request.label="Category:Docs Site" -o merge_request.label="type::maintenance"`
+ end
+
+ # Create a merge request to update the dropdowns in all previous major online versions
+ versions['previous_majors'].each do |version|
+ # Set the commit title
+ mr_title = "Update #{version} dropdown to match that of #{current_version}"
+ mr_description = "Update version dropdown of #{version} release for the #{current_version} release."
+ branch_name = "update-#{version.tr('.', '-')}-for-release-#{current_version.tr('.', '-')}"
+
+ puts "\n#{COLOR_CODE_GREEN}INFO: Fetching #{version} stable branch..#{COLOR_CODE_RESET}"
+ `git fetch origin #{version}`
+
+ puts "\n#{COLOR_CODE_GREEN}INFO: Creating a new branch off of the online version..#{COLOR_CODE_RESET}"
+ `git checkout -b #{branch_name} origin/#{version}`
+ `git reset --hard origin/#{version}`
+
+ puts "\n#{COLOR_CODE_GREEN}INFO: Copying the versions.yaml content from the release-#{current_version} branch..#{COLOR_CODE_RESET}"
+ `git checkout release-#{current_version.tr('.', '-')} -- content/_data/versions.yaml`
+
+ puts "\n#{COLOR_CODE_GREEN}INFO: Committing and pushing to create a merge request..#{COLOR_CODE_RESET}"
+ `git commit -m "Update dropdown to #{current_version}"`
+ `git push --set-upstream origin #{branch_name} -o merge_request.create -o merge_request.target=#{version} -o merge_request.remove_source_branch -o merge_request.title="#{mr_title}" -o merge_request.description="#{mr_description}" -o merge_request.label="Technical Writing" -o merge_request.label="release" -o merge_request.label="Category:Docs Site" -o merge_request.label="type::maintenance"`
+ end
+
+ # Switch back to the release branch after the dropdowns are pushed
+ `git checkout #{release_branch}`
+ end
end
desc 'Create the _redirects file'
diff --git a/doc/releases.md b/doc/releases.md
index df581220..fca0735e 100644
--- a/doc/releases.md
+++ b/doc/releases.md
@@ -13,7 +13,8 @@ When you've completed the documentation release process:
- The three most recent minor releases of the current major version. For example 13.9, 13.8, and
13.7.
- The most recent minor releases of the last two major versions. For example 12.10, and 11.11.
-- Documentation updates after the 22nd are for the next release.
+- Documentation updates after the 22nd are for the next release. The versions dropdown
+ should have the current milestone with `-pre` appended to it, for example `13.10-pre`.
Each documentation release:
@@ -42,8 +43,9 @@ To minimize problems during the documentation release process, use the following
1. [Create a stable branch and Docker image](#create-stable-branch-and-docker-image-for-release) for
the new version.
1. [Create a release merge request](#create-release-merge-request) for the new version, which
- updates the version dropdown menu (`versions.json`) and archives list (`versions.yaml`) for the current documentation,
- and adds the release to the Docker configuration.
+ 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](https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/1555).
Try to create the MR close to the cutoff for `gitlab` project's stable branch for the release.
If the `gitlab-docs` MR is too early or late, a mismatch between the `gitlab` project's
@@ -52,6 +54,9 @@ To minimize problems during the documentation release process, use the following
Slack channel and look for the `This is the candidate commit to be released on the 22nd.`
message.
+ 1. [Update the three online versions](#update-dropdown-for-online-versions), so that they display the new release on their
+ version dropdown menus.
+
- Complete the publication steps on the 22nd of the month, after the release post is live:
[Merge the release merge requests and run the necessary Docker image builds](#merge-merge-requests-and-run-docker-image-builds).
@@ -155,6 +160,24 @@ To create the release merge request for the release:
1. Create the merge request and choose the `Release` description
template. Set the merge request to _Draft_ status and do not merge it yet.
+## Update dropdown for online versions
+
+To update `content/_data/versions.yaml` for all `online` and `previous_majors`
+versions (stable branches `X.Y` of the `gitlab-docs` project):
+
+1. Run the Rake task that creates the merge requests to update the dropdowns for the current major version. For
+ example, for the 14.7 release:
+
+ ```shell
+ git checkout release-14-7
+ ./bin/rake release:dropdowns
+ ```
+
+ For the 14.7 release, the task created [five merge requests](https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests?scope=all&state=all&label_name[]=release&milestone_title=14.7&search=update).
+
+1. [Visit the merge requests page](https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests?label_name%5B%5D=release)
+ to check that their pipelines pass. Set each merge request to _draft_ status and do not merge them yet.
+
## Merge merge requests and run Docker image builds
_Do this after the release post is live._