Improved github as mirror.

This commit is contained in:
Martin Edenhofer 2016-08-21 17:12:34 +02:00
parent d4918c3b67
commit 4c041f5251

View file

@ -2,8 +2,8 @@ before_script:
- ruby -v
- which ruby
- env
- script/build/test_db_config.sh
- bundle install
- test -n "$RNAME" && script/build/test_db_config.sh
- test -n "$RNAME" && bundle install
stages:
- pre
@ -35,10 +35,12 @@ pre:bundle-audit:
pre:github:
stage: pre
tags:
- deploy
script:
- git checkout $CI_BUILD_REF_NAME
- git pull --rebase origin $CI_BUILD_REF_NAME
- git filter-branch --force --index-filter "git rm --cached --ignore-unmatch './.gitlab-ci.yml'" --prune-empty --tag-name-filter cat -- $CI_BUILD_REF_NAME
- git filter-branch --force --index-filter "git rm --cached --ignore-unmatch './Gemfile.lock'" --prune-empty --tag-name-filter cat -- $CI_BUILD_REF_NAME
- if git remote | grep github > /dev/null; then git remote rm github; fi
- git remote add github git@github.com:martini/zammad-test.git
- git push github $CI_BUILD_REF_NAME