From 94863a7cb2dbaab3ca9e17b28006d3cd85766e3f Mon Sep 17 00:00:00 2001 From: Caleb Hansard Date: Wed, 6 Nov 2024 15:02:39 -0700 Subject: [PATCH 1/4] add renovate config --- renovate.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..38dcece --- /dev/null +++ b/renovate.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"], + "enabledManagers": ["regex"], + "customManagers": [ + { + "customType": "regex", + "fileMatch": ["(^|/)main\\.tf$"], + "matchStrings": [ + "chart *=.*\"(?.*?)\"\\)\\s*chart_version *=.*\"(?.*?)\"\\)\\s*repository *=.*\"(?.*?)\"\\)" + ], + "datasourceTemplate": "helm", + "versioningTemplate": "helm" + } + ] +} From 4ef239bb5d345affbb1e28ebf195795f23e32b82 Mon Sep 17 00:00:00 2001 From: Caleb Hansard Date: Wed, 6 Nov 2024 16:55:51 -0700 Subject: [PATCH 2/4] add fix for OCI-based registries --- renovate.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/renovate.json b/renovate.json index 38dcece..0f2fd59 100644 --- a/renovate.json +++ b/renovate.json @@ -7,10 +7,18 @@ "customType": "regex", "fileMatch": ["(^|/)main\\.tf$"], "matchStrings": [ - "chart *=.*\"(?.*?)\"\\)\\s*chart_version *=.*\"(?.*?)\"\\)\\s*repository *=.*\"(?.*?)\"\\)" + "chart *=.*\"(?.*?)\"\\)\\s*chart_version *=.*\"(?.*?)\"\\)\\s*repository *=.*\"(?https.*?)\"\\)" ], - "datasourceTemplate": "helm", - "versioningTemplate": "helm" + "datasourceTemplate": "helm" + }, + { + "customType": "regex", + "fileMatch": ["(^|/)main\\.tf$"], + "matchStrings": [ + "chart *=.*\"(?.*?)\"\\)\\s*chart_version *=.*\"(?.*?)\"\\)\\s*repository *=.*\"oci://(?.*?)\"\\)" + ], + "datasourceTemplate": "docker", + "packageNameTemplate": "{{namespace}}/{{depName}}" } ] } From b2517a4e180171397fedf63c05f9e52409165c13 Mon Sep 17 00:00:00 2001 From: Caleb Hansard Date: Thu, 7 Nov 2024 08:06:06 -0700 Subject: [PATCH 3/4] update regex manager name --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 0f2fd59..a3d4c3d 100644 --- a/renovate.json +++ b/renovate.json @@ -1,7 +1,7 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": ["config:recommended"], - "enabledManagers": ["regex"], + "enabledManagers": ["custom.regex"], "customManagers": [ { "customType": "regex", From f7e38de90be547f1b63f4a91cbf2c975f4d5c7fd Mon Sep 17 00:00:00 2001 From: Caleb Hansard Date: Thu, 7 Nov 2024 09:16:29 -0700 Subject: [PATCH 4/4] update regex to extract versions from lines with comments --- renovate.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renovate.json b/renovate.json index a3d4c3d..6e53bc7 100644 --- a/renovate.json +++ b/renovate.json @@ -7,7 +7,7 @@ "customType": "regex", "fileMatch": ["(^|/)main\\.tf$"], "matchStrings": [ - "chart *=.*\"(?.*?)\"\\)\\s*chart_version *=.*\"(?.*?)\"\\)\\s*repository *=.*\"(?https.*?)\"\\)" + "chart *=.*\"(?.*?)\"\\).*\\s+chart_version *=.*\"(?.*?)\"\\).*\\s+repository *=.*\"(?https.*?)\"\\)" ], "datasourceTemplate": "helm" }, @@ -15,7 +15,7 @@ "customType": "regex", "fileMatch": ["(^|/)main\\.tf$"], "matchStrings": [ - "chart *=.*\"(?.*?)\"\\)\\s*chart_version *=.*\"(?.*?)\"\\)\\s*repository *=.*\"oci://(?.*?)\"\\)" + "chart *=.*\"(?.*?)\"\\).*\\s+chart_version *=.*\"(?.*?)\"\\).*\\s+repository *=.*\"oci://(?.*?)\"\\)" ], "datasourceTemplate": "docker", "packageNameTemplate": "{{namespace}}/{{depName}}"