Skip to content

Commit

Permalink
renovate: update images in recipe.yaml
Browse files Browse the repository at this point in the history
The task-generator/trusted-artifacts tools uses recipe.yaml files to
generate tasks. These files may include an 'additionalSteps' attribute,
which is a list of full Tekton step definitions.

These definitions include pinned image references. This clashes with
Renovate updates - when Renovate updates the image reference in an
*-oci-ta.yaml task, the TA generator reverts it back to the reference in
recipe.yaml.

Fix by adding a custom regexManager for recipe.yaml files.

Signed-off-by: Adam Cmiel <[email protected]>
  • Loading branch information
chmeliik committed Dec 16, 2024
1 parent e9578e4 commit 3d73263
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,17 @@
"depNameTemplate": "konflux-ci",
"packageNameTemplate": "https://github.com/konflux-ci/konflux-ci",
"datasourceTemplate": "git-refs"
},
{
"customType": "regex",
"fileMatch": [
"^task/.*/recipe\\.yaml$"
],
"matchStrings": [
"image: (?:['\"])?(?<depName>.*):(?<currentValue>[^@]*)@(?<currentDigest>sha256:[a-f0-9]{64})(?:['\"])?"
],
"autoReplaceStringTemplate": "image: {{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"datasourceTemplate": "docker"
}
]
}

0 comments on commit 3d73263

Please sign in to comment.