From 0054cef6b094729a9a394ae3cd395a782807c55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 21 Jul 2026 20:18:09 +0200 Subject: [PATCH] ci: cram: create component jobs as manual by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Component jobs start automatically whenever CRAM_COMPONENTS selects them, and the variable defaults to prplos. Every merge-request pipeline therefore schedules six hardware jobs whether or not anybody needs them, and the bucket choice is fixed before the pipeline exists. The non-DUT manifest lint also starts automatically in non-scheduled pipelines. Testbed time is the scarce resource, and the build test jobs feeding these DUT jobs are already manual in merge-request pipelines. The natural flow is to pick buckets after a build finishes, not at pipeline creation. The lint should follow the same opt-in flow. Drop the CRAM_COMPONENTS default and add trailing manual rules so every component job and the lint appear as optional play buttons in non-scheduled pipelines. Manually started jobs never gate the pipeline result. With no opt-in variable or release-tag override, no cram-related job at all, lint included, starts automatically. Setting CRAM_COMPONENTS still starts the listed buckets automatically with each board's existing blocking behavior. The automatic full run in prplware release tag pipelines is unchanged. Assisted-by: claude:fable-5 References: CI-7 Signed-off-by: Petr Štetiar --- .gitlab-ci.yml | 1 - .gitlab/testbed.yml | 5 ++++- .gitlab/tests/cram/README.md | 33 +++++++++++++++++++++------------ 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db80e4fd91..4ef595ff01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ variables: CI_DESIGNATED_BRANCH: prpl/nightly CI_DESIGNATED_BRANCH_SLUG: prpl-nightly - CRAM_COMPONENTS: prplos include: - local: .gitlab/build.yml diff --git a/.gitlab/testbed.yml b/.gitlab/testbed.yml index 4eedee498f..68ab3bc49f 100644 --- a/.gitlab/testbed.yml +++ b/.gitlab/testbed.yml @@ -228,6 +228,8 @@ - if: '$COMPONENT == "prplmesh" && $CRAM_COMPONENTS =~ /(^|,)prplmesh($|,)/' - if: '$COMPONENT == "lcm" && $CRAM_COMPONENTS =~ /(^|,)lcm($|,)/' - if: '$COMPONENT == "prplos" && $CRAM_COMPONENTS =~ /(^|,)prplos($|,)/' + - when: manual + allow_failure: true variables: COMPONENT: prplos script: @@ -249,7 +251,8 @@ lint cram component manifest: rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' when: never - - when: on_success + - when: manual + allow_failure: true script: - | export GIT_CONFIG_COUNT=1 diff --git a/.gitlab/tests/cram/README.md b/.gitlab/tests/cram/README.md index c6455a5848..0f61e15890 100644 --- a/.gitlab/tests/cram/README.md +++ b/.gitlab/tests/cram/README.md @@ -69,9 +69,17 @@ module. Executable scripts follow the repository's hyphenated CLI convention. ## Selecting pipeline jobs -Set the pipeline-level `CRAM_COMPONENTS` variable to a comma-separated list -containing one or more of `full`, `prplmesh`, `lcm`, and `prplos`. Do not add -spaces around the commas. The default is `prplos`. +Non-scheduled pipelines create every component job and the non-DUT +`lint cram component manifest` job as manual jobs and start none of them. +Play the lint at any time, or play the wanted bucket jobs once the board's +build test job has finished. Manually started jobs never gate the pipeline +result. + +To start buckets automatically, set the pipeline-level `CRAM_COMPONENTS` +variable to a comma-separated list containing one or more of `full`, +`prplmesh`, `lcm`, and `prplos`. Do not add spaces around the commas. Listed +buckets start as soon as their board's build succeeds and keep the board's +existing blocking behavior. The variable is unset by default. For example: @@ -81,12 +89,12 @@ CRAM_COMPONENTS=lcm,prplos CRAM_COMPONENTS=full ``` -Release tag pipelines (`prplware-v*`) start the `full` jobs automatically. -Scheduled pipelines never create cram jobs, because they also never create -the build jobs these jobs need. Other pipeline sources run the jobs named by -the list. The job names have the form -`cram []`, such as `cram OSPv2 [lcm]`. The trailing -component name lets GitLab group the four jobs for a board in the pipeline UI. +Release tag pipelines (`prplware-v*`) start the `full` jobs automatically; +the other buckets stay manual there. Scheduled pipelines never create cram +jobs, because they also never create the build jobs these jobs need. The job +names have the form `cram []`, such as `cram OSPv2 [lcm]`. +The trailing component name lets GitLab group the four jobs for a board in +the pipeline UI. ## Resolving tests locally @@ -127,6 +135,7 @@ the two baseline options are mutually exclusive. The lint still succeeds when a newly added test enters the `prplos` remainder, but prints a warning so the assignment can be reviewed. -Merge request pipelines pass the diff base to this lint automatically. Other -pipeline types run the same manifest checks without a comparison baseline; -scheduled pipelines skip the job. +The lint is a manual, non-gating play button in every non-scheduled pipeline. +When played in a merge request pipeline, it still receives the diff base +automatically. Other pipeline types run the same manifest checks without a +comparison baseline; scheduled pipelines skip the job.