Skip to content

Commit

Permalink
Merge pull request #11 from sparkfabrik/feat/upgrade_terraform_docs_u…
Browse files Browse the repository at this point in the history
…sing_renovate

feat: upgrade terraform docs docker image version using renovate
  • Loading branch information
Monska85 authored Nov 26, 2024
2 parents 9d9ef7f + 2f3345c commit bcd0855
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ generate-docs: lint
--volume "$(PWD):/terraform-docs" \
-w /terraform-docs \
quay.io/terraform-docs/terraform-docs:0.16.0 markdown table --config .terraform-docs.yml --output-file README.md --output-mode inject .

# Renovate configuration test
renovate-test:
@docker run --rm -it \
-u "0:0" \
-e LOG_LEVEL=debug \
-v "$(PWD)":/tmp/app \
--entrypoint bash \
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"
22 changes: 19 additions & 3 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>sparkfabrik/renovatebot-default-configuration"
]
"extends": ["github>sparkfabrik/renovatebot-default-configuration"],
"customManagers": [
{
"customType": "regex",
"fileMatch": ["Makefile"],
"matchStrings": ["TERRAFORM_DOCS_VERSION \\?= (?<currentValue>.*?)\n"],
"depNameTemplate": "terraform_docs_makefile",
"versioningTemplate": "semver-coerced",
"datasourceTemplate": "custom.terraform_docs_makefile"
}
],
"customDatasources": {
"terraform_docs_makefile": {
"defaultRegistryUrlTemplate": "https://quay.io/api/v1/repository/terraform-docs/terraform-docs/tag/",
"transformTemplates": [
"{ \"releases\": $map($.tags, function($v) { { \"version\": $v.name } }) }"
]
}
}
}

0 comments on commit bcd0855

Please sign in to comment.