From 4b1072a6d790742a938b627c700073cb6a9b41f5 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Fri, 6 Feb 2026 15:46:28 +0100 Subject: [PATCH] ci: use common workflow that auto-cancel earlier MR pipelines --- .gitlab-ci.yml | 16 +--------------- .gitlab/ci/common.yml | 7 ------- .gitlab/ci/docs.yml | 3 --- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb3920faecd..e55ad1825dd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,23 +1,9 @@ -workflow: - rules: - # Disable those non-protected push triggered pipelines - - if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && $CI_PIPELINE_SOURCE == "push"' - when: never - # merged result pipelines - - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA - variables: - PIPELINE_COMMIT_SHA: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA - # else - - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA == null || $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA == "" - variables: - PIPELINE_COMMIT_SHA: $CI_COMMIT_SHA - - when: always - # Place the default settings in `.gitlab/ci/common.yml` instead include: - project: "ci/actions/common" file: + - "templates/stable/default-workflow.yml" - "templates/idf/deploy-github.yml" - "templates/idf/deploy-docs.yml" - ".gitlab/ci/danger.yml" diff --git a/.gitlab/ci/common.yml b/.gitlab/ci/common.yml index 771b943180a..55744027598 100644 --- a/.gitlab/ci/common.yml +++ b/.gitlab/ci/common.yml @@ -314,10 +314,3 @@ default: - fetch_submodules - export EXTRA_CFLAGS=${PEDANTIC_CFLAGS} - export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS} - retry: - max: 2 - when: - # In case of a runner failure we could hop to another one, or a network error could go away. - - runner_system_failure - # Job execution timeout may be caused by a network issue. - - job_execution_timeout diff --git a/.gitlab/ci/docs.yml b/.gitlab/ci/docs.yml index 6d295dfa4c1..19f2f432261 100644 --- a/.gitlab/ci/docs.yml +++ b/.gitlab/ci/docs.yml @@ -16,9 +16,6 @@ .patterns-example-readme: &patterns-example-readme - "examples/**/*.md" -.patterns-docs-preview: &patterns-docs-preview - - "docs/**/*" - .if-protected-check: &if-protected-check if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/)'