From d7f7c36af07e46db03efb312873ee4f3ac1deaac Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 13 Sep 2016 21:24:57 +0800 Subject: [PATCH] gitlab-ci: fix setting GitHub deploy key - don't run default before_script before push_master_to_github job - replace echo >> with echo > to avoid mistakes in the future --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 96006f8c8..8ca472d08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ before_script: # add gitlab ssh key - mkdir -p ~/.ssh - chmod 700 ~/.ssh - - echo -n $GITLAB_KEY >> ~/.ssh/id_rsa_base64 + - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config @@ -125,8 +125,9 @@ sanity_test: - CONFIG_FILE=sanity_test.yml - push_master_to_github: + before_script: + - echo "Not setting up GitLab key, not fetching submodules" stage: deploy only: - master @@ -139,7 +140,7 @@ push_master_to_github: script: - mkdir -p ~/.ssh - chmod 700 ~/.ssh - - echo -n $GH_PUSH_KEY >> ~/.ssh/id_rsa_base64 + - echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config