Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.15](backport #39930) Postmigration setenv.sh && common.sh cleanup #40210

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .buildkite/auditbeat/auditbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ steps:
- label: ":ubuntu: Auditbeat: Crosscompile"
command: |
make -C auditbeat crosscompile
env:
GOX_FLAGS: "-arch amd64"
retry:
automatic:
- limit: 3
Expand Down Expand Up @@ -338,12 +336,12 @@ steps:

- group: "Packaging"
key: "auditbeat-packaging"

steps:
- label: ":ubuntu: Auditbeat: Packaging Linux"
key: "auditbeat-package-linux-x86"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
SNAPSHOT: true
command: |
set -euo pipefail
cd auditbeat
Expand All @@ -365,7 +363,6 @@ steps:
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
SNAPSHOT: true
command: |
set -euo pipefail
cd auditbeat
Expand Down
1 change: 1 addition & 0 deletions .buildkite/deploy/kubernetes/scripts/setup-k8s-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -euo pipefail

WORKSPACE=$(pwd)
export KUBECONFIG="${WORKSPACE}/kubecfg"
export BIN="${WORKSPACE}/bin"

Expand Down
11 changes: 6 additions & 5 deletions .buildkite/filebeat/filebeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:

#Deps
ASDF_MAGE_VERSION: 1.15.0

# Integration Tests
K8S_VERSION: "v1.29.0"
ASDF_KIND_VERSION: "0.20.0"
Expand Down Expand Up @@ -302,6 +303,8 @@ steps:
steps:
- label: ":ubuntu: Filebeat: Packaging Linux"
key: "packaging-linux"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
command: |
cd filebeat
mage package
Expand All @@ -315,14 +318,15 @@ steps:
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
notify:
- github_commit_status:
context: "filebeat: Packaging Linux"

- label: ":ubuntu: Filebeat: Packaging arm64"
key: "packaging-arm"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
command: |
cd filebeat
mage package
Expand All @@ -334,9 +338,6 @@ steps:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
notify:
- github_commit_status:
context: "filebeat: Packaging Linux arm64"
4 changes: 2 additions & 2 deletions .buildkite/heartbeat/heartbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:

# Other deps
ASDF_MAGE_VERSION: 1.15.0
ASDF_NODEJS_VERSION: 18.17.1

# Unit tests
RACE_DETECTOR: "true"
Expand Down Expand Up @@ -324,12 +325,12 @@ steps:

- group: "Packaging"
key: "heartbeat-packaging"

steps:
- label: ":ubuntu: Heartbeat: Packaging Linux"
key: "heartbeat-package-linux"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
SNAPSHOT: true
command: |
cd heartbeat
mage package
Expand All @@ -350,7 +351,6 @@ steps:
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
SNAPSHOT: true
command: |
cd heartbeat
mage package
Expand Down
41 changes: 20 additions & 21 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,28 @@ set -euo pipefail
# https://buildkite.com/docs/pipelines/managing-log-output#redacted-environment-variables
PRIVATE_CI_GCS_CREDENTIALS_PATH="kv/ci-shared/platform-ingest/gcp-platform-ingest-ci-service-account"

ENABLED_BEATS_PIPELINES_SLUGS=(
"auditbeat"
"heartbeat"
"filebeat"
"beats-metricbeat"
"beats-winlogbeat"
"beats-xpack-winlogbeat"
"beats-xpack-dockerlogbeat"
"beats-xpack-auditbeat"
"beats-xpack-metricbeat"
"beats-xpack-heartbeat"
"deploy-k8s"
)

for slug in "${ENABLED_BEATS_PIPELINES_SLUGS[@]}"; do
if [[ "$BUILDKITE_PIPELINE_SLUG" == "$slug" ]]; then
source .buildkite/scripts/setenv.sh
break
fi
done

if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-packetbeat" && "$BUILDKITE_STEP_KEY" == *"system-tests"* ]]; then
PRIVATE_CI_GCS_CREDENTIALS_SECRET=$(retry -t 5 -- vault kv get -field plaintext -format=json ${PRIVATE_CI_GCS_CREDENTIALS_PATH})
export PRIVATE_CI_GCS_CREDENTIALS_SECRET
fi

CPU_ARCH=$(uname -m)
PLATFORM_TYPE=$(uname)

if [[ "${CPU_ARCH}" == "x86_64" ]]; then
case "${PLATFORM_TYPE}" in
Linux|Darwin)
export GOX_FLAGS="-arch amd64"
export GO_ARCH_TYPE="amd64"
;;
MINGW*)
export GOX_FLAGS="-arch 386"
;;
esac
elif [[ "${CPU_ARCH}" == "aarch64" || "${CPU_ARCH}" == "arm64" ]]; then
export GOX_FLAGS="-arch arm"
export GO_ARCH_TYPE="arm64"
else
echo "Unsupported OS"
exit 1
fi
2 changes: 2 additions & 0 deletions .buildkite/libbeat/pipeline.libbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:
steps:
- group: "Check/Update"
key: "libbeat-check-update"

steps:
- label: "Libbeat: Run check/update"
command: |
Expand Down Expand Up @@ -46,6 +47,7 @@ steps:

- group: "Mandatory Tests"
key: "mandatory-tests"

steps:
- label: ":ubuntu: Libbeat: Ubuntu x86_64 Unit Tests"
key: "mandatory-linux-unit-test"
Expand Down
10 changes: 5 additions & 5 deletions .buildkite/metricbeat/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ steps:
steps:
- label: ":ubuntu: Metricbeat: Packaging Linux"
key: "packaging-linux"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
command: |
cd metricbeat
mage package
Expand All @@ -331,14 +333,15 @@ steps:
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
notify:
- github_commit_status:
context: "metricbeat: Packaging Linux"

- label: ":ubuntu: Metricbeat: Packaging Linux arm64"
key: "packaging-arm"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
command: |
cd metricbeat
mage package
Expand All @@ -350,9 +353,6 @@ steps:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
notify:
- github_commit_status:
context: "metricbeat: Packaging Linux arm64"
10 changes: 5 additions & 5 deletions .buildkite/packetbeat/pipeline.packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ steps:
steps:
- label: ":ubuntu: Packetbeat: Packaging Linux"
key: "packaging-linux"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
command: |
cd packetbeat
mage package
Expand All @@ -293,14 +295,15 @@ steps:
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
notify:
- github_commit_status:
context: "packetbeat: Packaging Linux"

- label: ":ubuntu: Packetbeat: Packaging Linux arm64"
key: "packaging-arm"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
command: |
cd packetbeat
mage package
Expand All @@ -312,9 +315,6 @@ steps:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
notify:
- github_commit_status:
context: "packetbeat: Packaging Linux arm64"
Loading
Loading