From a967cb4ac4e43024bcd3474cfd84f750fe89e481 Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Sat, 14 Jul 2018 18:28:28 +0200 Subject: [PATCH] [fix] ci: back to normal --- .gitlab-ci.yml | 46 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c6ae80..091b8c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,23 +1,24 @@ stages: + - github-sync - deploy -#push_to_github: -# stage: github-sync -# variables: -# GIT_STRATEGY: none -# tags: -# - github -# script: -# - rm -rf ./* -# - rm -rf .git -# - git clone --mirror $CI_REPOSITORY_URL . -# - git remote add github $GITHUB_URL_AND_KEY -# - git config --global user.email "contact@duniter.org" -# - git config --global user.name "Duniter" -# # Job would fail if we don't remove refs about pull requests -# - bash -c "cat packed-refs | grep -v 'refs/pull' > packed-refs-new; echo 'Removed pull refs.'" -# - mv packed-refs-new packed-refs -# - bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?" +push_to_github: + stage: github-sync + variables: + GIT_STRATEGY: none + tags: + - github + script: + - rm -rf ./* + - rm -rf .git + - git clone --mirror $CI_REPOSITORY_URL . + - git remote add github $GITHUB_URL_AND_KEY + - git config --global user.email "contact@duniter.org" + - git config --global user.name "Duniter" + # Job would fail if we don't remove refs about pull requests + - bash -c "cat packed-refs | grep -v 'refs/pull' > packed-refs-new; echo 'Removed pull refs.'" + - mv packed-refs-new packed-refs + - bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?" publish: stage: deploy @@ -28,16 +29,5 @@ publish: - tags - triggers script: - - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc - - npm publish - -force_publish: - stage: deploy - image: node:6.12-alpine - tags: - - nodejs - when: manual - script: - - export NPM_TOKEN="$NPM_TOKEN" - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc - npm publish \ No newline at end of file -- GitLab