diff options
author | Marcel Amirault <mamirault@gitlab.com> | 2021-08-18 09:44:43 +0300 |
---|---|---|
committer | Marcel Amirault <mamirault@gitlab.com> | 2021-08-26 03:47:36 +0300 |
commit | c44eb95b447e50d5a2e17f086be911a3b9435bd9 (patch) | |
tree | bf0d5e0ecd55f789af2c8e0b242d15c576a15bb7 /doc/raketasks.md | |
parent | c2c62c2a813c412d8d2dd8bf00bae140c789cd53 (diff) |
Move docs site readme content into docs
All our docs site documentation was in one large readme.
This moves everything into /doc and puts them into
specific pages for each topic.
Diffstat (limited to 'doc/raketasks.md')
-rw-r--r-- | doc/raketasks.md | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/doc/raketasks.md b/doc/raketasks.md new file mode 100644 index 00000000..9cda0416 --- /dev/null +++ b/doc/raketasks.md @@ -0,0 +1,55 @@ +# Rake Tasks + +The GitLab Docs project has some raketasks that automate various things. You +can see the list of rake tasks with: + +```shell +bundle exec rake -T +``` + +## Generate the feature flag tables + +The [feature flag tables](https://docs.gitlab.com/ee/user/feature_flags.html) are generated +dynamically when GitLab Docs are published. + +To generate these tables locally, generate `content/_data/feature_flags.yaml`: + +```shell +bundle exec rake generate_feature_flags +``` + +Do this any time you want fresh data from your GitLab checkout. + +Any time you rebuild the site using `nanoc`, the feature flags tables are populated with data. + +## Clean up redirects + +The `docs:clean_redirects` rake task automates the removal of the expired redirect files, +which is part of the monthly [scheduled TW tasks](https://about.gitlab.com/handbook/engineering/ux/technical-writing/#regularly-scheduled-tasks) +as seen in the "Local tasks" section of the [issue template](https://gitlab.com/gitlab-org/technical-writing/-/blob/main/.gitlab/issue_templates/tw-monthly-tasks.md): + +```shell +bundle exec rake docs:clean_redirects +``` + +The task: + +1. Searches the doc files of each upstream product and: + 1. Checks the `remove_date` defined in the YAML front matter. If the + `remove_date` is before the day you run the task, it removes the doc + and updates `content/_data/redirects.yaml`. + 1. Creates a branch, commits the changes, and pushes the branch with + various push options to automatically create the merge request. +1. When all the upstream products MRs have been created, it creates a branch + in the `gitlab-docs` repository, adds the changed `content/_data/redirects.yaml`, + and pushes the branch with various push options to automatically create the + merge request. + +Once all the MRs have been created, be sure to edit them to cross link between +them and the recurring tasks issue. + +To omit the automatic merge request creation: + +```shell +SKIP_MR=true bundle exec rake docs:clean_redirects +``` |