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:
authorEvan Read <eread@gitlab.com>2022-05-12 05:19:25 +0300
committerEvan Read <eread@gitlab.com>2022-05-13 04:03:21 +0300
commit1f98d1c3e36b9ee9ff08eb7a38c3fb1ec7247c56 (patch)
tree6c8ae8e2f7dd72abca2a2e05d8395b246e13dfc3
parente0cf214694e72d0ebde80f21219037e1387b37e6 (diff)
Add make targets for fetching all documentation projectseread/make-targets-for-fetching-docs-projects
This makes the link checking make targets more robust by ensuring all prerequisite projects are present.
-rw-r--r--Makefile28
-rw-r--r--doc/setup.md66
2 files changed, 31 insertions, 63 deletions
diff --git a/Makefile b/Makefile
index b3c74116..865d90fd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,27 @@
.PHONY: all clean test up
+../gitlab/.git:
+ @echo "\nINFO: Cloning GitLab project into parent directory.."
+ @git clone git@gitlab.com:gitlab-org/gitlab.git ../gitlab
+
+../gitlab-runner/.git:
+ @echo "\nINFO: Cloning GitLab Runner project into parent directory.."
+ @git clone git@gitlab.com:gitlab-org/gitlab-runner.git ../gitlab-runner
+
+../omnibus-gitlab/.git:
+ @echo "\nINFO: Cloning Omnibus GitLab project into parent directory.."
+ @git clone git@gitlab.com:gitlab-org/omnibus-gitlab.git ../omnibus-gitlab
+
+../charts-gitlab/.git:
+ @echo "\nINFO: Cloning GitLab Chart project into parent directory.."
+ @git clone git@gitlab.com:gitlab-org/charts/gitlab.git ../charts-gitlab
+
+../gitlab-operator/.git:
+ @echo "\nINFO: Cloning GitLab Operator project into parent directory.."
+ @git clone git@gitlab.com:gitlab-org/cloud-native/gitlab-operator.git ../gitlab-operator
+
+clone-all-docs-projects: ../gitlab/.git ../gitlab-runner/.git ../omnibus-gitlab/.git ../charts-gitlab/.git ../gitlab-operator/.git
+
up: setup view
compile: setup
@@ -17,13 +39,13 @@ setup:
clean:
@rm -rf tmp public
-internal-links-check: compile
+internal-links-check: clone-all-docs-projects compile
@bundle exec nanoc check internal_links
-internal-anchors-check: compile
+internal-anchors-check: clone-all-docs-projects compile
@bundle exec nanoc check internal_anchors
-internal-links-and-anchors-check: compile
+internal-links-and-anchors-check: clone-all-docs-projects compile
@parallel time bundle exec nanoc check ::: internal_links internal_anchors
external-links-check: compile
diff --git a/doc/setup.md b/doc/setup.md
index c6cf1064..95ddd666 100644
--- a/doc/setup.md
+++ b/doc/setup.md
@@ -163,68 +163,14 @@ For more information, see the [troubleshooting section](#troubleshooting).
## Clone the repositories
-Since this process clones a few repositories, it might be a good idea to
-create a separate directory to have them all together. For example, to store all
-local checkouts in a `dev` directory:
+To build the full GitLab documentation website locally, you must have cloned all the documentation projects that provide
+Nanoc data sources. To clone all projects, run:
-1. Open a terminal and run:
-
- ```shell
- mkdir -p ~/dev
- ```
-
-1. Navigate to the directory you'd like the repositories to be cloned:
-
- ```shell
- cd ~/dev
- ```
-
-1. Clone the documentation's website repository:
-
- ```shell
- ## Using SSH (for GitLab Team members)
- git clone git@gitlab.com:gitlab-org/gitlab-docs.git
-
- ## Using HTTPS (for external contributors)
- git clone https://gitlab.com/gitlab-org/gitlab-docs.git
- ```
+```shell
+make clone-all-docs-projects
+```
-1. Clone the repositories you wish to contribute documentation changes to. Clone these projects
- **in the same directory** as the `gitlab-docs` project
- (see [data sources](#nanoc-data-sources)). For example, `~/dev`:
-
- - **GitLab contributors** that don't have Developer access to the projects,
- fork the ones you want and then clone them by using your forked version:
-
- ```shell
- ## Using HTTPS (for members that do not have Developer access)
- git clone https://gitlab.com/<username>/gitlab.git
- git clone https://gitlab.com/<username>/gitlab-runner.git
- git clone https://gitlab.com/<username>/omnibus-gitlab.git
- git clone https://gitlab.com/<username>/charts/gitlab.git charts-gitlab
- git clone https://gitlab.com/<username>/gitlab-operator.git
- ```
-
- - For members that have Developer access (usually the
- **GitLab Team members**), clone the required repositories using SSH:
-
- ```shell
- ## Using SSH (for members that have Developer access)
- git clone git@gitlab.com:gitlab-org/gitlab.git
- git clone git@gitlab.com:gitlab-org/gitlab-runner.git
- git clone git@gitlab.com:gitlab-org/omnibus-gitlab.git
- git clone git@gitlab.com:gitlab-org/charts/gitlab.git charts-gitlab
- git clone git@gitlab.com:gitlab-org/cloud-native/gitlab-operator.git
- ```
-
-If you cloned the projects into `~/dev`, you should now have the following projects:
-
-- `~/dev/gitlab-docs`
-- `~/dev/gitlab`
-- `~/dev/gitlab-runner`
-- `~/dev/omnibus-gitlab`
-- `~/dev/charts-gitlab`
-- `~/dev/gitlab-operator`
+The documentation projects are cloned into the parent directory.
## Preview the documentation website