Skip to content

feat: add Renovate custom regex manager for MCP server images in registry.json #1328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
{
"groupName": "dockerfile template base images",
"matchDatasources": ["docker"],
"matchManagers": ["custom.regex"]
"matchManagers": ["custom.regex"],
"matchFileNames": ["pkg/container/templates/*.tmpl"]
},
{
"groupName": "mcp server images",
"matchDatasources": ["docker"],
"matchManagers": ["custom.regex"],
"matchFileNames": ["pkg/registry/data/registry.json"]
}
],
"customManagers": [
Expand All @@ -30,6 +37,15 @@
"FROM (?<depName>[a-z0-9.-]+):(?<currentValue>[a-z0-9.-]+)"
],
"datasourceTemplate": "docker"
},
{
"customType": "regex",
"description": "Update MCP server Docker images in registry.json",
"managerFilePatterns": ["pkg/registry/data/registry.json"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if updating the image might affect tools or metadata. If so, should we update those too? (Not sure how, though.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good point. We have some thv subcommands to get tools and such, so perhaps we should start leveraging them. I'm not sure yet how to run custom commands with Renovate, so I'll research that or implement it with gh actions.

"matchStrings": [
"\"image\":\\s*\"(?<depName>(?:(?:[a-zA-Z0-9][a-zA-Z0-9-]*(?:\\.[a-zA-Z0-9][a-zA-Z0-9-]*)*(?::[0-9]+)?/)?(?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*)?[a-z0-9]+(?:[._-][a-z0-9]+)*):(?<currentValue>[a-zA-Z0-9][a-zA-Z0-9._-]*(?:@sha256:[a-f0-9]{64})?)\""
],
"datasourceTemplate": "docker"
}
],
"postUpdateOptions": ["gomodTidy"]
Expand Down