ci: add pre-commit, lint and changelog configuration

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
Defame1297andClaude Sonnet 5.5 committed 2026-10-24 21:10:20 +00:00
1 parent a317ec3e93
commit 904d833a6f
9 files changed
+176

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
---
# Same profile as the environment repo. The production profile enforces
# var-naming[no-role-prefix]: every role variable carries the role name as a prefix.
profile: production
exclude_paths:
- .gitea
- .venv
- changelogs
- images
+8
View File
@@ -0,0 +1,8 @@
# Runner labels used by the workflows, so actionlint accepts them. These belong
# to the Collection's own runner (scoped to the mortis org); the production
# labels (docker, ubuntu-lxc, molecule) are deliberately not listed, so a
# workflow that names one fails actionlint.
self-hosted-runner:
labels:
- kamino-docker
- kamino-molecule
+82
View File
@@ -0,0 +1,82 @@
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
stages: ['pre-commit']
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
args: [--strict]
stages: ['pre-commit']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-toml
stages: ['pre-commit']
- id: check-merge-conflict
stages: ['pre-commit']
# Blocking. .gitea/actionlint.yaml declares the runner labels. The workflows use the
# github.* contexts (Gitea aliases them), because actionlint does not know gitea.*.
# actionlint runs shellcheck over run: blocks when shellcheck is on PATH.
- repo: https://github.com/rhysd/actionlint
rev: v1.7.12
hooks:
- id: actionlint
args: [-config-file, .gitea/actionlint.yaml]
files: ^\.gitea/workflows/.*\.ya?ml$
stages: ['pre-commit']
# ansible-lint and the changelog lint run from PATH (language: system): their
# versions are the pins in requirements-dev.txt, installed into a virtualenv by
# CI and locally. ansible-lint is the slowest hook, so fail_fast stops the run
# once it fails (a global fail_fast would hide every other failure).
- repo: local
hooks:
# REUSE compliance (licence files, SPDX data, REUSE.toml; docs/licensing.md in the
# environment repo). The wrapper tolerates only unused licence texts, see its docstring.
- id: reuse-lint
name: REUSE compliance
description: reuse lint, tolerating unused licence texts until the roles arrive
entry: python3 scripts/reuse_lint.py
language: system
pass_filenames: false
always_run: true
stages: ['pre-commit']
- id: antsibull-changelog-lint
name: Changelog fragments lint
description: antsibull-changelog lint over changelogs/
entry: antsibull-changelog lint
language: system
files: ^(changelogs/|galaxy\.yml$)
stages: ['pre-commit']
pass_filenames: false
- id: ansible-lint
name: ansible-lint
description: ansible-lint production profile, offline
entry: ansible-lint --offline --nocolor
language: system
files: ^(roles/|plugins/|meta/|galaxy\.yml$|\.ansible-lint$|\.yamllint$)
stages: ['pre-commit']
pass_filenames: false
require_serial: true
fail_fast: true
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
+25
View File
@@ -0,0 +1,25 @@
---
extends: default
ignore: |
.venv/**
# Written and rewritten by antsibull-changelog, which does not indent sequences.
changelogs/config.yaml
rules:
trailing-spaces:
level: error
comments:
# https://github.com/prettier/prettier/issues/6780
min-spaces-from-content: 1
# https://github.com/adrienverge/yamllint/issues/384
comments-indentation: false
document-start: disable
line-length:
max: 160
braces:
min-spaces-inside: 0
max-spaces-inside: 1
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
+2
View File
@@ -0,0 +1,2 @@
ancestor: null
releases: {}
+37
View File
@@ -0,0 +1,37 @@
add_plugin_period: true
changelog_nice_yaml: false
changelog_sort: alphanumerical
changes_file: changelog.yaml
changes_format: combined
ignore_other_fragment_extensions: true
keep_fragments: false
mention_ancestor: true
new_plugins_after_name: removed_features
notesdir: fragments
output:
- file: CHANGELOG.rst
format: rst
prelude_section_name: release_summary
prelude_section_title: Release Summary
sanitize_changelog: true
sections:
- - major_changes
- Major Changes
- - minor_changes
- Minor Changes
- - breaking_changes
- Breaking Changes / Porting Guide
- - deprecated_features
- Deprecated Features
- - removed_features
- Removed Features (previously deprecated)
- - security_fixes
- Security Fixes
- - bugfixes
- Bugfixes
- - known_issues
- Known Issues
title: mortis.kamino
trivial_section_name: trivial
use_fqcn: true
vcs: auto
View File
Whitespace-only changes.
+2
View File
@@ -0,0 +1,2 @@
trivial:
- Initial repository scaffolding, CI workflows and the molecule base image definition.
+10
View File
@@ -0,0 +1,10 @@
# Pinned tooling for lint and build, used by CI (.gitea/workflows) and locally:
# python3 -m venv .venv && . .venv/bin/activate && pip install -r requirements-dev.txt
# ansible-core and ansible-lint match the environment repo's runner image
# (hosts/group_vars/all/ci_python_tools.yml there). Renovate bumps these pins.
ansible-core==2.19.14
ansible-lint==26.6.0
pre-commit==4.6.2
antsibull-changelog==0.35.2
galaxy-importer==0.4.44
reuse==6.2.0