forked from espressif/ESP8266_NONOS_SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
executable file
·70 lines (63 loc) · 1.94 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
stages:
- build
- deploy
.build_template: &build_template
stage: build
image: $CI_DOCKER_REGISTRY/esp8266-ci-env
tags:
- build
variables:
GIT_STRATEGY: clone
before_script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- 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
build_ssc:
<<: *build_template
artifacts:
paths:
- ./SSC/ssc_bin
expire_in: 6 mos
script:
- git clone $GITLAB_SSH_SERVER/yinling/SSC.git
- cd SSC
# try checkout same branch
- git checkout ${CI_BUILD_REF_NAME} || echo "Using default branch..."
- chmod +x gen_misc_non_os.sh
- ./gen_misc_non_os.sh
build_at:
<<: *build_template
artifacts:
paths:
- ./bin/upgrade
- ./bin/*.bin
expire_in: 6 mos
script:
- cp -rf examples/at at
- cd at
- make COMPILE=gcc BOOT=new APP=1 SPI_SPEED=40 SPI_MODE=QIO SPI_SIZE_MAP=5
push_master_to_github:
stage: deploy
only:
- master
- /^release\/v.*$/
tags:
- deploy
when: on_success
image: $CI_DOCKER_REGISTRY/esp8266-ci-env
variables:
GIT_STRATEGY: clone
GITHUB_PUSH_REFS: refs/remotes/origin/release refs/remotes/origin/master
script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- 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
- git remote add github [email protected]:espressif/ESP8266_NONOS_SDK.git
# - git push --follow-tags github HEAD:master
- eval $(git for-each-ref --shell bash --format 'if [ $CI_COMMIT_SHA == %(objectname) ]; then git checkout -B %(refname:strip=3); git push --follow-tags github %(refname:strip=3); fi;' $GITHUB_PUSH_REFS)