Skip to content

Instantly share code, notes, and snippets.

@kimdre
Last active November 16, 2023 12:00
Show Gist options
  • Save kimdre/916caa64aec0ef6f833500fad2d2952a to your computer and use it in GitHub Desktop.
Save kimdre/916caa64aec0ef6f833500fad2d2952a to your computer and use it in GitHub Desktop.
Example Renovate customManager for kustomize
// This is a example for a Renovate customManager to extract the kustomize version to compare with from its Github releases.
// Note the line with `extractVersionTemplate`, which is used to change the verson format what is used as the Github release versioning.
{
...
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^Dockerfile$"],
"matchStrings": ["ARG KUSTOMIZE_VERSION=(?<currentValue>.*?)\\n"],
"extractVersionTemplate": "^kustomize/(?<version>.*)$",
"depNameTemplate": "kubernetes-sigs/kustomize",
"datasourceTemplate": "github-releases"
}
]
...
}
...
ARG KUSTOMIZE_VERSION=v4.5.7
curl -LsSf "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" | tar xz -C /usr/local/bin/ && \
chmod +x /usr/local/bin/kustomize
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment