Update readme with renovate configuration for digest updates #514
Reference in New Issue
Block a user
No description provided.
Delete Branch "mmalyska/helm-chart:readme-renovate-digest"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description of the change
Update README with information how to configure renovate to update digest for gitea charts.
Benefits
Automatic digest updates for people using renovate.
Thanks!
Some grammar/wording suggestions.
@@ -693,1 +694,4 @@## RenovateTo be able to pin digest automatically by renovate you need to configure regex manager.To be able to use a digest value which is automatically updated by
renovatea custom "regexManager" is required.@@ -694,0 +695,4 @@## RenovateTo be able to pin digest automatically by renovate you need to configure regex manager.For an a example `values.yaml` content we would like for renovate to update `tag` and `digest`.Here's an examplary
values.ymldefinition which makes use of a digest:@@ -694,0 +703,4 @@repository: gitea/giteatag: 1.20.2digest: sha256:6e3b85a36653894d6741d0aefb41dfaac39044e028a42e0a520cc05ebd7bfc3fpullPolicy: IfNotPresentpullPolicy: IfNotPresentcan be removed here@@ -694,0 +706,4 @@pullPolicy: IfNotPresent```By default renovate adds digest after `tag` and to avoid that we need to write our own manager to handle that.By default renovate adds the digest after the tag.
To comply with the Gitea helm chart definition of the digest parameter, a custom "regexManager" definition is required:
@@ -694,0 +711,4 @@```json"regexManagers": [{"description": "Do a explicit gitea digest field match","Apply an explicit gitea digest field match"
@@ -694,0 +712,4 @@"regexManagers": [{"description": "Do a explicit gitea digest field match","fileMatch": ["values\\.yaml"],"fileMatch": ["values\\.yaml|values\\.yml"]I will do it with
"values\\.ya?ml"to makeaoptional.@@ -694,0 +720,4 @@]```The parameter `fileMatch` needs to match file where renovate will look for Gitea image to update.I think this sentence could be removed, the parameter scope should be quite clear.
Thanks @mmalyska for creating this PR. I finally found time to review it and found some issues.
@@ -693,1 +694,4 @@## RenovateTo be able to use a digest value which is automatically updated by `renovate` a custom "regexManager" is required.We should name Renovate with capital R. It's how they spell themselves. And probably link to https://docs.renovatebot.com/configuration-options/#regexmanagers.
They renamed
regexManagertocustomManagersso following that I've updated configuration https://github.com/renovatebot/renovate/pull/24451@@ -694,0 +702,4 @@image:repository: gitea/giteatag: 1.20.2digest: sha256:6e3b85a36653894d6741d0aefb41dfaac39044e028a42e0a520cc05ebd7bfc3fThe image specification is on top level of
values.yaml@@ -694,0 +705,4 @@digest: sha256:6e3b85a36653894d6741d0aefb41dfaac39044e028a42e0a520cc05ebd7bfc3f```By default renovate adds digest after the `tag`.Same as above: Renovate with capital R.
@@ -694,0 +717,4 @@"datasourceTemplate": "docker","autoReplaceStringTemplate": "{{depName}}\n tag: {{newValue}}\n digest: {{#if newDigest}}{{{newDigest}}}{{else}}{{{currentDigest}}}{{/if}}"}]The
matchStringspattern matches non-compliant strings (https://regex101.com/r/G43cMf/1).I suggest the following changes to the configuration to:
Nice solution with the
indentation.This looks good to me, but I'll leave it to @pat-s and @justusbunsi to give the final +1
LGTM. Thanks @mmalyska.
Thanks again for contributing @mmalyska!