From 413d074fa57b1d5b360dbc31ec811cf6767923a9 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 7 Aug 2024 13:54:15 +0200 Subject: [PATCH] Update updatecli to set label too --- .../bump-latest-snapshot-version.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/updatecli.d/bump-latest-snapshot-version.yml b/.github/workflows/updatecli.d/bump-latest-snapshot-version.yml index 65267d2403c..36b1e5432dc 100644 --- a/.github/workflows/updatecli.d/bump-latest-snapshot-version.yml +++ b/.github/workflows/updatecli.d/bump-latest-snapshot-version.yml @@ -30,6 +30,16 @@ sources: spec: file: https://storage.googleapis.com/artifacts-api/snapshots/main.json key: .version + latestSnapshotMajorMinor: + name: Get latest snapshort major and minor + kind: json + spec: + file: https://storage.googleapis.com/artifacts-api/snapshots/main.json + key: .version + transformers: + - findsubmatch: + pattern: '(^\d+\.\d+)\.\d+$' + captureindex: 1 targets: update-snapshot: @@ -41,3 +51,13 @@ targets: file: '.buildkite/pipeline.schedule-daily.yml' matchpattern: '(STACK_VERSION:) 8\.[^\s]*\.[^\s]*' replacepattern: '$1 {{ source "latestSnapshot" }}' + + update-snapshot-label: + name: '[updatecli] Update latest snapshot label to {{ source "latestSnapshotMinor" }}' + kind: file + sourceid: latestSnapshot + scmid: default + spec: + file: '.buildkite/pipeline.schedule-daily.yml' + matchpattern: '(Stack Version v8\.)[^\s]+)+ ' + replacepattern: 'Stack Vresion v{{ source "latestSnapshotMajorMinor" }}'