File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ stages :
2
+ - deploy
3
+
4
+ variables :
5
+ GIT_SUBMODULE_STRATEGY : recursive
6
+
7
+ before_script :
8
+ # add gitlab ssh key
9
+ - mkdir -p ~/.ssh
10
+ - chmod 700 ~/.ssh
11
+ - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
12
+ - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
13
+ - chmod 600 ~/.ssh/id_rsa
14
+ - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
15
+
16
+ deploy_test_github :
17
+ stage : deploy
18
+ image : $CI_DOCKER_REGISTRY/esp32-ci-env
19
+ tags :
20
+ - deploy
21
+ when : manual
22
+ only :
23
+ - master
24
+ variables :
25
+ TEST_BRANCH : " test"
26
+ script :
27
+ - mkdir -p ~/.ssh
28
+ - chmod 700 ~/.ssh
29
+ - echo -n $GH_KEY > ~/.ssh/id_rsa_base64
30
+ - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
31
+ - chmod 600 ~/.ssh/id_rsa
32
+ - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
33
+ - git remote remove github &>/dev/null || true
34
+ -
git remote add github [email protected] :espressif/esp-hosted.git
35
+ # Using test branch
36
+ - git branch ${TEST_BRANCH}
37
+ - git push github "${CI_COMMIT_SHA}:refs/heads/${TEST_BRANCH}"
38
+
39
+ .deploy_master_github :
40
+ stage : deploy
41
+ image : $CI_DOCKER_REGISTRY/esp32-ci-env
42
+ tags :
43
+ - deploy
44
+ when : manual
45
+ only :
46
+ - master
47
+ variables :
48
+ MASTER_BRANCH : $CI_COMMIT_REF_NAME
49
+ script :
50
+ - mkdir -p ~/.ssh
51
+ - chmod 700 ~/.ssh
52
+ - echo -n $GH_KEY > ~/.ssh/id_rsa_base64
53
+ - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
54
+ - chmod 600 ~/.ssh/id_rsa
55
+ - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
56
+ - git remote remove github &>/dev/null || true
57
+ -
git remote add github [email protected] :espressif/esp-hosted.git
58
+ # Using master branch
59
+ # - git push github "${CI_COMMIT_SHA}:refs/heads/${MASTER_BRANCH}"
You can’t perform that action at this time.
0 commit comments