From bbdfff4e32bb94b9e2706af5655443f33290ced9 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sat, 10 Mar 2018 12:21:13 +0100 Subject: [PATCH] Add .gitlab-ci.yml for github mirroring --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..cec7f7c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +# This file is only necessary for the gitlab to github sync and does not belong to the webapp plugin code. + +#before_script: +# - ssh-keyscan -t rsa,dsa,ecdsa github.com > /etc/ssh/ssh_known_hosts +stages: + - mirror + +variables: + MIRROR_REPOSITORY: "git@github.com:h44z/kopano_webapp_calendarimporter.git" + +mirror-github: + stage: mirror + cache: {} + script: + # Do a mirror clone of the repository + - git clone --mirror $CI_REPOSITORY_URL + # Mirror push it to the destination + - cd $CI_PROJECT_NAME.git + - git push --mirror $MIRROR_REPOSITORY + # Cleanup + - cd ..; rm -rf $CI_PROJECT_NAME.git