Skip to content

Commit 6b87563

Browse files
Enable Go dependency updates in Renovate config
Add gomod manager and vendor directory handling to automatically update Go dependencies and their vendored files via Renovate PRs.
1 parent e32582b commit 6b87563

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

renovate.json

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"enabled": false
1818
},
1919
"enabledManagers": [
20+
"gomod",
2021
"tekton",
2122
"dockerfile",
2223
"rpm",
@@ -132,10 +133,43 @@
132133
"at any time"
133134
]
134135
},
136+
"gomod": {
137+
"enabled": true,
138+
"additionalBranchPrefix": "{{baseBranch}}/",
139+
"branchPrefix": "konflux/mintmaker/",
140+
"postUpdateOptions": ["gomodTidy", "gomodUpdateImportPaths"],
141+
"postUpgradeTasks": {
142+
"commands": ["go mod vendor", "go mod verify"],
143+
"fileFilters": ["vendor/**"]
144+
},
145+
"packageRules": [
146+
{
147+
"groupName": "Go dependencies",
148+
"commitMessageAction": "",
149+
"commitMessageTopic": "Go dependencies",
150+
"matchManagers": ["gomod"],
151+
"excludePackageNames": [
152+
"k8s.io/kubernetes",
153+
"github.com/openshift/api",
154+
"github.com/openshift/client-go",
155+
"github.com/openshift/library-go"
156+
]
157+
},
158+
{
159+
"groupName": "Kubernetes dependencies",
160+
"commitMessageAction": "",
161+
"commitMessageTopic": "Kubernetes dependencies",
162+
"matchPackagePatterns": ["^k8s.io/"],
163+
"excludePackageNames": [
164+
"k8s.io/kubernetes"
165+
]
166+
}
167+
]
168+
},
135169
"git-submodules": {
136170
"enabled": false,
137171
"additionalBranchPrefix": "{{baseBranch}}/",
138-
"branchPrefix": "konflux/mintmaker/"
172+
"branchPrefix": "konflux/mintmaker/",
139173
},
140174
"argocd": {
141175
"additionalBranchPrefix": "{{baseBranch}}/",
@@ -279,5 +313,11 @@
279313
"allowedCommands": [
280314
"^rpm-lockfile-prototype rpms.in.yaml$"
281315
],
316+
"allowedPostUpgradeCommands": [
317+
"^rpm-lockfile-prototype rpms.in.yaml$",
318+
"^go mod vendor$",
319+
"^go mod tidy$",
320+
"^go mod verify$"
321+
],
282322
"dependencyDashboard": false
283323
}

0 commit comments

Comments
 (0)