From fd191f41a9d7642353fd124479748b88ef16381d Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Tue, 3 Feb 2026 15:34:16 +0100 Subject: [PATCH] ci: move `check_submodule_sync` to `pre_check` stage --- .gitlab-ci.yml | 8 ++++---- .gitlab/ci/deploy.yml | 23 ----------------------- .gitlab/ci/pre_check.yml | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a401e61b21..eb3920faec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,10 @@ workflow: # Place the default settings in `.gitlab/ci/common.yml` instead include: + - project: "ci/actions/common" + file: + - "templates/idf/deploy-github.yml" + - "templates/idf/deploy-docs.yml" - ".gitlab/ci/danger.yml" - ".gitlab/ci/common.yml" - ".gitlab/ci/rules.yml" @@ -30,7 +34,3 @@ include: - ".gitlab/ci/deploy.yml" - ".gitlab/ci/post_deploy.yml" - ".gitlab/ci/test-win.yml" - - project: "ci/actions/common" - file: "templates/idf/deploy-github.yml" - - project: "ci/actions/common" - file: "templates/idf/deploy-docs.yml" diff --git a/.gitlab/ci/deploy.yml b/.gitlab/ci/deploy.yml index 1406076e1e..2005b26e70 100644 --- a/.gitlab/ci/deploy.yml +++ b/.gitlab/ci/deploy.yml @@ -24,29 +24,6 @@ - echo "Installing esp-metrics-cli tool" - pip install "esp-metrics-cli>=0.3,<1" -check_submodule_sync: - extends: - - .deploy_job_template - - .rules:test:submodule - stage: test_deploy - 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" - dependencies: [] - 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" - deploy_update_SHA_in_esp-dockerfiles: extends: - .deploy_job_template diff --git a/.gitlab/ci/pre_check.yml b/.gitlab/ci/pre_check.yml index 49c3920ebd..c1472d19d5 100644 --- a/.gitlab/ci/pre_check.yml +++ b/.gitlab/ci/pre_check.yml @@ -120,6 +120,27 @@ 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" + pipeline_variables: extends: - .pre_check_template