Skip to content

Commit c672f7c

Browse files
authored
feat: enhanced renovate config with grouping, automerge and EKS version tracking (#163)
1 parent 0a0fde5 commit c672f7c

File tree

2 files changed

+71
-2
lines changed

2 files changed

+71
-2
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,14 @@ We use renovate to manage all our dependencies.
8888
Since we prefer pinning our dependencies to certain versions (as opposed to using something like `:latest`, etc.), we still need an "upgrade strategy". Instead of manually checking for newer versions, changelogs and creating PRs to upgrade each of the dependencies, we have this automated.
8989
That's where renovate comes into play.
9090

91-
Renovate is configured by [`renovate.json`](./renovate.json), the configuration we use is rather simple.
91+
Renovate is configured by [`renovate.json`](./renovate.json). Key features of our configuration:
92+
93+
- **GitHub Action digest pinning** for supply chain security
94+
- **Grouped PRs** - Terraform providers and modules are grouped to reduce PR noise
95+
- **Automerge** for low-risk updates (provider patch versions, action digest updates)
96+
- **Custom regex managers** for tracking EKS/Kubernetes versions in Terraform variables
97+
- **Lock file maintenance** scheduled weekly to keep dependency metadata fresh
98+
- **Separate major/minor/patch** updates so breaking changes are clearly visible
9299

93100
Renovate scans all files in default branch and looks for dependencies and their versions. It looks through terraform files, Dockerfiles, etc. and when it finds a new version is available for something, it creates a Pull Request with bumping the version, dumps Changelog, etc.
94101

renovate.json

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,68 @@
11
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
23
"extends": [
34
"config:base",
4-
"helpers:pinGitHubActionDigests"
5+
"helpers:pinGitHubActionDigests",
6+
":separateMajorMinorPatchUpdates"
7+
],
8+
"labels": [
9+
"dependencies"
10+
],
11+
"lockFileMaintenance": {
12+
"enabled": true,
13+
"schedule": [
14+
"before 8am on monday"
15+
]
16+
},
17+
"packageRules": [
18+
{
19+
"description": "Group Terraform provider updates together",
20+
"matchDatasources": [
21+
"terraform-provider"
22+
],
23+
"groupName": "terraform providers"
24+
},
25+
{
26+
"description": "Group Terraform module updates together",
27+
"matchDatasources": [
28+
"terraform-module"
29+
],
30+
"groupName": "terraform modules"
31+
},
32+
{
33+
"description": "Automerge patch-level updates for Terraform providers",
34+
"matchDatasources": [
35+
"terraform-provider"
36+
],
37+
"matchUpdateTypes": [
38+
"patch"
39+
],
40+
"automerge": true
41+
},
42+
{
43+
"description": "Automerge GitHub Actions digest updates",
44+
"matchManagers": [
45+
"github-actions"
46+
],
47+
"matchUpdateTypes": [
48+
"digest"
49+
],
50+
"automerge": true
51+
}
52+
],
53+
"customManagers": [
54+
{
55+
"description": "Track EKS Kubernetes version in Terraform variables",
56+
"customType": "regex",
57+
"fileMatch": [
58+
"\\.tf$"
59+
],
60+
"matchStrings": [
61+
"k8s_version\\s*=\\s*\"(?<currentValue>[0-9]+\\.[0-9]+)\""
62+
],
63+
"depNameTemplate": "kubernetes/kubernetes",
64+
"datasourceTemplate": "github-tags",
65+
"extractVersionTemplate": "^v(?<version>\\d+\\.\\d+)\\.\\d+$"
66+
}
567
]
668
}

0 commit comments

Comments
 (0)