Skip to content

Commit

Permalink
[CI] Update label in schedule daily job definition as part of the aut…
Browse files Browse the repository at this point in the history
…omation (elastic#10722)

Update label step in the schedule daily job using updatecli so it
gets updated with the latest snapshot version (major and minor)
accordingly with the STACK_VERSION value.
  • Loading branch information
mrodm authored and James Valente committed Aug 21, 2024
1 parent c8dc10f commit b009c34
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,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+)\.[^\s]+$'
captureindex: 1

targets:
update-snapshot:
Expand All @@ -42,3 +52,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 step to {{ source "latestSnapshotMajorMinor" }}'
kind: file
sourceid: latestSnapshotMajorMinor
scmid: default
spec:
file: '.buildkite/pipeline.schedule-daily.yml'
matchpattern: '(Stack Version) v8\.\d+"'
replacepattern: 'Stack Version v{{ source "latestSnapshotMajorMinor" }}"'

0 comments on commit b009c34

Please sign in to comment.