Day 7: Your Own Dependencies
Goal: You teach Renovate versions that no manager knows about: in Dockerfile
ARGs, Makefiles, your own YAML files, and behind an in-house version list. · Duration: approx. 120 min · Prerequisite: Day 3
Briefing
- Many versions live in files that no manager understands:
ARG KUBECTL_VERSION=…before acurl,HELM_VERSION ?= …in the Makefile, a tool list in YAML. customManagerswithcustomType: regexextracts them via a regex with named groups.customType: jsonataqueries JSON, YAML, or TOML in a structured way.- Every dependency found needs at least
depName,currentValue, anddatasource, either as a group in the regex or as a…Template. - The convention
# renovate: datasource=… depName=…above the line plus ready-made presets (customManagers:dockerfileVersionsand others) save you from writing your own regexes. customDatasourcessupplies versions from your own JSON source.
File ──managerFilePatterns──► matchStrings (regex/JSONata)
│ depName, currentValue, datasource, …
▼
Datasource ──► versions ──► PR replaces currentValue
Drill 1: What Renovate does not see
The new repo shop/shop-tools is the team’s toolbox. It
comes with a renovate.json with
config:recommended. For a second or two, Forgejo still
reports a freshly pushed repo as empty; the until loop
waits for that (otherwise: “Repository is empty - skipping”).
source ~/renovate-lab/setup/env.sh
export RENOVATE_GITHUB_COM_TOKEN=$(gh auth token) # almost mandatory here, see below
mkdir -p ~/renovate-lab/tag07 && cd ~/renovate-lab/tag07
cp -R ~/renovate-lab/code/tag07/shop-tools start-shop-tools
git -C start-shop-tools init -q -b main
git -C start-shop-tools add -A
git -C start-shop-tools commit -qm "Initialer Stand"
git -C start-shop-tools push -q forgejo:shop/shop-tools.git main
until curl -sf -u "$ADMIN" "$FORGEJO/api/v1/repos/shop/shop-tools" \
| jq -e '.empty == false' > /dev/null; do sleep 1; done
renovate --dry-run=extract --report-type=file --report-path=extract.json \
shop/shop-tools > extract.log 2>&1
jq -r '.repositories[].packageFiles[][].deps[] | "\(.depName) \(.currentValue)"' \
extract.json
(cd ~/renovate-lab/code/tag07/shop-tools && grep -H -E '_VERSION|version:|_TAG' \
Dockerfile Makefile tools.yaml deploy.env | grep -v '\$')Expected:
terraform 1.6.6
golang 1.21.5
alpine 3.19.1
curl null
Dockerfile:ARG KUBECTL_VERSION=v1.29.0
Dockerfile:ARG KUSTOMIZE_VERSION=5.3.0
Makefile:HELM_VERSION ?= 3.14.0
Makefile:GOLANGCI_LINT_VERSION ?= v1.55.2
tools.yaml: version: v4.40.5
tools.yaml: version: v0.9.0
deploy.env:DB_TAG=15.4
Renovate finds the base image, even the apk package
curl (without a version, so skipped), and
.tool-versions via the asdf manager. But the
seven versions below are never touched by a PR. These are the places
where, in real repos, the oldest tools with the most CVEs live.
Warning: Almost all datasources of this day are
github-releasesorgithub-tags. WithoutRENOVATE_GITHUB_COM_TOKEN, you run into the anonymous rate limit of the GitHub API after about 60 requests per hour, and lookups fail.
Save your progress? Sign up for free
Drill 2: The first regex manager
A custom manager consists of a file pattern, a regex, and the details
the regex does not provide. Here only currentValue comes
from the file; name and datasource are fixed.
git clone -q forgejo:shop/shop-tools.git
cd shop-tools
cat > renovate.json <<'EOF'
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"customManagers": [
{
"customType": "regex",
"description": "kubectl im Tool-Image",
"managerFilePatterns": ["/(^|/)Dockerfile$/"],
"matchStrings": ["ARG KUBECTL_VERSION=(?<currentValue>\\S+)"],
"depNameTemplate": "kubernetes/kubernetes",
"datasourceTemplate": "github-releases"
}
]
}
EOF
renovate-config-validator
renovate --platform=local --dry-run=lookup --report-type=file \
--report-path=../local.json > ../local.log 2>&1
jq -r '.repositories[].packageFiles[][] | .deps[]
| "\(.depName) \(.currentValue) \([.updates[]?.newValue])"' ../local.json
jq '.repositories[].packageFiles.regex[0].deps[0]
| {depName, currentValue, datasource, versioning, replaceString}' ../local.jsonExpected:
INFO: Validating renovate.json
INFO: Config validated successfully against 1 file(s)
Dockerfile kubernetes/kubernetes v1.29.0 v1.37.1
{
"depName": "kubernetes/kubernetes",
"currentValue": "v1.29.0",
"datasource": "github-releases",
"versioning": "semver-coerced",
"replaceString": "ARG KUBECTL_VERSION=v1.29.0"
}Three things to remember:
- The regex runs against the entire file content, not line by line. Renovate uses RE2, so there are no lookbehinds or backreferences.
- In JSON, every backslash is doubled:
\Sbecomes\\S. A forgotten backslash is the most common reason for “doesn’t match”. replaceStringis the entire match. On update, Renovate replaces onlycurrentValuewithin it. If nothing is specified, thesemver-coercedversioning applies.
Every group has a template counterpart for fixed values:
| Group in the regex | Template | Purpose |
|---|---|---|
depName |
depNameTemplate |
name in the PR title and for packageRules |
packageName |
packageNameTemplate |
name for the datasource, if different |
datasource |
datasourceTemplate |
where the versions come from |
versioning |
versioningTemplate |
how versions are compared (semver, loose,
…) |
extractVersion |
extractVersionTemplate |
peel the version out of the tag (Drill 4) |
registryUrl |
registryUrlTemplate |
different registry/API URL |
currentValue is mandatory and has no template. Templates
are Handlebars and may use groups, for example
"depNameTemplate": "{{{depName}}}-cli".
Save your progress? Sign up for free
Drill 3: Comment convention and presets
Writing a separate manager for every variable does not scale. Renovate ships presets that evaluate a comment line above the variable. Read the original:
P=~/renovate-lab/tools/node_modules/renovate/dist/config/presets/internal
grep -o '^\t[a-zA-Z]*Versions' $P/custom-managers.preset.js | tr -d '\t' \
| paste -sd' ' - | fold -s -w 80
grep -A12 '^\tdockerfileVersions' $P/custom-managers.preset.js \
| grep -o '"# renovate.*' | fold -w 80Expected:
azurePipelinesVersions biomeVersions bitbucketPipelinesVersions
dockerfileVersions githubActionsVersions gitlabPipelineVersions
helmChartYamlAppVersions makefileVersions mavenPropertyVersions tfvarsVersions
tsconfigNodeVersions valeVersions
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\s
]+?)(?: (lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<ver
sioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryU
rl=(?<registryUrl>[^\\s]+?))?\\s(?:ENV|ARG)\\s+[A-Za-z0-9_]+?_VERSION[ =][\"']?(
?<currentValue>.+?)[\"']?\\s"]
The comment supplies datasource and
depName, optionally packageName,
versioning, extractVersion, and
registryUrl, in exactly this order, each
separated by a single space. Directly after it must come an
ARG or ENV with …_VERSION. You
replace your own manager with two presets and add comments to the
files:
cat > renovate.json <<'EOF'
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"customManagers:dockerfileVersions",
"customManagers:makefileVersions"
]
}
EOF
c='# renovate: datasource=github-releases depName='
perl -pi -e "s|^(ARG KUBECTL_VERSION)|${c}kubernetes/kubernetes\n\$1|" Dockerfile
perl -pi -e "s|^(ARG KUSTOMIZE_VERSION)|${c}kubernetes-sigs/kustomize\n\$1|" Dockerfile
perl -pi -e "s|^(HELM_VERSION)|${c}helm/helm\n\$1|" Makefile
perl -pi -e "s|^(GOLANGCI_LINT_VERSION)|${c}golangci/golangci-lint\n\$1|" Makefile
sed -n 3,6p Dockerfile; sed -n 1,4p Makefile
renovate-config-validator > /dev/null; echo "Exit: $?"
renovate --platform=local --dry-run=lookup --report-type=file \
--report-path=../local.json > ../local.log 2>&1
jq -r '.repositories[].packageFiles[][] | .deps[]
| "\(.depName) \(.currentValue) \([.updates[]?.newValue])"' ../local.jsonExpected:
# renovate: datasource=github-releases depName=kubernetes/kubernetes
ARG KUBECTL_VERSION=v1.29.0
# renovate: datasource=github-releases depName=kubernetes-sigs/kustomize
ARG KUSTOMIZE_VERSION=5.3.0
# renovate: datasource=github-releases depName=helm/helm
HELM_VERSION ?= 3.14.0
# renovate: datasource=github-releases depName=golangci/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.55.2
Exit: 0
Dockerfile kubernetes/kubernetes v1.29.0 v1.37.1
Dockerfile kubernetes-sigs/kustomize 5.3.0 -
Makefile helm/helm 3.14.0 3.22.0,4.3.0
Makefile golangci/golangci-lint v1.55.2 v1.64.8,v2.14.0
Your target versions will be newer. Helm publishes tags with a
v (v3.22.0), while the Makefile has the
version without one. Renovate finds 3.14.0 as release
v3.14.0 and adopts the format of the current value. So
helm-v$(HELM_VERSION) in the download URL stays intact (the
challenge shows when that goes wrong). Two targets for Helm and
golangci-lint mean, as usual: a minor PR and a major PR (Day 4).
Tip:
--platform=localreads only files that Git knows about. You have to stage new files withgit addfirst, otherwise Renovate does not see them.
Save your progress? Sign up for free
Drill 4: extractVersion for crooked tags
Why does kustomize get no update? The project publishes several modules from one repo, and the tags carry a prefix:
curl -s "https://api.github.com/repos/kubernetes-sigs/kustomize/releases?per_page=4" \
| jq -r '.[].tag_name'
jq -r '.repositories[].packageFiles.regex[].deps[]
| select(.depName | test("kustomize")) | .currentVersion' ../local.jsonExpected:
kyaml/v0.21.3
kustomize/v5.8.3
cmd/config/v0.21.3
api/v0.21.3
kustomize/v5.3.0
Renovate does map 5.3.0 to the tag
kustomize/v5.3.0, but from the mixed tags
(api/v0.21.3, kyaml/v0.21.3, …) it does not
form a successor. extractVersion is a regex with the group
version: only matching tags count, and only the group
counts as the version.
export ev='extractVersion=^kustomize/v(?<version>.+)$'
perl -pi -e 's|(depName=kubernetes-sigs/kustomize)$|$1 $ENV{ev}|' Dockerfile
grep -o 'kustomize extractVersion=.*' Dockerfile
renovate --platform=local --dry-run=lookup --report-type=file \
--report-path=../local.json > ../local.log 2>&1
jq -r '.repositories[].packageFiles[][] | .deps[]
| "\(.depName) \(.currentValue) \([.updates[]?.newValue])"' ../local.json \
| grep kustomizeExpected:
kustomize extractVersion=^kustomize/v(?<version>.+)$
Dockerfile kubernetes-sigs/kustomize 5.3.0 5.8.3
$ENV{ev} reads the exported variable, so
perl does not have to interpret the special characters of
the regex. Incidentally, the same trick is used in built-in managers.
asdf peels off the prefix for Terraform and Go in exactly
the same way:
jq -r '.repositories[].packageFiles.asdf[0].deps[]
| [.depName, .packageName, .datasource, .extractVersion] | @tsv' ../local.json \
| column -tExpected:
terraform hashicorp/terraform github-releases ^v(?<version>\\S+)
golang golang/go github-tags ^go(?<version>\\S+)
So for .tool-versions (and mise.toml via
the mise manager) you do not need a custom manager. Always
check docs.renovatebot.com/modules/manager/ first to see whether a
manager already exists.
Save your progress? Sign up for free
Drill 5: JSONata for tools.yaml
tools.yaml has structure. Instead of taking it apart
with a regex, customType: jsonata queries the parsed file.
fileFormat is json, yaml, or
toml. The expression must return objects with the same
fields as the regex groups.
sed -n 2,5p tools.yaml
jq '.customManagers = [{
"customType": "jsonata",
"description": "CI-Werkzeuge in tools.yaml",
"fileFormat": "yaml",
"managerFilePatterns": ["tools.yaml"],
"matchStrings": ["tools.{ \"depName\": repo, \"currentValue\": version }"],
"datasourceTemplate": "github-releases"
}]' renovate.json > tmp.json
mv tmp.json renovate.json
renovate-config-validator > /dev/null; echo "Exit: $?"
renovate --platform=local --dry-run=lookup --report-type=file \
--report-path=../local.json > ../local.log 2>&1
jq -r '.repositories[].packageFiles.jsonata[].deps[]
| "\(.depName) \(.currentValue) \([.updates[]?.newValue])"' ../local.jsonExpected:
tools:
- name: yq
repo: mikefarah/yq
version: v4.40.5
Exit: 0
tools.yaml mikefarah/yq v4.40.5 v4.54.1
tools.yaml koalaman/shellcheck v0.9.0 v0.11.0
tools.{…} iterates over every element of the list and
builds an object from it. You can test the expression without Renovate
at try.jsonata.org (convert the YAML to JSON first). On update, Renovate
searches the file for the old value and replaces it; comments and
formatting are preserved.
Warning: JSONata expressions live inside a JSON string. Every
"inside becomes\". Withjqas above, you do not have to think about it.
Save your progress? Sign up for free
Drill 6: Two lines, one dependency
In deploy.env, image (DB_IMAGE=postgres)
and tag (DB_TAG=15.4) are on separate lines.
matchStringsStrategy controls how several
matchStrings work together: any (default, each
regex returns its own dependencies), recursive (each regex
searches further within the match of the previous one), and
combination (all matches are merged into
one dependency).
cp renovate.json ../base.json
for s in any combination; do
jq --arg s "$s" '.customManagers += [{
"customType": "regex",
"description": "Test-Datenbank in deploy.env",
"managerFilePatterns": ["deploy.env"],
"matchStringsStrategy": $s,
"matchStrings": ["DB_IMAGE=(?<depName>\\S+)", "DB_TAG=(?<currentValue>\\S+)"],
"datasourceTemplate": "docker"
}]' ../base.json > renovate.json
renovate --platform=local --dry-run=lookup --report-type=file \
--report-path=../local.json > ../local.log 2>&1
echo "== $s"
jq -r '.repositories[].packageFiles.regex[]?.deps[] | "\(.depName) \(.currentValue)"' \
../local.json
doneExpected:
any: nichts gefunden
combination: deploy.env postgres 15.4 15.19,18.6
With any (nichts gefunden means nothing
found), each regex returns only half a dependency, and Renovate silently
discards both. combination only fits if there is exactly
one dependency per file. You need recursive for nested
blocks, for example “find the db: section and
tag: inside it”.
Save your progress? Sign up for free
Drill 7: A datasource of your own
The in-house shop-cli is not in any public registry. The
release team maintains a JSON file in the repo
shop/releases. Renovate reads it via
customDatasources.
cp -R ~/renovate-lab/code/tag07/releases ../start-releases
git -C ../start-releases init -q -b main
git -C ../start-releases add -A
git -C ../start-releases commit -qm "Initialer Stand"
git -C ../start-releases push -q forgejo:shop/releases.git main
U="$FORGEJO/api/v1/repos/shop/releases/raw/shop-cli.json"
until curl -sf "$U" > /dev/null; do sleep 1; done # Forgejo needs a moment
curl -s "$U" | jq -c .versionsExpected:
["1.2.0","1.3.0","1.4.1","2.0.0-rc.1"]
Renovate expects {"releases": [{"version": "…"}, …]}. If
the source does not match, transformTemplates (JSONata)
reshapes it. The name after custom. connects datasource and
dependency.
d='# renovate: datasource=custom.shop-cli depName=shop-cli'
perl -pi -e "s|^(RUN apk)|$d\nARG SHOP_CLI_VERSION=1.2.0\n\n\$1|" Dockerfile
jq --arg u "$U" '.customDatasources = {"shop-cli": {
"defaultRegistryUrlTemplate": $u,
"transformTemplates": ["{ \"releases\": [versions.{ \"version\": $ }] }"]
}}' renovate.json > tmp.json
mv tmp.json renovate.json
renovate-config-validator > /dev/null; echo "Exit: $?"
renovate --platform=local --dry-run=lookup --report-type=file \
--report-path=../local.json > ../local.log 2>&1
jq -r '.repositories[].packageFiles[][] | .deps[]
| "\(.depName) \(.currentValue) \([.updates[]?.newValue])"' ../local.json \
| grep shop-cli
grep -o 'WARN: HTTP request to an internal host[^,]*' ../local.log | head -1Expected:
Exit: 0
Dockerfile shop-cli 1.2.0 1.4.1
WARN: HTTP request to an internal host
2.0.0-rc.1 is a pre-release and does not count. The
warning is new in Renovate 44: Renovate logs requests to loopback and
private addresses (global option internalHostAccess,
default warn, later block). The only requests
allowed without further ado are requests to the platform itself,
i.e. same scheme, same host, same port as
RENOVATE_ENDPOINT. --platform=local has no
endpoint, hence the warning. In a real run it is gone:
git add -A && git commit -qm "Eigene Abhängigkeiten erfassen" && git push -q
LOG_LEVEL=debug renovate --dry-run=lookup shop/shop-tools 2>&1 \
| grep -E "Internal host|internal host|no authentication for" | sort -u | cut -c1-80Expected:
INFO: Internal host 127.0.0.1 permitted by configuration
INFO: Internal host 127.0.0.1 permitted by configuration (repository=shop/shop-
DEBUG: hostRules: no authentication for 127.0.0.1:3000 (repository=shop/shop-too
The “no authentication” line shows: Renovate does not send the bot
token along. That works here because shop/releases is
public. For a private source you need a hostRules entry
(Day 8).
Save your progress? Sign up for free
Drill 8: Real run and troubleshooting
Now with PRs. --pr-hourly-limit=0 lifts the hourly limit
for this run.
cd ~/renovate-lab/tag07
renovate --pr-hourly-limit=0 shop/shop-tools > run.log 2>&1
R="$FORGEJO/api/v1/repos/shop/shop-tools"
curl -s -u "$ADMIN" "$R/pulls?state=open&limit=50" \
| jq -r '.[] | "#\(.number) \(.title)"'
for t in helm/helm kustomize yq shop-cli; do
n=$(curl -s -u "$ADMIN" "$R/pulls?state=open&limit=50" | jq --arg t "$t" \
'[.[] | select(.title | contains($t))][0].number')
curl -s -u "$ADMIN" "$R/pulls/$n.diff" | grep -E '^[-+][^-+]'
doneExpected:
#10 Update dependency terraform to v1.16.5
#9 Update dependency shop-cli to v1.4.1
#8 Update dependency mikefarah/yq to v4.54.1
#7 Update dependency kubernetes/kubernetes to v1.37.1
#6 Update dependency kubernetes-sigs/kustomize to v5.8.3
#5 Update dependency koalaman/shellcheck to v0.11.0
#4 Update dependency helm/helm to v3.22.0
#3 Update dependency golangci/golangci-lint to v1.64.8
#2 Update dependency golang to v1.27.2
#1 Update alpine Docker tag to v3.24.2
-HELM_VERSION ?= 3.14.0
+HELM_VERSION ?= 3.22.0
-ARG KUSTOMIZE_VERSION=5.3.0
+ARG KUSTOMIZE_VERSION=5.8.3
- version: v4.40.5
+ version: v4.54.1
-ARG SHOP_CLI_VERSION=1.2.0
+ARG SHOP_CLI_VERSION=1.4.1
Ten PRs, then it stops: prConcurrentLimit defaults to
10, and the rest (postgres, the majors of Helm and golangci-lint) waits
in the Dependency Dashboard under “Rate-Limited”. Every diff changes
exactly the value; comments stay in place.
And if an entry is not detected? A typical mistake is a blank line between comment and variable. The INFO message “Dependency extraction complete” counts per manager what was found:
cd shop-tools && git pull -q
c='# renovate: datasource=github-releases depName='
h='ARG HELMFILE_VERSION=0.160.0'
perl -pi -e "s|^(RUN apk)|${c}helmfile/helmfile\n\n$h\n\n\$1|" Dockerfile
stats() { renovate --platform=local --dry-run=extract 2>&1 \
| grep -A8 '"stats"' | grep -E '"regex"'; }
stats
perl -0pi -e 's|(depName=helmfile/helmfile)\n\n|$1\n|' Dockerfile
statsExpected:
"regex": {"fileCount": 3, "depCount": 6},
"regex": {"fileCount": 3, "depCount": 7},
The preset regex allows exactly one whitespace character between the
comment and ARG. When there are problems, proceed like
this:
- Does Renovate recognize the file?
LOG_LEVEL=debugshows “Using file pattern … for manager regex” and “Matched N file(s) for manager regex”. - Does it recognize the dependency?
depCountor the report from--dry-run=extract. A regex that does not match produces no error message, only fewer matches. - Is the lookup right?
--dry-run=lookupand, in the debug log, the “packageFiles with updates” block withcurrentVersion,updates, andwarningsper dependency.
git checkout -q DockerfileSave your progress? Sign up for free
Checkpoint
The config of shop-tools uses the preset, a JSONata
manager, and your own datasource:
cd ~/renovate-lab/tag07
R="$FORGEJO/api/v1/repos/shop"
curl -s -u "$ADMIN" "$R/shop-tools/raw/renovate.json" > cfg.json
jq -c .extends cfg.json
jq -r '.customManagers[].customType' cfg.json
jq -r '.customDatasources | keys[]' cfg.jsonExpected:
R07_KP1
At least three open PRs come from your own managers:
curl -s -u "$ADMIN" "$R/shop-tools/pulls" | jq -r '.[].title'Expected:
R07_KP2
Challenge
The security team scans with Trivy in GitLab CI. The version is in
.gitlab-ci.yml as TRIVY_VERSION: "0.48.0"
under variables:. Make sure Renovate updates it without
writing your own regex. The file is in the companion code under
challenge/.
Hint: Take another close look at the list of presets from Drill 3.
Solution
Copy the file over (stage it with git add for
--platform=local), add the comment, and include the preset
customManagers:gitlabPipelineVersions. In YAML, the comment
may be indented; the regex allows any whitespace before the variable
name.
cd ~/renovate-lab/tag07/shop-tools
cp ~/renovate-lab/code/tag07/challenge/.gitlab-ci.yml . && git add .gitlab-ci.yml
c='# renovate: datasource=github-releases depName='
perl -pi -e "s|^( TRIVY_VERSION)| ${c}aquasecurity/trivy\n\$1|" .gitlab-ci.yml
sed -n 1,3p .gitlab-ci.yml
jq '.extends += ["customManagers:gitlabPipelineVersions"]' renovate.json > tmp.json
mv tmp.json renovate.json
renovate-config-validator > /dev/null; echo "Exit: $?"
renovate --platform=local --dry-run=lookup --report-type=file \
--report-path=../ch.json > ../ch.log 2>&1
jq -r '.repositories[].packageFiles[][] | .deps[]
| "\(.depName) \(.currentValue) \([.updates[]?.newValue])"' ../ch.json \
| grep trivyExpected:
variables:
# renovate: datasource=github-releases depName=aquasecurity/trivy
TRIVY_VERSION: "0.48.0"
Exit: 0
.gitlab-ci.yml aquasecurity/trivy 0.48.0 v0.75.0
Found, but careful: v0.75.0 with a v. With
Helm (Drill 3) the format was preserved because Renovate could map
3.14.0 to the release v3.14.0. The release
v0.48.0 does not exist (anymore) for Trivy; the GitHub API
responds with 404 to
repos/aquasecurity/trivy/releases/tags/v0.48.0. Without a
reference point, Renovate takes the tag literally, and
v${TRIVY_VERSION} in the download URL would become
vv0.75.0. extractVersion makes this
robust:
export ev='extractVersion=^v(?<version>.*)$'
perl -pi -e 's|(depName=aquasecurity/trivy)$|$1 $ENV{ev}|' .gitlab-ci.yml
grep -o 'depName=.*' .gitlab-ci.yml
renovate --platform=local --dry-run=lookup --report-type=file \
--report-path=../ch.json > ../ch.log 2>&1
jq -r '.repositories[].packageFiles[][] | .deps[]
| "\(.depName) \(.currentValue) \([.updates[]?.newValue])"' ../ch.json \
| grep trivy
git add -A && git commit -qm "Trivy-Version erfassen" && git push -qExpected:
depName=aquasecurity/trivy extractVersion=^v(?<version>.*)$
.gitlab-ci.yml aquasecurity/trivy 0.48.0 0.75.0
In the next real run, the PR changes exactly "0.48.0" to
"0.75.0"; the quotation marks are outside of
currentValue. The preset matches
**/*.gitlab-ci.{yml,yaml} and thus also the
.gitlab-ci.yml in the root directory. It is best to always
set extractVersion when tags have a prefix and your value
does not.
You can find the final state of all changed files under
~/renovate-lab/code/tag07/loesung/.
Save your progress? Sign up for free
Enterprise Note
- Define the comment convention in the org preset (Day 11): the
matching
customManagers:*Versionspresets plus your own managers for in-house formats. Teams then only write comments, not regexes. - Prefer built-in managers (
asdf,mise,gitlabci,terraform) over custom managers. They know special cases like prefixes and lockfiles. - For in-house tools,
customDatasourcesis the clean way. If the source is internal, plan forhostRuleswith a token andallowInternalforinternalHostAccess=block. - Never run Renovate without a GitHub token
(
RENOVATE_GITHUB_COM_TOKEN; a read-only token without scopes is enough) as soon asgithub-releasesorgithub-tagsare involved. - A custom manager that silently stops finding anything goes
unnoticed. Check
depCountin the logs (Day 14) or via a report in CI.