diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30f9a1b777..8b4b9324d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,6 +29,7 @@ include: - ".gitlab/ci/build.yml" - ".gitlab/ci/integration_test.yml" - ".gitlab/ci/host-test.yml" + - ".gitlab/ci/pre_deploy.yml" - ".gitlab/ci/deploy.yml" - ".gitlab/ci/post_deploy.yml" - ".gitlab/ci/test-win.yml" diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index d5e5e76bac..279d8e9e85 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -110,6 +110,18 @@ build_clang_test_apps_riscv: #################### # Dynamic Pipeline # #################### +pre_check_complete: + stage: build + image: $ESP_ENV_IMAGE + tags: [fast_run, shiny] + variables: + GIT_STRATEGY: none + cache: [] + before_script: [] + dependencies: [] + script: + - echo "pre_check stage completed" + generate_build_child_pipeline: extends: - .build_template @@ -117,6 +129,8 @@ generate_build_child_pipeline: dependencies: # set dependencies to null to avoid missing artifacts issue needs: - pipeline_variables + - job: pre_check_complete + artifacts: false - job: baseline_manifest_sha optional: true artifacts: diff --git a/.gitlab/ci/common.yml b/.gitlab/ci/common.yml index a19adcf0c1..77e27375b8 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/integration_test.yml b/.gitlab/ci/integration_test.yml index 963f820dfa..9c539bd646 100644 --- a/.gitlab/ci/integration_test.yml +++ b/.gitlab/ci/integration_test.yml @@ -43,6 +43,8 @@ gen_integration_pipeline: needs: - job: manual_gate optional: true + - job: pre_check_complete + artifacts: false artifacts: paths: - idf-integration-ci/child_pipeline/ diff --git a/.gitlab/ci/pre_check.yml b/.gitlab/ci/pre_check.yml index 10116a7153..a6e038ca9b 100644 --- a/.gitlab/ci/pre_check.yml +++ b/.gitlab/ci/pre_check.yml @@ -1,7 +1,7 @@ .pre_check_template: stage: pre_check image: $ESP_ENV_IMAGE - tags: [build, shiny] + tags: [fast_run, shiny] dependencies: # set dependencies to null to avoid missing artifacts issue check_version: @@ -133,27 +133,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" - snapshot_known_failure_cases: extends: @@ -173,7 +152,6 @@ baseline_manifest_sha: extends: - .pre_check_template - .rules:dev-push - tags: [fast_run, shiny] script: - | # merged results pipelines, by default @@ -205,7 +183,6 @@ retry_failed_jobs: extends: - .pre_check_template - .rules:dev-push - tags: [shiny, fast_run] allow_failure: true script: - echo "Retrieving and retrying all failed jobs for the pipeline..." diff --git a/.gitlab/ci/pre_deploy.yml b/.gitlab/ci/pre_deploy.yml new file mode 100644 index 0000000000..d18b619e04 --- /dev/null +++ b/.gitlab/ci/pre_deploy.yml @@ -0,0 +1,25 @@ +.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"