ci(molecule): skip the Molecule runner when no scenario is selected
A pull request that selects no scenario still took the single Molecule runner slot to pull the controller image, select nothing and exit. The workflow now has three jobs. select runs the selector from main's copy in a job container on kamino-docker, in the molecule-controller pin, and outputs the selected list. scenarios runs it on kamino-molecule and is skipped when the list is empty. result runs always() and is the one job to require: it fails unless select passed and scenarios passed or was skipped for an empty list, because Gitea counts a skipped job as passing. Scheduled and dispatched runs still select every scenario. container.image cannot read env, so the controller pin is written in all three jobs; a test holds the copies equal. The pin moves to 0.1.1, which has git for the select job's checkout. Branch protection must then require "Molecule / Result (pull_request)". Closes #433 Assisted-by: Claude Code
This commit is contained in:
1 parent
492a68395e
commit
2d1f142662
5 files changed
+236
-37
No files matched your search
@@ -56,10 +56,10 @@ Every secret the workflows in [.gitea/workflows/](../../.gitea/workflows/) refer
|
||||
A checklist, not rules: what the repository and organisation settings should be. The maintainer
|
||||
applies them and checks them against this list after any change.
|
||||
|
||||
- Branch protection on `main`: required checks Lint, Build and Molecule; zero required approvals;
|
||||
"Require approval from code owners"; "Dismiss stale approvals"; block on rejected and on official
|
||||
review requests; block on an outdated branch; administrators cannot override; the approvals
|
||||
allowlist is the maintainer.
|
||||
- Branch protection on `main`: required checks Lint, Build and `Molecule / Result (pull_request)`;
|
||||
zero required approvals; "Require approval from code owners"; "Dismiss stale approvals"; block
|
||||
on rejected and on official review requests; block on an outdated branch; administrators cannot
|
||||
override; the approvals allowlist is the maintainer.
|
||||
- Merge allowlist on `main`: the maintainer, each trusted contributor and the Renovate bot.
|
||||
- Push allowlist on `release/*`: the maintainer; no rule for `renovate/*`.
|
||||
- Tag protection on `v*`, with the maintainer on its allowlist.
|
||||
|
||||
Reference in new issue
Block a user