From b7e3c7f24c13e74dc80eef11b5932f501d192a53 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 19:04:20 +0300 Subject: [PATCH] Removed unused Buildkite scripts (part 1) (#39464) (#39469) This commit removes a number of Buildkite shell scripts that aren't used any more. It's a subset of https://github.com/elastic/beats/pull/39188. Additionally removals will come in a future PR. Relates: https://github.com/elastic/ingest-dev/issues/3219 (cherry picked from commit 05b79af0254f2673cb929baa68d39861b65fb07a) Co-authored-by: Dimitrios Liappis --- .buildkite/scripts/crosscompile.sh | 8 ---- .buildkite/scripts/install_tools.sh | 64 ----------------------------- .buildkite/scripts/stress_tests.sh | 13 ------ .buildkite/scripts/unit_tests.sh | 12 ------ 4 files changed, 97 deletions(-) delete mode 100755 .buildkite/scripts/crosscompile.sh delete mode 100755 .buildkite/scripts/install_tools.sh delete mode 100755 .buildkite/scripts/stress_tests.sh delete mode 100755 .buildkite/scripts/unit_tests.sh diff --git a/.buildkite/scripts/crosscompile.sh b/.buildkite/scripts/crosscompile.sh deleted file mode 100755 index 12f0f6574ca..00000000000 --- a/.buildkite/scripts/crosscompile.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -source .buildkite/scripts/install_tools.sh - -set -euo pipefail - -echo "--- Run Crosscompile for $BEATS_PROJECT_NAME" -make -C "${BEATS_PROJECT_NAME}" crosscompile diff --git a/.buildkite/scripts/install_tools.sh b/.buildkite/scripts/install_tools.sh deleted file mode 100755 index 3d25cf8e5c9..00000000000 --- a/.buildkite/scripts/install_tools.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -source .buildkite/scripts/common.sh - -set -euo pipefail - -echo "--- Env preparation" - -# Temporary solution to fix the issues with "sudo apt get...." https://elastic.slack.com/archives/C0522G6FBNE/p1706003603442859?thread_ts=1706003209.424539&cid=C0522G6FBNE -# It could be removed when we use our own image for the BK agent. -if [ "${platform_type}" == "Linux" ]; then - if [ "${platform_type}" == "Linux" ]; then - if [ $(checkLinuxType) = "ubuntu" ]; then - DEBIAN_FRONTEND="noninteractive" - #sudo command doesn't work at the "pre-command" hook because of another user environment (root with strange permissions) - sudo mkdir -p /etc/needrestart - echo "\$nrconf{restart} = 'a';" | sudo tee -a /etc/needrestart/needrestart.conf > /dev/null - fi - fi -fi - -add_bin_path - -if command -v docker-compose &> /dev/null -then - echo "Found docker-compose. Checking version.." - FOUND_DOCKER_COMPOSE_VERSION=$(docker-compose --version | awk '{print $4}'|sed s/\,//) - if [ $FOUND_DOCKER_COMPOSE_VERSION == $DOCKER_COMPOSE_VERSION ]; then - echo "Versions match. No need to install docker-compose. Exiting." - elif [[ "${platform_type}" == "Linux" && "${arch_type}" == "aarch64" ]]; then - with_docker_compose "${DOCKER_COMPOSE_VERSION_AARCH64}" - elif [[ "${platform_type}" == "Linux" && "${arch_type}" == "x86_64" ]]; then - with_docker_compose "${DOCKER_COMPOSE_VERSION}" - fi -else - with_docker_compose "${DOCKER_COMPOSE_VERSION}" -fi - -with_go "${GO_VERSION}" -with_mage -with_python -with_dependencies -config_git - -if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-heartbeat" ]]; then - # Install NodeJS - withNodeJSEnv "${NODEJS_VERSION}" - installNodeJsDependencies - - echo "Install @elastic/synthetics" - npm i -g @elastic/synthetics -fi - -mage dumpVariables - -#sudo command doesn't work at the "pre-command" hook because of another user environment (root with strange permissions) -sudo chmod -R go-w "${BEATS_PROJECT_NAME}/" #TODO: Remove when the issue is solved https://github.com/elastic/beats/issues/37838 - -pushd "${BEATS_PROJECT_NAME}" > /dev/null - -#TODO "umask 0022" has to be removed after our own image is ready (it has to be moved to the image) -umask 0022 # fix the filesystem permissions issue like this: https://buildkite.com/elastic/beats-metricbeat/builds/1329#018d3179-25a9-475b-a2c8-64329dfe092b/320-1696 - -popd > /dev/null diff --git a/.buildkite/scripts/stress_tests.sh b/.buildkite/scripts/stress_tests.sh deleted file mode 100755 index b177eb53ea6..00000000000 --- a/.buildkite/scripts/stress_tests.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -source .buildkite/scripts/install_tools.sh - -set -euo pipefail - -echo "--- Run Stress Tests for $BEATS_PROJECT_NAME" - -pushd "${BEATS_PROJECT_NAME}" > /dev/null - -make STRESS_TEST_OPTIONS='-timeout=20m -race -v -parallel 1' GOTEST_OUTPUT_OPTIONS='| go-junit-report > libbeat-stress-test.xml' stress-tests - -popd > /dev/null diff --git a/.buildkite/scripts/unit_tests.sh b/.buildkite/scripts/unit_tests.sh deleted file mode 100755 index 059b4166e29..00000000000 --- a/.buildkite/scripts/unit_tests.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -source .buildkite/scripts/install_tools.sh - -set -euo pipefail - -echo "--- Run Unit Tests" -pushd "${BEATS_PROJECT_NAME}" > /dev/null - -mage build unitTest - -popd > /dev/null