From f6e7ab370ab4c7f2446720c852c073569664bd12 Mon Sep 17 00:00:00 2001 From: "igor.udot" Date: Thu, 12 Mar 2026 09:51:47 +0800 Subject: [PATCH] ci: manual job to block pipeline start --- .gitlab-ci.yml | 1 + .gitlab/ci/common.yml | 1 + .gitlab/ci/deploy.yml | 6 ++++-- .gitlab/ci/host-test.yml | 4 +++- .gitlab/ci/integration_test.yml | 4 +++- .gitlab/ci/manual_gate.yml | 11 +++++++++++ .gitlab/ci/test-win.yml | 12 +++++++++--- 7 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 .gitlab/ci/manual_gate.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e55ad1825d..1c95ffaadd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,7 @@ include: - ".gitlab/ci/danger.yml" - ".gitlab/ci/common.yml" - ".gitlab/ci/rules.yml" + - ".gitlab/ci/manual_gate.yml" - ".gitlab/ci/upload_cache.yml" - ".gitlab/ci/docs.yml" - ".gitlab/ci/static-code-analysis.yml" diff --git a/.gitlab/ci/common.yml b/.gitlab/ci/common.yml index 1bd47732df..7ac9dcbffa 100644 --- a/.gitlab/ci/common.yml +++ b/.gitlab/ci/common.yml @@ -2,6 +2,7 @@ # Default Variables # ##################### stages: + - manual_gate - upload_cache - pre_check - build diff --git a/.gitlab/ci/deploy.yml b/.gitlab/ci/deploy.yml index 65da4ccf1e..ee220774e5 100644 --- a/.gitlab/ci/deploy.yml +++ b/.gitlab/ci/deploy.yml @@ -7,8 +7,10 @@ stage: deploy tags: [ fast_run, shiny ] image: python:3.13-slim - dependencies: [] - needs: [] + needs: + - job: manual_gate + optional: true + dependencies: null variables: PIP_CACHE_DIR: ".cache/pip" # Metrics - related env vars diff --git a/.gitlab/ci/host-test.yml b/.gitlab/ci/host-test.yml index 80fc3c62f7..f9ef743d9d 100644 --- a/.gitlab/ci/host-test.yml +++ b/.gitlab/ci/host-test.yml @@ -325,7 +325,9 @@ build_docker: - .before_script:minimal - .rules:build:docker stage: host_test - needs: [] + needs: + - job: manual_gate + optional: true image: espressif/docker-builder:1 tags: [shiny, dind] variables: diff --git a/.gitlab/ci/integration_test.yml b/.gitlab/ci/integration_test.yml index 52b0af8299..963f820dfa 100644 --- a/.gitlab/ci/integration_test.yml +++ b/.gitlab/ci/integration_test.yml @@ -40,7 +40,9 @@ gen_integration_pipeline: GIT_STRATEGY: "fetch" SUBMODULES_TO_FETCH: "none" GIT_LFS_SKIP_SMUDGE: 1 - needs: [] + needs: + - job: manual_gate + optional: true artifacts: paths: - idf-integration-ci/child_pipeline/ diff --git a/.gitlab/ci/manual_gate.yml b/.gitlab/ci/manual_gate.yml new file mode 100644 index 0000000000..d22fb140cf --- /dev/null +++ b/.gitlab/ci/manual_gate.yml @@ -0,0 +1,11 @@ +manual_gate: + stage: manual_gate + image: $ESP_ENV_IMAGE + tags: [fast_run, shiny] + allow_failure: false + rules: + - if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/) && $CI_PIPELINE_SOURCE == "push"' + when: manual + - when: never + script: + - echo "Manual approval received for master pipeline." diff --git a/.gitlab/ci/test-win.yml b/.gitlab/ci/test-win.yml index d66b81ddd7..bf2a116e91 100644 --- a/.gitlab/ci/test-win.yml +++ b/.gitlab/ci/test-win.yml @@ -94,7 +94,9 @@ pytest_build_system_win: - .test_build_system_template_win - .rules:labels:windows_pytest_build_system parallel: 6 - needs: [] + needs: + - job: manual_gate + optional: true tags: [windows-build, brew] artifacts: paths: @@ -109,7 +111,9 @@ pytest_build_system_win_minimal_cmake: extends: - .test_build_system_template_win - .rules:labels:windows_pytest_build_system - needs: [] + needs: + - job: manual_gate + optional: true tags: [windows-build, brew] artifacts: paths: @@ -142,7 +146,9 @@ pytest_buildv2_system_win: - .test_build_system_template_win - .rules:labels:buildv2 parallel: 2 - needs: [] + needs: + - job: manual_gate + optional: true tags: [windows-build, brew] artifacts: paths: