-
Notifications
You must be signed in to change notification settings - Fork 5k
Expand file tree
/
Copy pathpre-command
More file actions
45 lines (38 loc) · 1.6 KB
/
Copy pathpre-command
File metadata and controls
45 lines (38 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bash
set -euo pipefail
if [[ "${BUILDKITE_LABEL:-}" == *"Pipeline upload"* || "${BUILDKITE_LABEL:-}" == *"Upload Pipeline"* ]]; then
if [[ "${GITHUB_PR_TRIGGER_COMMENT:-}" != "" ]]; then
buildkite-agent annotate "**No changes.** Triggered from comment: _${GITHUB_PR_TRIGGER_COMMENT}_" --style "info" --context 'ctx-info'
fi
fi
if [[ "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-libbeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-macos-tests" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-metricbeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-packetbeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-auditbeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-filebeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-heartbeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-metricbeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-otel" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-packetbeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-winlogbeat" || \
"$BUILDKITE_PIPELINE_SLUG" == "filebeat" ]]; then
echo "--- Prepare BK test analytics token :vault:"
BUILDKITE_ANALYTICS_TOKEN=$(vault kv get -field token kv/ci-shared/platform-ingest/buildkite_beats_analytics_token)
export BUILDKITE_ANALYTICS_TOKEN
fi
CPU_ARCH=$(uname -m)
PLATFORM_TYPE=$(uname)
if [[ "${CPU_ARCH}" == "x86_64" ]]; then
case "${PLATFORM_TYPE}" in
Linux|Darwin)
export GO_ARCH_TYPE="amd64"
;;
esac
elif [[ "${CPU_ARCH}" == "aarch64" || "${CPU_ARCH}" == "arm64" ]]; then
export GO_ARCH_TYPE="arm64"
else
echo "Unsupported OS"
exit 1
fi