Skip to content

Commit

Permalink
Update renovate config
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Aug 28, 2024
1 parent a3793cf commit 3662627
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 25 deletions.
6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>nginxinc/k8s-common"
]
}
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ repos:
- id: no-commit-to-branch
- id: requirements-txt-fixer
- id: fix-byte-order-marker
- id: detect-private-key

- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
Expand Down
147 changes: 147 additions & 0 deletions default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"automerge": true,
"automergeStrategy": "squash",
"commitBodyTable": true,
"configMigration": true,
"customDatasources": {
"nginx-plus": {
"defaultRegistryUrlTemplate": "https://raw.githubusercontent.com/lucacome/renovate-datasource/main/nginx-plus/releases.json",
"format": "json"
}
},
"extends": [
"config:recommended",
"docker:enableMajor",
"helpers:pinGitHubActionDigests",
":gitSignOff",
":maintainLockFilesMonthly",
":disableRateLimiting"
],
"ignorePaths": [
"**/node_modules/**"
],
"ignorePresets": [
":ignoreModulesAndTests"
],
"labels": [
"dependencies"
],
"packageRules": [
{
"enabled": false,
"matchPackageNames": [
"boto3"
],
"matchUpdateTypes": [
"patch"
]
},
{
"addLabels": [
"go"
],
"matchDatasources": [
"go",
"golang-version"
]
},
{
"addLabels": [
"python"
],
"matchDatasources": [
"pypi"
]
},
{
"addLabels": [
"javascript"
],
"matchDatasources": [
"npm"
],
"rangeStrategy": "bump"
},
{
"addLabels": [
"docker"
],
"matchDatasources": [
"docker"
]
},
{
"addLabels": [
"helm"
],
"matchDatasources": [
"helm"
]
}
],
"postUpdateOptions": [
"gomodTidy",
"gomodUpdateImportPaths",
"yarnDedupeHighest",
"npmDedupe"
],
"pre-commit": {
"enabled": true
},
"rebaseWhen": "behind-base-branch",
"regexManagers": [
{
"datasourceTemplate": "github-tags",
"description": "Update Github Action references in the Markdown files",
"fileMatch": [
"\\.md$"
],
"matchStrings": [
"\\suses: (?<depName>[\\w-]+/[\\w-]+)(?<path>/.*)?@(?<currentValue>v\\d+\\.\\d+\\.\\d+)",
"\\suses: (?<depName>[\\w-]+/[\\w-]+)(?<path>/.*)?@(?<currentDigest>[a-z0-9]{40}|[a-z0-9]{64}) # (?<currentValue>v\\d+\\.\\d+\\.\\d+)"
],
"versioningTemplate": "semver"
},
{
"description": "Update _VERSION variables in shell scripts and Makefiles",
"fileMatch": [
"\\.sh$",
"(^|/)Makefile$"
],
"matchStrings": [
"# renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s[A-Z_]+?_VERSION = (?<currentValue>.+?)\\s"
]
},
{
"description": "Update _VERSION variables in Dockerfiles",
"fileMatch": [
"(^|/|\\.)Dockerfile$",
"(^|/)Dockerfile\\.[^/]*$"
],
"matchStrings": [
"# renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s(?:ENV|ARG) .+?_VERSION=(?<currentValue>.+?)\\s"
]
},
{
"description": "Update `version:` and `_VERSION:` variables in github workflows",
"fileMatch": [
"^\\.github/workflows/[^/]+\\.ya?ml$"
],
"matchStrings": [
"\\s+(?:[a-z]-)?version: (?<currentValue>.+?) # renovate: datasource=(?<datasource>.+?) depName=(?<depName>.+?)(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>.+?))?\\s",
"\\s*[A-Z_]+?_VERSION=(?<currentValue>.+?) # renovate: datasource=(?<datasource>.+?) depName=(?<depName>.+?)(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>.+?))?\\s"
]
},
{
"fileMatch": [
"\\.go$"
],
"matchStrings": [
"// renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: registryUrl=(?<registryUrl>.+?))?(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s.+?Version :?= \"(?<currentValue>.+?)\"\\s"
],
"versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}"
}
],
"timezone": "America/Los_Angeles"
}
39 changes: 39 additions & 0 deletions labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
change:
- head-branch: ["^change/"]

enhancement:
- head-branch: ["^feature/", "^feat/", "^enhancement/", "^enh/"]

bug:
- head-branch: ["^fix/", "^bug/"]

chore:
- head-branch: ["^chore/"]

tech-debt:
- head-branch: ["^tech-debt/", "^techdebt/", "^debt/"]

documentation:
- head-branch: ["^docs/", "^doc/"]
- changed-files:
- any-glob-to-any-file: "**/*.md"

dependencies:
- head-branch:
["^deps/", "^dep/", "^dependabot/", "^renovate/", "pre-commit-ci-update-config"]
- changed-files:
- any-glob-to-any-file: ["go.mod", "go.sum"]

tests:
- any:
- head-branch: ["^tests/", "^test/"]
- changed-files:
- any-glob-to-any-file: "tests/**/*"
- all:
- changed-files:
- all-globs-to-all-files: ["!tests/requirements.txt", "!tests/**/go.mod", "!tests/**/go.sum"]

helm-chart:
- head-branch: ["^helm/", "^helm-chart/"]
- changed-files:
- any-glob-to-any-file: ["charts/**/*"]
25 changes: 0 additions & 25 deletions renovate.json

This file was deleted.

0 comments on commit 3662627

Please sign in to comment.