Merge branch 'cic' into 'master'

CI: Support stage selection with merge requests

See merge request u-boot/u-boot!341
This commit is contained in:
Simon Glass
2025-12-24 06:39:56 +00:00
2 changed files with 18 additions and 10 deletions

View File

@@ -3,17 +3,13 @@
include:
- local: '.gitlab-ci-release.yml'
# Control when pipelines are created
workflow:
rules:
# Allow manual merge request pipelines when MANUAL_TRIGGER is set
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $MANUAL_TRIGGER == "1"
- if: $CI_PIPELINE_SOURCE == "push"
when: always
# Prevent automatic merge request pipelines
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
# Allow all other pipeline sources (push, manual, API)
- when: always
when: always
- when: never
variables:
DEFAULT_TAG: ""
@@ -53,6 +49,9 @@ stages:
# - privileged = true in /etc/gitlab-runner/config.toml
# OR passwordless sudo for: modprobe, cryptsetup, dd
rules:
# Skip if MR description contains [skip-pytest]
- if: $CI_MERGE_REQUEST_DESCRIPTION =~ /\[skip-pytest\]/
when: never
- if: $PYTEST == "1"
when: always
- if: $PYTEST == $CI_JOB_NAME
@@ -154,6 +153,9 @@ stages:
.world_build:
stage: world_build
rules:
# Skip if MR description contains [skip-world]
- if: $CI_MERGE_REQUEST_DESCRIPTION =~ /\[skip-world\]/
when: never
- if: $WORLD == "1"
when: always
- when: never
@@ -236,6 +238,9 @@ build all other platforms:
.test_suites:
stage: test_suites
rules:
# Skip if MR description contains [skip-suites]
- if: $CI_MERGE_REQUEST_DESCRIPTION =~ /\[skip-suites\]/
when: never
- if: $SUITES == "1"
when: always
- when: never
@@ -381,6 +386,9 @@ Examples:
.python_check_template:
stage: test.py
rules:
# Skip if MR description contains [skip-pytest]
- if: $CI_MERGE_REQUEST_DESCRIPTION =~ /\[skip-pytest\]/
when: never
- if: $PYTEST == "1"
when: always
- if: $PYTEST == $CI_JOB_NAME
@@ -726,6 +734,9 @@ coreboot test.py:
stage: sjg-lab
needs: []
rules:
# Skip if MR description contains [skip-sjg]
- if: $CI_MERGE_REQUEST_DESCRIPTION =~ /\[skip-sjg\]/
when: never
- if: $SJG_LAB == $ROLE || $SJG_LAB == "1"
when: always
- if: $CI_PIPELINE_SOURCE == "merge_request_event"

View File

@@ -1,3 +0,0 @@
test
test change
test workflow rules