ci: cram: create component jobs as manual by default

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 <petr.stetiar@prplfoundation.org>
This commit is contained in:
Petr Štetiar 2026-07-21 20:18:09 +02:00 committed by Hela Saadani
parent 3c56f4f028
commit 0054cef6b0
3 changed files with 25 additions and 14 deletions

View File

@ -1,7 +1,6 @@
variables:
CI_DESIGNATED_BRANCH: prpl/nightly
CI_DESIGNATED_BRANCH_SLUG: prpl-nightly
CRAM_COMPONENTS: prplos
include:
- local: .gitlab/build.yml

View File

@ -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

View File

@ -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 <Board> [<component>]`, 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 <Board> [<component>]`, 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.