diff --git a/.gitea/workflows/molecule.yml b/.gitea/workflows/molecule.yml index 9fae829..4c96488 100644 --- a/.gitea/workflows/molecule.yml +++ b/.gitea/workflows/molecule.yml @@ -21,13 +21,6 @@ on: # yamllint disable-line rule:truthy pull_request: branches: - main - paths: - - 'roles/**' - - 'extensions/**' - - 'plugins/**' - - 'meta/**' - - 'galaxy.yml' - - '.gitea/workflows/molecule.yml' push: branches: - main @@ -50,12 +43,14 @@ concurrency: jobs: molecule: - # Same-repo, non-bot branches only; a push to main or a manual dispatch always runs. + # Same-repo branches only (bot branches included: a Renovate pin pull request is what tests a new + # image); a push to main or a manual dispatch always runs. No paths filter on pull requests, so + # that Molecule can be a required check: a required check that a pull request never starts would + # block it. A fork pull request is skipped (and the repository takes none). if: >- github.repository == 'mortis/kamino' && (github.event_name != 'pull_request' || - (github.event.pull_request.head.repo.full_name == github.repository && - !startsWith(github.head_ref, 'renovate/'))) + github.event.pull_request.head.repo.full_name == github.repository) runs-on: [kamino-molecule] timeout-minutes: 30 env: diff --git a/.gitea/workflows/renovate.yml b/.gitea/workflows/renovate.yml index 6514296..65b4621 100644 --- a/.gitea/workflows/renovate.yml +++ b/.gitea/workflows/renovate.yml @@ -103,6 +103,15 @@ jobs: problems = list(report.get("problems", [])) for repo in report.get("repositories", {}).values(): problems.extend(repo.get("problems", [])) + # The shape of the report, once, so that a check on a failed post-upgrade task can be + # written against a real field: top-level keys, then per branch its keys and short values. + print("Renovate report keys: " + ", ".join(sorted(report))) + for name, repo in report.get("repositories", {}).items(): + print("repository " + name + " keys: " + ", ".join(sorted(repo))) + for branch in repo.get("branches", []): + print(" branch: " + ", ".join( + k + "=" + str(v)[:60].replace("\n", " ") for k, v in sorted(branch.items()) + if k != "upgrades")) bad = [p for p in problems if p.get("level", 0) >= 50] for p in bad: print("::error::Renovate problem: " + str(p.get("msg", ""))) diff --git a/CLAUDE.md b/CLAUDE.md index 93f67ee..4be36ec 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,6 +40,8 @@ protection, or create tags: those are the operator's. - Lint and Build run in the `ci` image. After the checkout they compare the pin files with the checksums baked into the image: a PR that changes `requirements-dev.txt` or `.pre-commit-config.yaml` takes the slower path that installs the pinned tools. +- Molecule runs on every same-repo pull request, Renovate's included (a new image is tested by its own pin + pull request), with no path filter, so that it can be a required check. Fork pull requests are skipped. - Molecule discovers `extensions/molecule/*/` and `roles/*/molecule/*/`. The `image-smoke` and `image-smoke-2604` scenarios test the molecule images themselves (24.04 and 26.04); a role scenario that must pass on both takes `image: ${MOLECULE_IMAGE}` or `${MOLECULE_IMAGE_2604}` per platform.