From 3de2c167f58a8b20e08784eafc8b9d17c7e31df6 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Thu, 1 Aug 2024 23:09:40 -0600 Subject: [PATCH] updatecli: use `semver` versionfilter Version bump PRs should use the semver instead of the latest tag Issue: https://github.com/rancher/rke2/issues/6402 Signed-off-by: Michael Fritch --- updatecli/updatecli.d/updatecalico.yaml | 3 +-- updatecli/updatecli.d/updatecanal.yaml | 12 +++--------- updatecli/updatecli.d/updatecilium.yaml | 3 +-- updatecli/updatecli.d/updateflannel.yaml | 5 +---- updatecli/updatecli.d/updatemultus.yaml | 3 +-- 5 files changed, 7 insertions(+), 19 deletions(-) diff --git a/updatecli/updatecli.d/updatecalico.yaml b/updatecli/updatecli.d/updatecalico.yaml index 63fc48c48..520fd7ead 100644 --- a/updatecli/updatecli.d/updatecalico.yaml +++ b/updatecli/updatecli.d/updatecalico.yaml @@ -13,9 +13,8 @@ sources: release: true draft: false prerelease: false - latest: true versionfilter: - kind: latest + kind: semver targets: calicoImage: diff --git a/updatecli/updatecli.d/updatecanal.yaml b/updatecli/updatecli.d/updatecanal.yaml index 8c41db74f..14a86b3f5 100644 --- a/updatecli/updatecli.d/updatecanal.yaml +++ b/updatecli/updatecli.d/updatecanal.yaml @@ -11,14 +11,11 @@ sources: token: '{{ requiredEnv .github.token }}' username: '{{ requiredEnv .github.username }}' typefilter: - latest: true 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]+" + kind: semver calico: name: Get calico version kind: githubrelease @@ -28,14 +25,11 @@ sources: token: '{{ requiredEnv .github.token }}' username: '{{ requiredEnv .github.username }}' typefilter: - latest: true 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]+" + kind: semver targets: canalImage: @@ -63,7 +57,7 @@ scms: owner: '{{ .github.owner }}' repository: '{{ .github.repository }}' branch: '{{ .github.branch }}' - + actions: default: title: 'Bump flannel version to {{ source "flannel" }} and Calico to {{ source "calico" }} on Canal' diff --git a/updatecli/updatecli.d/updatecilium.yaml b/updatecli/updatecli.d/updatecilium.yaml index 5536cfbe5..69932bbde 100644 --- a/updatecli/updatecli.d/updatecilium.yaml +++ b/updatecli/updatecli.d/updatecilium.yaml @@ -13,9 +13,8 @@ sources: release: true draft: false prerelease: false - latest: true versionfilter: - kind: latest + kind: semver targets: ciliumImage: diff --git a/updatecli/updatecli.d/updateflannel.yaml b/updatecli/updatecli.d/updateflannel.yaml index 2443deee2..f1222353e 100644 --- a/updatecli/updatecli.d/updateflannel.yaml +++ b/updatecli/updatecli.d/updateflannel.yaml @@ -11,14 +11,11 @@ sources: token: '{{ requiredEnv .github.token }}' username: '{{ requiredEnv .github.username }}' typefilter: - latest: true 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]+" + kind: semver targets: flannelImage: diff --git a/updatecli/updatecli.d/updatemultus.yaml b/updatecli/updatecli.d/updatemultus.yaml index 16d565220..49ba20a86 100644 --- a/updatecli/updatecli.d/updatemultus.yaml +++ b/updatecli/updatecli.d/updatemultus.yaml @@ -13,9 +13,8 @@ sources: release: true draft: false prerelease: false - latest: true versionfilter: - kind: latest + kind: semver targets: multusImage: