File tree 2 files changed +31
-3
lines changed
2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 21
21
22
22
- label : " Package x86_64 staging"
23
23
key : " package-x86-64-staging"
24
- command : " .buildkite/scripts/package.sh staging"
24
+ command : |
25
+ source .buildkite/scripts/version_qualifier.sh
26
+ .buildkite/scripts/package.sh staging
25
27
agents :
26
28
provider : " gcp"
27
29
image : " ${IMAGE_UBUNTU_X86_64}"
38
40
39
41
- label : " Package aarch64 staging"
40
42
key : " package-arm-staging"
41
- command : " .buildkite/scripts/package.sh staging"
43
+ command : |
44
+ source .buildkite/scripts/version_qualifier.sh
45
+ .buildkite/scripts/package.sh staging
42
46
agents :
43
47
provider : " aws"
44
48
imagePrefix : " ${IMAGE_UBUNTU_ARM_64}"
63
67
# details in https://github.com/elastic/ingest-dev/issues/4855
64
68
if : " ${FILE_EXISTS_IN_REPO} == true && (build.env('BUILDKITE_BRANCH') != 'main' || build.env('VERSION_QUALIFIER') != null)"
65
69
key : " dra-staging"
66
- command : " .buildkite/scripts/dra_release.sh staging"
70
+ command : |
71
+ source .buildkite/scripts/version_qualifier.sh
72
+ .buildkite/scripts/dra_release.sh staging
67
73
agents :
68
74
provider : " gcp"
69
75
image : " ${IMAGE_UBUNTU_X86_64}"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # An opinionated approach to managing the Elastic Qualifier for the DRA in a Google Bucket
4
+ # instead of using a Buildkite env variable.
5
+
6
+ if [[ -n " $VERSION_QUALIFIER " ]]; then
7
+ echo " ~~~ VERSION_QUALIFIER externally set to [$VERSION_QUALIFIER ]"
8
+ return 0
9
+ fi
10
+
11
+ # DRA_BRANCH can be used for manually testing packaging with PRs
12
+ # e.g. define `DRA_BRANCH="main"` under Options/Environment Variables in the Buildkite UI after clicking new Build
13
+ BRANCH=" ${DRA_BRANCH:= " ${BUILDKITE_BRANCH:= " " } " } "
14
+
15
+ qualifier=" "
16
+ URL=" https://storage.googleapis.com/dra-qualifier/${BRANCH} "
17
+ if curl -sf -o /dev/null " $URL " ; then
18
+ qualifier=$( curl -s " $URL " )
19
+ fi
20
+
21
+ export VERSION_QUALIFIER=" $qualifier "
22
+ echo " ~~~ VERSION_QUALIFIER set to [$VERSION_QUALIFIER ]"
You can’t perform that action at this time.
0 commit comments