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

feat: guess dest visibility from GitLab CI env

parent fbd26a4d
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ gitlab-sync.sh \
| `--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  | guessed from GitLab CI env or `to-be-continuous` |
| `--max-visibility`    | `$MAX_VISIBILITY`    | maximum visibility of projects in destination group | `public` |
| `--max-visibility`    | `$MAX_VISIBILITY`    | maximum visibility of projects in destination group | `$CI_PROJECT_VISIBILITY` (when running in GitLab CI) or `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_|
| `--no-project-description` | `$PROJECT_DESCRIPTION_DISABLED` | do not synchronise project description | _none_|
+1 −1
Original line number Diff line number Diff line
@@ -357,7 +357,7 @@ DEST_TOKEN=${DEST_TOKEN:-$GITLAB_TOKEN}
SRC_SYNC_PATH=${SRC_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}
MAX_VISIBILITY=${MAX_VISIBILITY:-${CI_PROJECT_VISIBILITY:-public}}

# parse arguments
POSITIONAL=()