Skip to content

Commit

Permalink
Use regex versionFilter to extract the cniplugin semver
Browse files Browse the repository at this point in the history
The cni-plugins contain a build suffix which needs to be
filtered out to correctly extract the image semver

Fixup: 09ff9f8
Signed-off-by: Michael Fritch <[email protected]>
  • Loading branch information
mgfritch committed Jan 31, 2025
1 parent d1674f8 commit 168145c
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions updatecli/updatecli.d/updateplugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
name: "Update cniplugins version"

sources:
cniplugins:
name: Get cniplugins version
kind: githubrelease
spec:
owner: rancher
repository: image-build-cni-plugins
token: '{{ requiredEnv .github.token }}'
typefilter:
release: true
draft: false
prerelease: false
versionfilter:
kind: semver
cniplugins:
name: Get cniplugins version
kind: githubrelease
spec:
owner: rancher
repository: image-build-cni-plugins
token: '{{ requiredEnv .github.token }}'
typefilter:
release: true
draft: false
prerelease: false
versionfilter:
kind: regex
# pattern accepts any semver constraint
pattern: "v[0-9]+.[0-9]+.[0-9]+-build[0-9]+"

targets:
dockerfile:
Expand Down

0 comments on commit 168145c

Please sign in to comment.