Skip to content

Commit cf3a09f

Browse files
committed
Merge branch 'feature/optimize_ci_stability' into 'main'
ci: optimize ci stability See merge request espressif/esp-thread-br!154
2 parents 4844efc + 5a250de commit cf3a09f

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,7 @@ variables:
88
ESP_THREAD_BR_PATH: "$CI_PROJECT_DIR"
99
CI_TOOLS_PATH: "$CI_PROJECT_DIR/tools/ci"
1010
ESP_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-env-v5.5:2"
11-
12-
before_script:
13-
- mkdir -p ~/.ssh
14-
- chmod 700 ~/.ssh
15-
- echo -n "${GITLAB_KEY}" >~/.ssh/id_rsa_base64
16-
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 >~/.ssh/id_rsa
17-
- chmod 600 ~/.ssh/id_rsa
18-
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >>~/.ssh/config
11+
ESP_IDF_HTTP: "https://gitlab-ci-token:${CI_JOB_TOKEN}@${ESP_GITLAB}/espressif/esp-idf.git"
1912

2013
pre_commit:
2114
stage: .pre
@@ -41,11 +34,9 @@ pre_commit:
4134

4235
.setup_idf: &setup_idf
4336
- cd $CI_PROJECT_DIR
44-
- git clone --recursive -b master ${IDF_GIT_REPO_URL}
37+
- git clone --depth=1 -b $CI_COMMIT_REF_NAME ${ESP_IDF_HTTP} || git clone --depth=1 -b master ${ESP_IDF_HTTP}
4538
- cd esp-idf
46-
- git checkout --track origin/$CI_COMMIT_REF_NAME || git branch
47-
- git submodule update --recursive --init
48-
- git rev-parse HEAD
39+
- git submodule update --init --depth=1
4940
- ./install.sh
5041
- . ./export.sh
5142

0 commit comments

Comments
 (0)