Open daurnimator opened 3 years ago
This is currently not supported. This would require a new datasource github-refs
and some fixed handling in kustomize
manager.
You can try to use a regex
manager as workaround and disable kustomize
for this dependency.
Blocked by #7877
This is currently not supported. This would require a new datasource
github-refs
and some fixed handling inkustomize
manager.
Why would this be github specific (aside from a possible optimization): you could:
This can maybe already done with regex manager, try something like:
kustomization.yaml
resources:
- github.com/drGrove/mtls-server/manifests/base?ref=705e1c2a5f193f1d309af4c6e0124b9096c2dce9 # tag=v0.17.0
renovate.json
"regexManagers": [
{
"fileMatch": ["(^|/)kustomization.yaml$"],
"matchStrings": [
"- github\\.com\\/(?<depName>[^/]+?\\/[^/]*?)\\/.*\\?ref=(?<currentDigest>[a-f0-9]{40}) # tag=(?<currentValue>.*)"
],
"datasourceTemplate": "github-tags"
}
]
https://regex101.com/r/iIm9nm/1
This will also suggest digest updates if the tag is moved.
Thank you, viceice, for posting that example!
I think some syntax may have changed since. I'm posting the config I use (based on your example) to upgrade my Argo CD kustomization, in case that helps someone. Works like a charm! 😊
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^argocd/base/kustomization.yaml$"],
"matchStrings": [
".*\\/argoproj\\/argo-cd\\/(?<currentValue>v\\d+\\.\\d+\\.\\d+?)\\/.*",
".*app\\.kubernetes\\.io\\/version: (?<currentValue>v\\d+\\.\\d+\\.\\d+?)\\n"
],
"datasourceTemplate": "github-tags",
"depNameTemplate": "argoproj/argo-cd"
}
],
"packageRules": [
{
"matchPackageNames": ["argoproj/argo-cd"],
"matchManagers": ["custom.regex"],
"commitMessageTopic": "{{depName}}"
}
]
}
For kustomize remote references, we pin to upstream commit hashes, e.g. https://github.com/hashbang/gitops/blob/d22d1c48826d625321d9b86be7d67bdb09fb2f5a/mtls/kustomization.yaml#L5
renovate seems to try and check this as a tag: https://app.renovatebot.com/dashboard#github/hashbang/gitops/271823778
How can we get renovate to check that we are using the ref of the latest tag?