Browse Source

Improved github as mirror.

Martin Edenhofer 8 years ago
parent
commit
4c041f5251
1 changed files with 5 additions and 3 deletions
  1. 5 3
      .gitlab-ci.yml

+ 5 - 3
.gitlab-ci.yml

@@ -2,8 +2,8 @@ before_script:
   - ruby -v
   - ruby -v
   - which ruby
   - which ruby
   - env
   - env
-  - script/build/test_db_config.sh
-  - bundle install
+  - test -n "$RNAME" && script/build/test_db_config.sh
+  - test -n "$RNAME" && bundle install
 
 
 stages:
 stages:
   - pre
   - pre
@@ -35,10 +35,12 @@ pre:bundle-audit:
 
 
 pre:github:
 pre:github:
   stage: pre
   stage: pre
+  tags:
+    - deploy
   script:
   script:
     - git checkout $CI_BUILD_REF_NAME
     - git checkout $CI_BUILD_REF_NAME
     - git pull --rebase origin $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
     - 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 remote add github git@github.com:martini/zammad-test.git
     - git push github $CI_BUILD_REF_NAME
     - git push github $CI_BUILD_REF_NAME