Commit d90ef7a5 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'simplify-sync-documentation' into 'master'

Simplify the intial sync process

See merge request to-be-continuous/doc!24
parents 74f1732f 181945ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@ The assembled Kicker descriptor is built by crawling one or several GitLab group

It can be configured with the following variables:

* `GITLAB_TOKEN`: a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with scopes `api,read_repository`
  and at least `Developer` role on all groups & projects to crawl (not required if only `public` groups and projects),
* `GITLAB_TOKEN`: a [group access token](https://docs.gitlab.com/ee/user/group/settings/group_access_tokens.html) with at least scopes `api,read_repository`
  and `Developer` role,
* `PREF_TAG_PATTERN`: preferred tag pattern.
* `KICKER_RESOURCE_GROUPS`: JSON configuration of GitLab groups to crawl.

+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ developers from your company to have an easy access to a reference documentation

In your local copy of the [doc](https://gitlab.com/to-be-continuous/doc) project:

1. Declare the CI/CD project variable `GITLAB_TOKEN`: a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with scopes `api,read_repository` and at least `Developer` role on all groups & projects to crawl.
1. Declare the CI/CD project variable `GITLAB_TOKEN`: a [group access token](https://docs.gitlab.com/ee/user/group/settings/group_access_tokens.html) with scopes `api,read_registry,write_registry,read_repository,write_repository` and with `Owner` role.
2. Declare the CI/CD project variable `KICKER_RESOURCE_GROUPS`: JSON configuration of GitLab groups to crawl.
3. create a scheduled pipeline (for instance every day at 3:00 am).

+2 −3
Original line number Diff line number Diff line
@@ -13,9 +13,8 @@ The first thing to do is to copy the complete [tbc group](https://gitlab.com/to-
Don't panic, we provide all required tools to initiate it for the first time, and also schedule regular updates to keep synchronized.

1. Create an empty `to-be-continuous` root group with `public` visibility.
2. Create a dedicated _non-individual_ GitLab account, add it to the `to-be-continuous` root group
   with `Maintainer` role.
3. Generate a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with scopes `api,read_registry,write_registry,read_repository,write_repository`.
2. In the `to-be-continuous` root group, generate a [group access token](https://docs.gitlab.com/ee/user/group/settings/group_access_tokens.html) with scopes `api,read_registry,write_registry,read_repository,write_repository` and with `Owner` role.
3. Store the token in `GITLAB_TOKEN` environment variable (`export GITLAB_TOKEN="<the token>"`).
4. Execute the following command to **recursively copy the tbc group**:
    ```bash
    curl -s https://gitlab.com/to-be-continuous/tools/gitlab-sync/-/raw/master/gitlab-sync.sh | bash /dev/stdin --dest-api https://your.gitlab.host/api/v4 --dest-token $GITLAB_TOKEN --exclude samples,custom