ci: move check_submodule_sync to pre_deploy stage

This commit is contained in:
Fu Hanxi
2026-07-21 11:24:49 +02:00
parent 52f2ccdd8f
commit a001547d7f
4 changed files with 27 additions and 21 deletions

View File

@@ -40,6 +40,7 @@ include:
- ".gitlab/ci/manual_gate.yml"
- ".gitlab/ci/upload_cache.yml"
- ".gitlab/ci/pre_check.yml"
- ".gitlab/ci/pre_deploy.yml"
- ".gitlab/ci/static-code-analysis.yml"
- ".gitlab/ci/pre_commit.yml"
- ".gitlab/ci/build.yml"

View File

@@ -11,6 +11,7 @@ stages:
- target_test
- host_test
- test_deploy
- pre_deploy
- deploy
- post_deploy

View File

@@ -113,27 +113,6 @@ check_test_scripts_build_test_rules:
# requires basic pytest dependencies
- python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components
check_submodule_sync:
extends:
- .pre_check_template
- .rules:test:submodule
tags: [ brew, github_sync ]
retry: 2
variables:
GIT_STRATEGY: fetch # use brew local mirror first
SUBMODULES_TO_FETCH: "none"
PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git"
script:
- git submodule deinit --force .
- rm -rf .git/modules # remove all the cached metadata
# setting the default remote URL to the public one, to resolve relative location URLs
- git config remote.origin.url ${PUBLIC_IDF_URL}
# check if all submodules are correctly synced to public repository
- git submodule init
- git config --get-regexp '^submodule\..*\.url$' || true
- git submodule update --recursive
- echo "IDF was cloned from ${PUBLIC_IDF_URL} completely"
check_gitlab_yaml:
extends:
- .pre_check_template

25
.gitlab/ci/pre_deploy.yml Normal file
View File

@@ -0,0 +1,25 @@
.pre_deploy_template:
stage: pre_deploy
image: $ESP_ENV_IMAGE
dependencies: []
check_submodule_sync:
extends:
- .pre_deploy_template
- .rules:test:submodule
tags: [ brew, github_sync ]
retry: 2
variables:
GIT_STRATEGY: fetch # use brew local mirror first
SUBMODULES_TO_FETCH: "none"
PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git"
script:
- git submodule deinit --force .
- rm -rf .git/modules # remove all the cached metadata
# setting the default remote URL to the public one, to resolve relative location URLs
- git config remote.origin.url ${PUBLIC_IDF_URL}
# check if all submodules are correctly synced to public repository
- git submodule init
- git config --get-regexp '^submodule\..*\.url$' || true
- git submodule update --recursive
- echo "IDF was cloned from ${PUBLIC_IDF_URL} completely"