Compare commits

...

7 Commits

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
Simon Glass
62d24f048a ci: Fix workflow rules syntax - remove quotes
Remove quotes around CI variable references in workflow rules
to match GitLab documentation syntax.
2025-12-23 16:45:03 -07:00
Simon Glass
0966fce08c test: Verify workflow rules work from master
This should test if MR pipelines are properly controlled by
workflow rules now that they're in the target branch.
2025-12-23 16:43:17 -07:00
Simon Glass
9472979a16 Merge branch 'cia' into 'master'
CI: Tidy up the variables

See merge request u-boot/u-boot!303
2025-12-23 23:41:41 +00:00
Simon Glass
170928aaa1 ci: Add workflow rules to control merge request pipelines
Prevent automatic merge request pipelines unless UTOOL_TRIGGER=1
is set. This allows utool to create controlled pipelines with
specific CI variables while preventing duplicate automatic pipelines.
2025-12-23 16:38:56 -07:00
2 changed files with 23 additions and 1 deletions

View File

@@ -3,6 +3,14 @@
include:
- local: '.gitlab-ci-release.yml'
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "push"
when: always
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always
- when: never
variables:
DEFAULT_TAG: ""
MIRROR_DOCKER: docker.io
@@ -41,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
@@ -142,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
@@ -224,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
@@ -369,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
@@ -714,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 +0,0 @@
test