diff --git a/.buildkite/auditbeat/scripts/package-step.sh b/.buildkite/auditbeat/scripts/package-step.sh index 8b348bafa713..021240589923 100755 --- a/.buildkite/auditbeat/scripts/package-step.sh +++ b/.buildkite/auditbeat/scripts/package-step.sh @@ -5,12 +5,12 @@ set -euo pipefail source .buildkite/env-scripts/util.sh changeset="^auditbeat/ - ^go.mod - ^pytest.ini - ^dev-tools/ - ^libbeat/ - ^testing/ - ^\.buildkite/auditbeat/" +^go.mod +^pytest.ini +^dev-tools/ +^libbeat/ +^testing/ +^\.buildkite/auditbeat/" if are_files_changed "$changeset"; then cat <<-EOF diff --git a/.buildkite/env-scripts/win-env.sh b/.buildkite/env-scripts/win-env.sh index dbedb29f516f..ccf5479b46e1 100644 --- a/.buildkite/env-scripts/win-env.sh +++ b/.buildkite/env-scripts/win-env.sh @@ -1,12 +1,8 @@ #!/usr/bin/env bash -install_python_win() { - echo "PLATFORM TYPE: ${PLATFORM_TYPE}" - if [[ ${PLATFORM_TYPE} = MINGW* ]]; then - echo "Installing Python on Win" - choco install mingw -y - choco install python --version=3.11.0 -y - fi -} - -install_python_win +echo "--- PLATFORM TYPE: ${PLATFORM_TYPE}" +if [[ ${PLATFORM_TYPE} = MINGW* ]]; then + echo "--- Installing Python on Win" + choco install mingw -y + choco install python --version=3.11.0 -y +fi diff --git a/.buildkite/filebeat/scripts/package-step.sh b/.buildkite/filebeat/scripts/package-step.sh index a4127c3cd1d6..985125433cec 100755 --- a/.buildkite/filebeat/scripts/package-step.sh +++ b/.buildkite/filebeat/scripts/package-step.sh @@ -5,12 +5,12 @@ set -euo pipefail source .buildkite/env-scripts/util.sh changeset="^filebeat/ - ^go.mod - ^pytest.ini - ^dev-tools/ - ^libbeat/ - ^testing/ - ^\.buildkite/filebeat/" +^go.mod +^pytest.ini +^dev-tools/ +^libbeat/ +^testing/ +^\.buildkite/filebeat/" if are_files_changed "$changeset"; then cat <<-EOF diff --git a/.buildkite/hooks/post-checkout b/.buildkite/hooks/post-checkout index 2f376ec25b08..b6cc7ad60bda 100644 --- a/.buildkite/hooks/post-checkout +++ b/.buildkite/hooks/post-checkout @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail @@ -51,21 +51,3 @@ git --no-pager log --format=%B -n 1 # Ensure buildkite groups are rendered echo "" -#!/usr/bin/env bash - -set -euo pipefail - -source .buildkite/filebeat/scripts/pre-common.sh - -if [[ "$BUILDKITE_PIPELINE_SLUG" == "filebeat" ]]; then - changeset="^filebeat/ - ^go.mod - ^pytest.ini - ^dev-tools/ - ^libbeat/ - ^testing/ - ^\.buildkite/filebeat/" - - check_filebeat_changes "$changeset" - echo ":: FILEBEAT_CHANGESET=$FILEBEAT_CHANGESET ::" -fi diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index acfa9a92d3bd..c448a7102512 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -2,24 +2,14 @@ set -euo pipefail -DOCKER_REGISTRY_SECRET_PATH="kv/ci-shared/platform-ingest/docker_registry_prod" - -if [[ "$BUILDKITE_PIPELINE_SLUG" == "filebeat" ]]; then +if [[ "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" ]]; then source .buildkite/env-scripts/env.sh source .buildkite/env-scripts/util.sh source .buildkite/env-scripts/win-env.sh - if [[ ${PLATFORM_TYPE} = MINGW* ]]; then - install_python_win - fi - if [[ -z "${GOLANG_VERSION-""}" ]]; then export GOLANG_VERSION=$(cat "${WORKSPACE}/.go-version") fi - - if [[ "$BUILDKITE_STEP_KEY" == macos* ]]; then - ulimit -Sn 30000 - fi fi if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-metricbeat" ]]; then @@ -29,8 +19,3 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-metricbeat" ]]; then exit 0 fi fi - -if [[ "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" && "$BUILDKITE_STEP_KEY" == package* ]]; then - export DOCKER_USERNAME_SECRET=$(retry 5 vault kv get -field user "${DOCKER_REGISTRY_SECRET_PATH}") - export DOCKER_PASSWORD_SECRET=$(retry 5 vault kv get -field password "${DOCKER_REGISTRY_SECRET_PATH}") -fi