mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
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
This commit is contained in:
commit
7fade89fb6
@ -7,7 +7,7 @@ before_script:
|
|||||||
# add gitlab ssh key
|
# add gitlab ssh key
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- chmod 700 ~/.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
|
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
||||||
@ -125,8 +125,9 @@ sanity_test:
|
|||||||
- CONFIG_FILE=sanity_test.yml
|
- CONFIG_FILE=sanity_test.yml
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
push_master_to_github:
|
push_master_to_github:
|
||||||
|
before_script:
|
||||||
|
- echo "Not setting up GitLab key, not fetching submodules"
|
||||||
stage: deploy
|
stage: deploy
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
@ -139,7 +140,7 @@ push_master_to_github:
|
|||||||
script:
|
script:
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- chmod 700 ~/.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
|
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
||||||
|
Loading…
Reference in New Issue
Block a user