forked from espressif/esp-box
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
71 lines (66 loc) · 1.71 KB
/
.gitlab-ci.yml
File metadata and controls
71 lines (66 loc) · 1.71 KB
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
71
stages:
- build
- deploy
variables:
ESP_BOX_PATH: "$CI_PROJECT_DIR"
BATCH_BUILD: "1"
V: "0"
IDF_CI_BUILD: "1"
before_script:
# add gitlab ssh key
- 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
- git --version
- git submodule update --init --recursive --force
.build_examples_template: &build_examples_template
stage: build
image: espressif/idf:release-v4.4
tags:
- build
build_demo_cmake:
<<: *build_examples_template
script:
- cd examples/factory_demo
- idf.py fullclean
- idf.py build
- cd ../
- cd image_display
- idf.py fullclean
- idf.py build
- cd ../
- cd lv_demos
- idf.py fullclean
- idf.py build
- cd ../
- cd mp3_demo
- idf.py fullclean
- idf.py build
- cd ../
- cd watering_demo
- idf.py fullclean
- idf.py build
push_to_github:
stage: deploy
only:
- master
- /^release\/v/
# when: on_success
image: $CI_DOCKER_REGISTRY/esp32-ci-env
variables:
GIT_STRATEGY: clone
before_script:
- echo "skip default before_script"
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 remove github &>/dev/null || true
- git remote add github git@github.com:espressif/esp-box.git
- ${ESP_BOX_PATH}/tools/ci/push_to_github.sh