From 118c58eecab1bf91f04f595cd2f2fdc5cadf9e21 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Tue, 21 Jul 2026 11:24:49 +0200 Subject: [PATCH] ci: move check_submodule_sync to pre_deploy stage --- .gitlab-ci.yml | 1 + .gitlab/ci/common.yml | 1 + .gitlab/ci/pre_check.yml | 21 --------------------- .gitlab/ci/pre_deploy.yml | 24 ++++++++++++++++++++++++ 4 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 .gitlab/ci/pre_deploy.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e36aa95780a..707db797a57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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" diff --git a/.gitlab/ci/common.yml b/.gitlab/ci/common.yml index d470a7b926c..61f1f3dd584 100644 --- a/.gitlab/ci/common.yml +++ b/.gitlab/ci/common.yml @@ -11,6 +11,7 @@ stages: - target_test - host_test - test_deploy + - pre_deploy - deploy - post_deploy diff --git a/.gitlab/ci/pre_check.yml b/.gitlab/ci/pre_check.yml index 15166402113..10de92a397e 100644 --- a/.gitlab/ci/pre_check.yml +++ b/.gitlab/ci/pre_check.yml @@ -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 diff --git a/.gitlab/ci/pre_deploy.yml b/.gitlab/ci/pre_deploy.yml new file mode 100644 index 00000000000..df8525dcd24 --- /dev/null +++ b/.gitlab/ci/pre_deploy.yml @@ -0,0 +1,24 @@ +.pre_deploy_template: + stage: pre_deploy + image: $ESP_ENV_IMAGE + +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"