Files
Kamino/CONTRIBUTING.md
T
Defame1297andClaude Sonnet 5.5 4d330d41c7
Build / build (pull_request) Failing after 12s
Lint / lint (pull_request) Successful in 21s
Molecule / molecule (pull_request) Successful in 6m53s
ci(molecule): run only the scenarios of the roles a pull request changes
A pull request now runs the scenarios of the roles it touches, none when it
touches only paths no scenario reads, and everything for any other file, for
every push to main and for manual dispatch. The job stays unconditional so
Molecule can remain a required check.

scripts/select_molecule_scenarios.py makes the choice and is run from the base
branch's copy, so a pull request cannot edit its own rules. A changed role
that exists but has no scenario fails instead of passing with nothing tested.

The scenario loop no longer gives molecule the list as stdin, which a child
could have drained, and fails when it ran fewer scenarios than were selected.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
2026-11-14 11:05:46 +00:00

4.3 KiB

Contributing

  • Open a pull request against main. The forge does not allow self-registration, so only accounts the maintainer has created can open pull requests or issues for now. Fork pull requests are not a supported path: a fork controls its own workflow file, and a test showed workflows starting without an approval step. Workflows on fork pull requests get no secrets and a read-only token. To discuss a contribution, write to the address in SECURITY.md.
  • Commit messages follow Conventional Commits (feat:, fix:, docs:, ci: ...). CI checks every commit.
  • Every user-visible change needs a changelog fragment in changelogs/fragments/ (antsibull-changelog format, a YAML file with a section such as minor_changes: or bugfixes:). Pure CI or docs changes use trivial:.
  • Role variables carry the role name as a prefix (<role>_<name>).
  • Third-party material needs an SPDX header, a REUSE.toml annotation (it overrides file headers) and an entry in NOTICE.
  • Set up the tooling once per clone with scripts/dev-setup.sh: it creates a virtualenv with the pinned tools (requirements-dev.txt) and installs git hooks that find them. Then pre-commit run --all-files before pushing.
  • Never commit credentials, tokens or key material.
  • Releases are cut by the maintainer: bump version in galaxy.yml, add a release_summary: fragment, run antsibull-changelog release in a release PR (commit the generated CHANGELOG.rst and changelogs/.plugin-cache.yaml), then push an annotated vX.Y.Z tag.

Dependency and image updates

  • requirements-dev.txt, .pre-commit-config.yaml and images/** are inputs of the CI and molecule images. A pull request that changes one needs a higher version: for that image in .gitea/workflows/image.yml (python3 scripts/bump_image_versions.py makes the edit; the Check image versions were bumped step enforces it). After the merge, image.yml builds the image on main, and a second pull request moves the image:<version>@sha256:<digest> pins in lint.yml, build.yml and molecule.yml to the printed digest. That second pull request touches no image.yml trigger path, so it rebuilds nothing.
  • These files are in galaxy.yml build_ignore: such bumps do not change the Collection or its version. A change consumers can see needs a changelog fragment, and only the maintainer bumps the version and tags.
  • renovate.json configures dependency bumps (minor and patch automerge, majors by hand). Renovate runs for this repository in .gitea/workflows/renovate.yml (daily cron on the Collection's own runner, as a Kamino-only bot user (repository secret RENOVATE_BOT_TOKEN); no cluster code involved). To dry-run after changing the config: Actions > Renovate > Run workflow with dry_run=true, then read the debug log (the job fails on a failed clone or an ERROR problem). The dry run proves reads (and runs the post-upgrade task); whether the bot can push and open a pull request, and whether such pull requests start the PR workflows, only the first live run shows (open item, see CLAUDE.md). Pull requests from renovate/ branches must pass scripts/check_bot_pr_diff.py, which only allows version, tag, digest and pin lines.
  • Workflows must not mention git.rkdr.net/defame1297/ (the production image set); the Check image pins step fails if they do.

Maintainer setup

Settings the workflows cannot enforce and the repository needs before it accepts outside contributions:

  • Protect the v* tags so only maintainers can create them. A tag run uses the workflow files of the tagged commit and may receive organisation secrets.
  • Protect main: pull request required, with the Lint and Build checks. Molecule has no path filter on pull requests (the job always starts and chooses its scenarios itself), so it can be made a required check as well; that is the operator's decision.
  • The image workflow (.gitea/workflows/image.yml) tries the Actions job token first; Gitea 28 refuses it for an organisation's packages, so it pushes with the organisation secrets PACKAGE_PUSH_USER and PACKAGE_PUSH_TOKEN (a bot user with write access to the organisation's packages and a token with only the write:package scope). Keep those the only credentials stored at organisation level.