Merge branch 'bugfix/github_deploy' into 'master'

fix deploy to GitHub

Previous change to gitlab-ci.yml moved setting of Gitlab ssh key to global before_script.
This together with the fact that we used `echo >>` instead of `echo >` to write to `id_rsa_base64` file caused wrong key to be used while pushing to GitHub.
Therefore:
- don't run default before_script before push_master_to_github job
- replace echo >> with echo > to avoid mistakes in the future

See merge request !82
pull/21/head
Ivan Grokhotkov 2016-09-15 14:08:35 +08:00
commit 7fade89fb6
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -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