From ad6c76dd4ba1f45cb5ae160cb063f96b02404d49 Mon Sep 17 00:00:00 2001 From: Stephan Schnabel Date: Thu, 12 Jun 2025 12:45:47 +0200 Subject: [PATCH] Add kokuwio preset --- .markdownlint.yaml | 9 +++++++ .woodpecker.yaml | 21 +++++++++++++++ .yamllint.yaml | 15 +++++++++++ README.md | 10 +++++++ default.json | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 121 insertions(+) create mode 100644 .markdownlint.yaml create mode 100644 .woodpecker.yaml create mode 100644 .yamllint.yaml create mode 100644 README.md create mode 100644 default.json diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..5f08047 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,9 @@ +# Default state for all rules +default: true + +# MD009 - Trailing spaces +MD009: + strict: true + +# MD013 - Line length +MD013: false diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..a358f5a --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,21 @@ +when: + event: [manual, pull_request, push] + branch: main + path: [.woodpecker.yaml, default.json, "**/*.yaml", "**/*.md"] + +steps: + + renovate: + image: kokuwaio/renovate-config-validator + depends_on: [] + when: [path: [.woodpecker.yaml, default2.json]] + + yaml: + image: kokuwaio/yamllint + depends_on: [] + when: [path: [.woodpecker.yaml, .yamllint.yaml, "**/*.yaml"]] + + markdown: + image: kokuwaio/markdownlint + depends_on: [] + when: [path: [.woodpecker.yaml, .markdownlint.yaml, "**/*.md"]] diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..21966f2 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,15 @@ +extends: default + +## see https://yamllint.readthedocs.io/en/stable/rules.html +rules: + + # no need for document start + document-start: disable + + # line length is not important + line-length: disable + + # force double quotes everywhere + quoted-strings: + quote-type: double + required: only-when-needed diff --git a/README.md b/README.md new file mode 100644 index 0000000..ae847c8 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Renovate presets + +Usage: + +```json +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["local>infrastructure/renovate-config", ":reviewer(stephan.schnabel)"] +} +``` diff --git a/default.json b/default.json new file mode 100644 index 0000000..ee92762 --- /dev/null +++ b/default.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "gitAuthor": "Renovate ", + "timezone": "Europe/Berlin", + "labels": ["renovate", "renovate-manager/{{{manager}}}", "renovate-type/{{{updateType}}}"], + "assignees": ["renovate"], + "dependencyDashboard": true, + "dependencyDashboardLabels": ["renovate"], + "dependencyDashboardApproval": true, + "dependencyDashboardAutoclose": false, + "dependencyDashboardHeader": "", + "dependencyDashboardFooter": "", + "separateMajorMinor": true, + "separateMinorPatch": true, + "separateMultipleMinor": true, + "separateMultipleMajor": true, + "pinDigests": true, + "automerge": false, + "automergeStrategy": "fast-forward", + "rebaseWhen": "behind-base-branch", + "platformAutomerge": true, + "semanticCommits": "enabled", + "commitMessageExtra": "from {{{version}}} to {{#if isPinDigest}}{{{newDigestShort}}}{{else}}{{#if isMajor}}{{prettyNewMajor}}{{else}}{{#if isSingleVersion}}{{prettyNewVersion}}{{else}}{{#if newValue}}{{{newValue}}}{{else}}{{{newDigestShort}}}{{/if}}{{/if}}{{/if}}{{/if}}", + "packageRules": [ + { + "description": "Automerge kustomize digests.", + "matchManagers": ["kustomize"], + "matchUpdateTypes": ["digest"], + "dependencyDashboardApproval": false, + "automergeType": "branch", + "automerge": true, + "ignoreTests": true + },{ + "description": "Add depdendency from to commit messages.", + "matchUpdateTypes": ["patch", "minor", "major"], + "commitMessageExtra": "from {{{displayFrom}}} to {{{displayTo}}}" + },{ + "description": "Create pr's for patches/digests and automerge.", + "matchUpdateTypes": ["patch", "digest", "pin", "lockFileMaintenance"], + "dependencyDashboardApproval": false, + "automerge": true + },{ + "description": "Create pr's for minor updates without approval.", + "matchUpdateTypes": ["minor"], + "dependencyDashboardApproval": false + },{ + "description": "Do not pin woodpecker images because this would produce a lot of noise.", + "matchManagers": ["woodpecker"], + "pinDigests": false + },{ + "description": "Ignore preset manager", + "matchManagers": ["renovate-config-presets"], + "enabled": false + },{ + "description": "Ignore github actions", + "matchManagers": ["github-actions"], + "enabled": false + },{ + "matchDatasources": ["maven"], + "registryUrls": ["http://mirror.woodpecker.svc.cluster.local/maven2"] + },{ + "matchDatasources": ["npm"], + "registryUrls": ["http://mirror.woodpecker.svc.cluster.local/npm"] + } + ] +}