Compare commits

...

3 Commits
cib ... cic

Author SHA1 Message Date
Simon Glass
ce0a74a60d CI: Support stage selection with merge requests
Currently the stage/board selection only works with normal pushes, since
gitlab unfortunately drops CI variables when starting an MR pipeline.

Fix this by looking for tags in the MR description. This only supports
stage-selection, not individual boards.

Simplify the workflow since the previous changes are now not needed.
Cover-letter:
Updates for the new utool
This series includes a patch to make CI work with the way utool
operates, specifically to allow merge requests to honour its requests.

It also drops an unwanted test file.
END

Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-23 23:38:43 -07:00
Simon Glass
6b12f88b54 test: Remove temporary test file
Remove test-file which was used for testing purposes and is no longer
needed.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-23 20:37:59 -07:00
Simon Glass
57b25587bc Merge branch 'cib' into 'master'
test: Verify workflow rules work from master

See merge request u-boot/u-boot!304
2025-12-23 23:46:50 +00:00
2 changed files with 18 additions and 10 deletions

View File

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

View File

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