Skip to content
Snippets Groups Projects
Commit fbd26a4d authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'guess-dest-path' into 'master'

Guess dest TBC namespace from GitLab CI env

See merge request to-be-continuous/tools/gitlab-sync!31
parents c80f1756 675b3aba
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ gitlab-sync.sh \
| `--src-sync-path` | `$SRC_SYNC_PATH` | GitLab source root group path to synchronize | `to-be-continuous` |
| `--dest-api` | `$DEST_GITLAB_API` | GitLab destination API url (**mandatory**) | `$CI_API_V4_URL` (defined when running in GitLab CI) |
| `--dest-token` | `$DEST_TOKEN` or `$GITLAB_TOKEN` | GitLab destination token with at least scopes `api,read_repository,write_repository` and `Owner` role (**mandatory**) | _none_ |
| `--dest-sync-path` | `$DEST_SYNC_PATH` | GitLab destination root group path to synchronize | `to-be-continuous` |
| `--dest-sync-path` | `$DEST_SYNC_PATH` | GitLab destination root group path to synchronize | guessed from GitLab CI env or `to-be-continuous` |
| `--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_ |
| `--no-group-description` | `$GROUP_DESCRIPTION_DISABLED` | do not synchronise group description | _none_|
......
......@@ -355,7 +355,8 @@ DEST_GITLAB_API=${DEST_GITLAB_API:-$CI_API_V4_URL}
DEST_TOKEN=${DEST_TOKEN:-$GITLAB_TOKEN}
# root group path to synchronize
SRC_SYNC_PATH=${SRC_SYNC_PATH:-to-be-continuous}
DEST_SYNC_PATH=${DEST_SYNC_PATH:-to-be-continuous}
GUESSED_TBC_NAMESPACE=${CI_PROJECT_NAMESPACE%/*}
DEST_SYNC_PATH=${DEST_SYNC_PATH:-${GUESSED_TBC_NAMESPACE:-to-be-continuous}}
MAX_VISIBILITY=${MAX_VISIBILITY:-public}
# parse arguments
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment