Skip to content

Commit bcd0855

Browse files
authored
Merge pull request #11 from sparkfabrik/feat/upgrade_terraform_docs_using_renovate
feat: upgrade terraform docs docker image version using renovate
2 parents 9d9ef7f + 2f3345c commit bcd0855

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@ generate-docs: lint
1111
--volume "$(PWD):/terraform-docs" \
1212
-w /terraform-docs \
1313
quay.io/terraform-docs/terraform-docs:0.16.0 markdown table --config .terraform-docs.yml --output-file README.md --output-mode inject .
14+
15+
# Renovate configuration test
16+
renovate-test:
17+
@docker run --rm -it \
18+
-u "0:0" \
19+
-e LOG_LEVEL=debug \
20+
-v "$(PWD)":/tmp/app \
21+
--entrypoint bash \
22+
renovate/renovate -lc "cp -av /tmp/app /usr/src && cd /usr/src/app && jq 'del(.extends)' /tmp/app/renovate.json >/usr/src/app/renovate.json && renovate --platform=local --dry-run"

renovate.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": [
4-
"github>sparkfabrik/renovatebot-default-configuration"
5-
]
3+
"extends": ["github>sparkfabrik/renovatebot-default-configuration"],
4+
"customManagers": [
5+
{
6+
"customType": "regex",
7+
"fileMatch": ["Makefile"],
8+
"matchStrings": ["TERRAFORM_DOCS_VERSION \\?= (?<currentValue>.*?)\n"],
9+
"depNameTemplate": "terraform_docs_makefile",
10+
"versioningTemplate": "semver-coerced",
11+
"datasourceTemplate": "custom.terraform_docs_makefile"
12+
}
13+
],
14+
"customDatasources": {
15+
"terraform_docs_makefile": {
16+
"defaultRegistryUrlTemplate": "https://quay.io/api/v1/repository/terraform-docs/terraform-docs/tag/",
17+
"transformTemplates": [
18+
"{ \"releases\": $map($.tags, function($v) { { \"version\": $v.name } }) }"
19+
]
20+
}
21+
}
622
}

0 commit comments

Comments
 (0)