| `--max-visibility` / `$MAX_VISIBILITY` | maximum visibility of projects in destination group | `public` |
| `--exclude` / `$EXCLUDE` | coma separated list of project/group path(s) to exclude | _none_ |
You shall use this script to copy the _to be continuous_ project to your own GitLab server for the first time with the following command:
```bash
curl -s https://gitlab.com/to-be-continuous/tools/gitlab-sync/-/raw/master/gitlab-sync.sh | bash /dev/stdin --dest-api{your GitLab server API url}--dest-token{your GitLab token}--exclude samples,custom
```
:warning: Each CLI option may alternately be specified with an environment variable (see in the table above). This might be useful to configure the CI/CD job.
## Usage: CI/CD
Once copied _to be continuous_ to your GitLab server, you shall then schedule a pipeline in this project (`to-be-continuous/tools/gitlab-sync`) - for instance every night - to keep synchronized with source project.
The script will only require a GitLab token, that shall be configured declaring a `$GITLAB_TOKEN` CI/CD project variable. (`--dest-api` will be implicitly retrieved using predefined `$CI_API_V4_URL`).
dest_project_json=$(curl -sSf-H"${DEST_TOKEN+PRIVATE-TOKEN:$DEST_TOKEN}"-H"Content-Type: application/json"-X PUT "$DEST_GITLAB_API/projects/$project_id"\
dest_project_json=$(curl -sSf-H"${DEST_TOKEN+PRIVATE-TOKEN:$DEST_TOKEN}"--form"avatar=@$avatar_filename"-X PUT "$DEST_GITLAB_API/projects/$project_id")
fi
fi
# if project already exists: unprotect master branch first