Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add CI job to mirror the repository
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
stages: | ||
- mirror | ||
|
||
mirror: | ||
stage: mirror | ||
image: ianayoung/rsync | ||
tags: | ||
- linux | ||
cache: {} | ||
script: | ||
# run ssh-agent | ||
- eval $(ssh-agent -s) | ||
# add appropriate private key to the agent store | ||
- ssh-add <(echo "$MIRROR_KEY") | ||
# set known hosts list | ||
# WARNING: use only in docker container, if you use it with shell you will | ||
# overwrite your user's ssh config | ||
- mkdir -p ~/.ssh | ||
- cp deploy/known_hosts ~/.ssh/known_hosts | ||
# Do a bare clone of the repository | ||
- git clone --bare $CI_REPOSITORY_URL | ||
# Mirror push it to the destination | ||
- cd $CI_PROJECT_NAME.git | ||
- git push --mirror $MIRROR_DEST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
gitlab.iay.org.uk,192.168.117.27 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBI0a+I41I960iFba9mrCQHfLHd337Iydn2J5CXh6Low3wnzw0mc0osd707q3+K8WnIUWv3ZVmxv4g88gAL+GVnE= | ||
github.internet2.edu,52.207.246.146 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCtCLiBoG1JxyHqSxLwnwj5GKBR888zMxbKYf9OR5l+DMiKuEVTyMmR7zvcE2USaK3Z639CcmcqnB8XyLKEowU8= |