@ -6,6 +6,7 @@
|
|||||||
- apk update
|
- apk update
|
||||||
- apk add git
|
- apk add git
|
||||||
script:
|
script:
|
||||||
|
- if [ "0$GIT_SYNC_URL" == "0"]; then echo "[ERROR] you must define variable GIT_SYNC_URL for mirroring this repository."; fi
|
||||||
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/$CI_PROJECT_PATH --mirror $CI_PROJECT_NAME
|
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/$CI_PROJECT_PATH --mirror $CI_PROJECT_NAME
|
||||||
- cd $CI_PROJECT_NAME
|
- cd $CI_PROJECT_NAME
|
||||||
- git remote add destination $GIT_SYNC_URL
|
- git remote add destination $GIT_SYNC_URL
|
||||||
@ -14,7 +15,9 @@
|
|||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 day
|
expire_in: 1 day
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
- if: '$JOB_STOP_GIT_PUSH_MIRROR'
|
||||||
- if: '$CI_COMMIT_BRANCH == "development"'
|
when: never
|
||||||
|
- if: '$CI_COMMIT_BRANCH == "master" && $GIT_SYNC_URL != null'
|
||||||
|
- if: '$CI_COMMIT_BRANCH == "development" && $GIT_SYNC_URL != null'
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user