From 98df017b42bed0be9467a280f2c595996485f8f8 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Wed, 7 Feb 2024 21:14:14 +0200 Subject: [PATCH 01/14] added heartbeat scripts and updated pipeline --- .buildkite/heartbeat/heartbeat-pipeline.yml | 143 +++++++++++++++++- .../heartbeat/scripts/integration-gotests.sh | 12 ++ .../heartbeat/scripts/integration-pytests.sh | 12 ++ .buildkite/heartbeat/scripts/package-step.sh | 46 ++++++ .buildkite/heartbeat/scripts/package.sh | 13 ++ .../heartbeat/scripts/unit-tests-win.ps1 | 51 +++++++ .buildkite/heartbeat/scripts/unit-tests.sh | 12 ++ .buildkite/hooks/pre-command | 2 +- .buildkite/pull-requests.json | 4 +- 9 files changed, 290 insertions(+), 5 deletions(-) create mode 100644 .buildkite/heartbeat/scripts/integration-gotests.sh create mode 100644 .buildkite/heartbeat/scripts/integration-pytests.sh create mode 100644 .buildkite/heartbeat/scripts/package-step.sh create mode 100644 .buildkite/heartbeat/scripts/package.sh create mode 100644 .buildkite/heartbeat/scripts/unit-tests-win.ps1 create mode 100644 .buildkite/heartbeat/scripts/unit-tests.sh diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 34321b61161b..82c0cfd9a591 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -1,5 +1,144 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json +env: + IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2204" + IMAGE_UBUNTU_ARM_64: "core-ubuntu-2004-aarch64" + IMAGE_WIN_2016: "family/core-windows-2016" + IMAGE_WIN_2019: "family/core-windows-2019" + IMAGE_WIN_2022: "family/core-windows-2022" + IMAGE_RHEL9: "family/core-rhel-9" + IMAGE_MACOS_X86_64: "generic-13-ventura-x64" + steps: - - label: "Example test" - command: echo "Hello!" + - group: "Heartbeat Mandatory Testing" + key: "mandatory-tests" + if: build.env("GITHUB_PR_TRIGGER_COMMENT") == "heartbeat" || build.env("BUILDKITE_PULL_REQUEST") != "false" + + steps: + - label: ":linux: Unit Tests" + command: + - ".buildkite/heartbeat/scripts/unit-tests.sh" + notify: + - github_commit_status: + context: "heartbeat: Unit Tests" + agents: + provider: "gcp" + image: "{{matrix.image}}" + matrix: + setup: + image: + - "${IMAGE_UBUNTU_X86_64}" + - "${IMAGE_RHEL9}" + artifact_paths: + - "heartbeat/build/*.xml" + - "heartbeat/build/*.json" + + - label: ":windows: Unit Tests" + command: + - ".buildkite/heartbeat/scripts/unit-tests-win.ps1" + notify: + - github_commit_status: + context: "heartbeat: Unit Tests" + agents: + provider: "gcp" + image: "{{matrix.image}}" + machine_type: "n2-standard-8" + disk_size: 200 + disk_type: "pd-ssd" + matrix: + setup: + image: + - "${IMAGE_WIN_2016}" + - "${IMAGE_WIN_2022}" + artifact_paths: + - "heartbeat/build/*.xml" + - "heartbeat/build/*.json" + + - label: ":ubuntu: Go Integration Tests" + command: + - ".buildkite/heartbeat/scripts/integration-gotests.sh" + notify: + - github_commit_status: + context: "heartbeat: Go Integration Tests" + agents: + provider: "gcp" + image: "${IMAGE_UBUNTU_X86_64}" + artifact_paths: + - "heartbeat/build/*.xml" + - "heartbeat/build/*.json" + + - label: ":ubuntu: Python Integration Tests" + command: + - ".buildkite/heartbeat/scripts/integration-pytests.sh" + notify: + - github_commit_status: + context: "heartbeat: Python Integration Tests" + agents: + provider: "gcp" + image: "${IMAGE_UBUNTU_X86_64}" + artifact_paths: + - "heartbeat/build/*.xml" + - "heartbeat/build/*.json" + + - group: "Extended Testing" + key: "extended-tests" + if: build.env("BUILDKITE_PULL_REQUEST") != "false" || build.env("GITHUB_PR_TRIGGER_COMMENT") == "heartbeat for extended support" + + steps: + - label: ":linux: ARM64 Unit Tests" + key: "arm-extended" + if: build.env("GITHUB_PR_TRIGGER_COMMENT") == "heartbeat for arm" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ + command: + - ".buildkite/heartbeat/scripts/unit-tests.sh" + notify: + - github_commit_status: + context: "heartbeat/Extended: Unit Tests ARM" + agents: + provider: "aws" + imagePrefix: "${IMAGE_UBUNTU_ARM_64}" + instanceType: "t4g.large" + artifact_paths: "heartbeat/build/*.xml" + + - label: ":mac: MacOS Unit Tests" + key: "macos-extended" + if: build.env("GITHUB_PR_TRIGGER_COMMENT") == "heartbeat for macos" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ + command: + - ".buildkite/heartbeat/scripts/unit-tests.sh" + notify: + - github_commit_status: + context: "heartbeat/Extended: MacOS Unit Tests" + agents: + provider: "orka" + imagePrefix: "${IMAGE_MACOS_X86_64}" + artifact_paths: "heartbeat/build/*.xml" + + - group: "Windows Extended Testing" + key: "extended-tests-win" + if: build.env("GITHUB_PR_TRIGGER_COMMENT") == "heartbeat for windows" || build.env("GITHUB_PR_LABELS") =~ /.*windows.*/ + + steps: + - label: ":windows: Win 2019 Unit Tests" + key: "win-extended-2019" + command: ".buildkite/heartbeat/scripts/unit-tests-win.ps1" + notify: + - github_commit_status: + context: "heartbeat/Extended: Win-2019 Unit Tests" + agents: + provider: "gcp" + image: "${IMAGE_WIN_2019}" + machine_type: "n2-standard-8" + disk_size: 200 + disk_type: "pd-ssd" + artifact_paths: + - "heartbeat/build/*.xml" + - "heartbeat/build/*.json" + + - group: "Packaging" + key: "packaging" + if: build.env("BUILDKITE_PULL_REQUEST") != "false" + depends_on: + - "mandatory-tests" + + steps: + - label: Package pipeline + commands: ".buildkite/heartbeat/scripts/package-step.sh | buildkite-agent pipeline upload" diff --git a/.buildkite/heartbeat/scripts/integration-gotests.sh b/.buildkite/heartbeat/scripts/integration-gotests.sh new file mode 100644 index 000000000000..bb56795e87be --- /dev/null +++ b/.buildkite/heartbeat/scripts/integration-gotests.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/env-scripts/linux-env.sh + +echo "--- Executing Integration Tests" +sudo chmod -R go-w heartbeat/ + +cd heartbeat +umask 0022 +mage goIntegTest diff --git a/.buildkite/heartbeat/scripts/integration-pytests.sh b/.buildkite/heartbeat/scripts/integration-pytests.sh new file mode 100644 index 000000000000..0427d89663d9 --- /dev/null +++ b/.buildkite/heartbeat/scripts/integration-pytests.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/env-scripts/linux-env.sh + +echo "--- Executing Integration Tests" +sudo chmod -R go-w heartbeat/ + +cd heartbeat +umask 0022 +mage pythonIntegTest diff --git a/.buildkite/heartbeat/scripts/package-step.sh b/.buildkite/heartbeat/scripts/package-step.sh new file mode 100644 index 000000000000..6dd15a23230a --- /dev/null +++ b/.buildkite/heartbeat/scripts/package-step.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/env-scripts/util.sh + +changeset="^heartbeat/ +^go.mod +^pytest.ini +^dev-tools/ +^libbeat/ +^testing/ +^\.buildkite/heartbeat/" + +if are_files_changed "$changeset"; then + cat <<-EOF + steps: + - label: ":ubuntu: Packaging Linux X86" + key: "package-linux-x86" + env: + PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64" + command: + - ".buildkite/heartbeat/scripts/package.sh" + notify: + - github_commit_status: + context: "heartbeat/Packaging: Linux X86" + agents: + provider: "gcp" + image: "${IMAGE_UBUNTU_X86_64}" + + - label: ":linux: Packaging Linux ARM" + key: "package-linux-arm" + env: + PLATFORMS: "linux/arm64" + PACKAGES: "docker" + command: + - ".buildkite/heartbeat/scripts/package.sh" + notify: + - github_commit_status: + context: "heartbeat/Packaging: ARM" + agents: + provider: "aws" + imagePrefix: "${IMAGE_UBUNTU_ARM_64}" + instanceType: "t4g.large" +EOF +fi diff --git a/.buildkite/heartbeat/scripts/package.sh b/.buildkite/heartbeat/scripts/package.sh new file mode 100644 index 000000000000..7f51a6b5ca19 --- /dev/null +++ b/.buildkite/heartbeat/scripts/package.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/env-scripts/linux-env.sh + +echo "--- Docker Version: $(docker --version)" + +echo "--- Start Packaging" +cd heartbeat +umask 0022 +mage package + diff --git a/.buildkite/heartbeat/scripts/unit-tests-win.ps1 b/.buildkite/heartbeat/scripts/unit-tests-win.ps1 new file mode 100644 index 000000000000..17282813e13c --- /dev/null +++ b/.buildkite/heartbeat/scripts/unit-tests-win.ps1 @@ -0,0 +1,51 @@ +$ErrorActionPreference = "Stop" # set -e +$GoVersion = $env:GOLANG_VERSION # If Choco doesn't have the version specified in .go-version file, should be changed manually + +# Forcing to checkout again all the files with a correct autocrlf. +# Doing this here because we cannot set git clone options before. +function fixCRLF() { + Write-Host "--- Fixing CRLF in git checkout --" + git config core.autocrlf false + git rm --quiet --cached -r . + git reset --quiet --hard +} + +function withGolang() { + Write-Host "--- Install golang $GoVersion --" + choco install golang -y --version $GoVersion + + $choco = Convert-Path "$((Get-Command choco).Path)\..\.." + Import-Module "$choco\helpers\chocolateyProfile.psm1" + refreshenv + go version + go env +} + +function installGoDependencies() { + $installPackages = @( + "github.com/magefile/mage" + "github.com/elastic/go-licenser" + "golang.org/x/tools/cmd/goimports" + "github.com/jstemmer/go-junit-report" + "github.com/tebeka/go2xunit" + ) + foreach ($pkg in $installPackages) { + go install "$pkg" + } +} + +fixCRLF + +$ErrorActionPreference = "Continue" # set +e + +Set-Location -Path heartbeat +New-Item -ItemType Directory -Force -Path "build" +withGolang +installGoDependencies + +mage build unitTest + +$EXITCODE=$LASTEXITCODE +$ErrorActionPreference = "Stop" + +Exit $EXITCODE diff --git a/.buildkite/heartbeat/scripts/unit-tests.sh b/.buildkite/heartbeat/scripts/unit-tests.sh new file mode 100644 index 000000000000..edbcb37efecb --- /dev/null +++ b/.buildkite/heartbeat/scripts/unit-tests.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/env-scripts/linux-env.sh + +echo "--- Running Unit Tests" +sudo chmod -R go-w heartbeat/ + +cd heartbeat +umask 0022 +mage build unitTest diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 21e4f04eb13f..cf66e4edf6e0 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -2,7 +2,7 @@ set -euo pipefail -if [[ "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" ]]; then +if [[ "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" || "$BUILDKITE_PIPELINE_SLUG" == "heartbeat" ]]; then source .buildkite/env-scripts/env.sh source .buildkite/env-scripts/util.sh source .buildkite/env-scripts/win-env.sh diff --git a/.buildkite/pull-requests.json b/.buildkite/pull-requests.json index 66c508e252c9..5d1310f101ed 100644 --- a/.buildkite/pull-requests.json +++ b/.buildkite/pull-requests.json @@ -73,8 +73,8 @@ "set_commit_status": true, "build_on_commit": true, "build_on_comment": true, - "trigger_comment_regex": "^/test heartbeat$", - "always_trigger_comment_regex": "^/test heartbeat$", + "trigger_comment_regex": "^/test heartbeat(for (arm|macos|windows|extended support))?$|^/package heartbeat$", + "always_trigger_comment_regex": "^/test heartbeat(for (arm|macos|windows|extended support))?$|^/package heartbeat$", "skip_ci_labels": [ ], "skip_target_branches": [ ], "skip_ci_on_only_changed": [ ], From de939114d7fa354d302fcf91ef55761043a6cd11 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Wed, 7 Feb 2024 21:16:00 +0200 Subject: [PATCH 02/14] made scripts executable --- .buildkite/auditbeat/scripts/package-step.sh | 14 ++++++++++++++ .buildkite/env-scripts/linux-env.sh | 2 -- .buildkite/env-scripts/util.sh | 1 - .buildkite/env-scripts/win-env.sh | 1 - .buildkite/filebeat/scripts/package-step.sh | 14 ++++++++++++++ .buildkite/heartbeat/heartbeat-pipeline.yml | 4 ++-- .../heartbeat/scripts/integration-gotests.sh | 0 .../heartbeat/scripts/integration-pytests.sh | 0 .buildkite/heartbeat/scripts/package-step.sh | 14 ++++++++++++++ .buildkite/heartbeat/scripts/package.sh | 0 .buildkite/heartbeat/scripts/unit-tests.sh | 0 11 files changed, 44 insertions(+), 6 deletions(-) mode change 100644 => 100755 .buildkite/heartbeat/scripts/integration-gotests.sh mode change 100644 => 100755 .buildkite/heartbeat/scripts/integration-pytests.sh mode change 100644 => 100755 .buildkite/heartbeat/scripts/package-step.sh mode change 100644 => 100755 .buildkite/heartbeat/scripts/package.sh mode change 100644 => 100755 .buildkite/heartbeat/scripts/unit-tests.sh diff --git a/.buildkite/auditbeat/scripts/package-step.sh b/.buildkite/auditbeat/scripts/package-step.sh index 021240589923..52315c07aae0 100755 --- a/.buildkite/auditbeat/scripts/package-step.sh +++ b/.buildkite/auditbeat/scripts/package-step.sh @@ -43,4 +43,18 @@ if are_files_changed "$changeset"; then imagePrefix: "${IMAGE_UBUNTU_ARM_64}" instanceType: "t4g.large" EOF +else + cat <<-EOF + steps: + - label: ":ubuntu: Packaging Linux X86" + key: "package-linux-x86" + command: + - "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" + notify: + - github_commit_status: + context: "Auditbeat/Packaging: Linux X86" + agents: + provider: "gcp" + image: "${IMAGE_UBUNTU_X86_64}" +EOF fi diff --git a/.buildkite/env-scripts/linux-env.sh b/.buildkite/env-scripts/linux-env.sh index 5e6e5f7cbf05..1365aaace4a9 100644 --- a/.buildkite/env-scripts/linux-env.sh +++ b/.buildkite/env-scripts/linux-env.sh @@ -9,8 +9,6 @@ DEBIAN_FRONTEND="noninteractive" sudo mkdir -p /etc/needrestart echo "\$nrconf{restart} = 'a';" | sudo tee -a /etc/needrestart/needrestart.conf > /dev/null -echo "--- PLATFORM TYPE $PLATFORM_TYPE" - if [[ $PLATFORM_TYPE == "Linux" ]]; then # Remove this code once beats specific agent is set up if grep -q 'Ubuntu' /etc/*release; then diff --git a/.buildkite/env-scripts/util.sh b/.buildkite/env-scripts/util.sh index 7aef69cff389..6a5c36bcd047 100644 --- a/.buildkite/env-scripts/util.sh +++ b/.buildkite/env-scripts/util.sh @@ -85,7 +85,6 @@ are_files_changed() { if git diff --name-only HEAD@{1} HEAD | grep -qE "$changeset"; then return 0; else - echo "WARN! No files changed in $changeset" return 1; fi } diff --git a/.buildkite/env-scripts/win-env.sh b/.buildkite/env-scripts/win-env.sh index ccf5479b46e1..931051d550af 100644 --- a/.buildkite/env-scripts/win-env.sh +++ b/.buildkite/env-scripts/win-env.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -echo "--- PLATFORM TYPE: ${PLATFORM_TYPE}" if [[ ${PLATFORM_TYPE} = MINGW* ]]; then echo "--- Installing Python on Win" choco install mingw -y diff --git a/.buildkite/filebeat/scripts/package-step.sh b/.buildkite/filebeat/scripts/package-step.sh index 985125433cec..b21149d6ad47 100755 --- a/.buildkite/filebeat/scripts/package-step.sh +++ b/.buildkite/filebeat/scripts/package-step.sh @@ -43,4 +43,18 @@ if are_files_changed "$changeset"; then imagePrefix: "${IMAGE_UBUNTU_ARM_64}" instanceType: "t4g.large" EOF +else + cat <<-EOF + steps: + - label: ":ubuntu: Packaging Linux X86" + key: "package-linux-x86" + command: + - "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" + notify: + - github_commit_status: + context: "Auditbeat/Packaging: Linux X86" + agents: + provider: "gcp" + image: "${IMAGE_UBUNTU_X86_64}" +EOF fi diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 82c0cfd9a591..507392cb4ce3 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -15,7 +15,7 @@ steps: if: build.env("GITHUB_PR_TRIGGER_COMMENT") == "heartbeat" || build.env("BUILDKITE_PULL_REQUEST") != "false" steps: - - label: ":linux: Unit Tests" + - label: ":linux: Unit Tests / {{matrix.image}}" command: - ".buildkite/heartbeat/scripts/unit-tests.sh" notify: @@ -33,7 +33,7 @@ steps: - "heartbeat/build/*.xml" - "heartbeat/build/*.json" - - label: ":windows: Unit Tests" + - label: ":windows: Unit Tests / {{matrix.image}}" command: - ".buildkite/heartbeat/scripts/unit-tests-win.ps1" notify: diff --git a/.buildkite/heartbeat/scripts/integration-gotests.sh b/.buildkite/heartbeat/scripts/integration-gotests.sh old mode 100644 new mode 100755 diff --git a/.buildkite/heartbeat/scripts/integration-pytests.sh b/.buildkite/heartbeat/scripts/integration-pytests.sh old mode 100644 new mode 100755 diff --git a/.buildkite/heartbeat/scripts/package-step.sh b/.buildkite/heartbeat/scripts/package-step.sh old mode 100644 new mode 100755 index 6dd15a23230a..9f0071b14262 --- a/.buildkite/heartbeat/scripts/package-step.sh +++ b/.buildkite/heartbeat/scripts/package-step.sh @@ -43,4 +43,18 @@ if are_files_changed "$changeset"; then imagePrefix: "${IMAGE_UBUNTU_ARM_64}" instanceType: "t4g.large" EOF +else + cat <<-EOF + steps: + - label: ":ubuntu: Packaging Linux X86" + key: "package-linux-x86" + command: + - "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" + notify: + - github_commit_status: + context: "Auditbeat/Packaging: Linux X86" + agents: + provider: "gcp" + image: "${IMAGE_UBUNTU_X86_64}" +EOF fi diff --git a/.buildkite/heartbeat/scripts/package.sh b/.buildkite/heartbeat/scripts/package.sh old mode 100644 new mode 100755 diff --git a/.buildkite/heartbeat/scripts/unit-tests.sh b/.buildkite/heartbeat/scripts/unit-tests.sh old mode 100644 new mode 100755 From 6a7d1750d41fe3860e9fec976cf6ba9b144e75c6 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 11:50:14 +0200 Subject: [PATCH 03/14] removed gcp agent for skipped packaging step --- .buildkite/heartbeat/scripts/package-step.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/heartbeat/scripts/package-step.sh b/.buildkite/heartbeat/scripts/package-step.sh index 9f0071b14262..a53cbc254210 100755 --- a/.buildkite/heartbeat/scripts/package-step.sh +++ b/.buildkite/heartbeat/scripts/package-step.sh @@ -53,8 +53,8 @@ else notify: - github_commit_status: context: "Auditbeat/Packaging: Linux X86" - agents: - provider: "gcp" - image: "${IMAGE_UBUNTU_X86_64}" +# agents: +# provider: "gcp" +# image: "${IMAGE_UBUNTU_X86_64}" EOF fi From 844bd867ca7fcd34b802a295ab4ccb7daa0ef630 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 12:09:05 +0200 Subject: [PATCH 04/14] added agent name from matrix to GH notifications --- .buildkite/heartbeat/heartbeat-pipeline.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 507392cb4ce3..637010c165d2 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -20,7 +20,7 @@ steps: - ".buildkite/heartbeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "heartbeat: Unit Tests" + context: "heartbeat/Unit Tests {{matrix.image}}" agents: provider: "gcp" image: "{{matrix.image}}" @@ -38,12 +38,11 @@ steps: - ".buildkite/heartbeat/scripts/unit-tests-win.ps1" notify: - github_commit_status: - context: "heartbeat: Unit Tests" + context: "heartbeat/windows/Unit Tests {{matrix.image}}" agents: provider: "gcp" image: "{{matrix.image}}" machine_type: "n2-standard-8" - disk_size: 200 disk_type: "pd-ssd" matrix: setup: @@ -127,7 +126,6 @@ steps: provider: "gcp" image: "${IMAGE_WIN_2019}" machine_type: "n2-standard-8" - disk_size: 200 disk_type: "pd-ssd" artifact_paths: - "heartbeat/build/*.xml" @@ -136,8 +134,8 @@ steps: - group: "Packaging" key: "packaging" if: build.env("BUILDKITE_PULL_REQUEST") != "false" - depends_on: - - "mandatory-tests" +# depends_on: +# - "mandatory-tests" steps: - label: Package pipeline From e61403f01868db514d3b69bd98023814f6f0011b Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 12:19:31 +0200 Subject: [PATCH 05/14] testing dynamic step --- .buildkite/heartbeat/heartbeat-pipeline.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 637010c165d2..793ca75e4909 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -134,9 +134,16 @@ steps: - group: "Packaging" key: "packaging" if: build.env("BUILDKITE_PULL_REQUEST") != "false" -# depends_on: -# - "mandatory-tests" + depends_on: + - "mandatory-tests" steps: - label: Package pipeline commands: ".buildkite/heartbeat/scripts/package-step.sh | buildkite-agent pipeline upload" + + - label: "No changeset test" + command: + - "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" + notify: + - github_commit_status: + context: "Auditbeat/Packaging: Linux X86" From 3f5edac6aded67b558795dc5c575bfc8e654aa8a Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 12:22:33 +0200 Subject: [PATCH 06/14] fixed typo --- .buildkite/heartbeat/heartbeat-pipeline.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 793ca75e4909..d614e42bf8f7 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -142,8 +142,7 @@ steps: commands: ".buildkite/heartbeat/scripts/package-step.sh | buildkite-agent pipeline upload" - label: "No changeset test" - command: - - "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" + commands: "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" notify: - github_commit_status: context: "Auditbeat/Packaging: Linux X86" From 2233432d1d1a7e0fbf860de648b6b2fbed47429f Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 12:27:07 +0200 Subject: [PATCH 07/14] updated command --- .buildkite/heartbeat/heartbeat-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index d614e42bf8f7..57ae57e9cce6 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -142,7 +142,7 @@ steps: commands: ".buildkite/heartbeat/scripts/package-step.sh | buildkite-agent pipeline upload" - label: "No changeset test" - commands: "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" + commands: buildkite-agent annotate "No required files changed" --style "warning" --context "ctx-warning" notify: - github_commit_status: - context: "Auditbeat/Packaging: Linux X86" + context: "Auditbeat/Packaging: TEST" From 1d244d92a945dcae0ac4342b33409ae7a2f41b0c Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 12:34:51 +0200 Subject: [PATCH 08/14] added agent --- .buildkite/heartbeat/heartbeat-pipeline.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 57ae57e9cce6..f882c3b33d3a 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -146,3 +146,10 @@ steps: notify: - github_commit_status: context: "Auditbeat/Packaging: TEST" + env: + GO_AGENT_IMAGE: "golang:${GOLANG_VERSION}" + TERRAFORM_VERSION: "1.6.3" + agents: + image: "${GO_AGENT_IMAGE}" + cpu: "8" + memory: "4G" From ce3c0ed7dbc7af673059cd9cdcb9e52794244d3a Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 12:38:58 +0200 Subject: [PATCH 09/14] testing annotate step --- .buildkite/heartbeat/heartbeat-pipeline.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index f882c3b33d3a..a2b0c5d1f605 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -134,8 +134,8 @@ steps: - group: "Packaging" key: "packaging" if: build.env("BUILDKITE_PULL_REQUEST") != "false" - depends_on: - - "mandatory-tests" +# depends_on: +# - "mandatory-tests" steps: - label: Package pipeline @@ -153,3 +153,9 @@ steps: image: "${GO_AGENT_IMAGE}" cpu: "8" memory: "4G" + + - label: "No agent test" + commands: buildkite-agent annotate "No required files changed" --style "warning" --context "ctx-warning" + notify: + - github_commit_status: + context: "Auditbeat/Packaging: no agent TEST" From de95daa42c7afa00e7e9fda1430e115baaa68943 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 12:51:51 +0200 Subject: [PATCH 10/14] code cleanup --- .buildkite/auditbeat/scripts/package-step.sh | 19 ++++++-------- .buildkite/filebeat/scripts/package-step.sh | 11 +++----- .buildkite/heartbeat/heartbeat-pipeline.yml | 27 ++------------------ .buildkite/heartbeat/scripts/package-step.sh | 11 +++----- 4 files changed, 18 insertions(+), 50 deletions(-) diff --git a/.buildkite/auditbeat/scripts/package-step.sh b/.buildkite/auditbeat/scripts/package-step.sh index 52315c07aae0..8717356a4a20 100755 --- a/.buildkite/auditbeat/scripts/package-step.sh +++ b/.buildkite/auditbeat/scripts/package-step.sh @@ -45,16 +45,13 @@ if are_files_changed "$changeset"; then EOF else cat <<-EOF - steps: - - label: ":ubuntu: Packaging Linux X86" - key: "package-linux-x86" - command: - - "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" - notify: - - github_commit_status: - context: "Auditbeat/Packaging: Linux X86" - agents: - provider: "gcp" - image: "${IMAGE_UBUNTU_X86_64}" + steps: + - label: "Skipping packaging" + key: "package-skip" + command: + - "buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning'" + notify: + - github_commit_status: + context: "Auditbeat/package-skip" EOF fi diff --git a/.buildkite/filebeat/scripts/package-step.sh b/.buildkite/filebeat/scripts/package-step.sh index b21149d6ad47..e5b207682694 100755 --- a/.buildkite/filebeat/scripts/package-step.sh +++ b/.buildkite/filebeat/scripts/package-step.sh @@ -46,15 +46,12 @@ EOF else cat <<-EOF steps: - - label: ":ubuntu: Packaging Linux X86" - key: "package-linux-x86" + - label: "Skipping packaging" + key: "package-skip" command: - - "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" + - "buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning'" notify: - github_commit_status: - context: "Auditbeat/Packaging: Linux X86" - agents: - provider: "gcp" - image: "${IMAGE_UBUNTU_X86_64}" + context: "Filebeat/package-skip" EOF fi diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index a2b0c5d1f605..2133127e56ae 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -134,28 +134,5 @@ steps: - group: "Packaging" key: "packaging" if: build.env("BUILDKITE_PULL_REQUEST") != "false" -# depends_on: -# - "mandatory-tests" - - steps: - - label: Package pipeline - commands: ".buildkite/heartbeat/scripts/package-step.sh | buildkite-agent pipeline upload" - - - label: "No changeset test" - commands: buildkite-agent annotate "No required files changed" --style "warning" --context "ctx-warning" - notify: - - github_commit_status: - context: "Auditbeat/Packaging: TEST" - env: - GO_AGENT_IMAGE: "golang:${GOLANG_VERSION}" - TERRAFORM_VERSION: "1.6.3" - agents: - image: "${GO_AGENT_IMAGE}" - cpu: "8" - memory: "4G" - - - label: "No agent test" - commands: buildkite-agent annotate "No required files changed" --style "warning" --context "ctx-warning" - notify: - - github_commit_status: - context: "Auditbeat/Packaging: no agent TEST" + depends_on: + - "mandatory-tests" diff --git a/.buildkite/heartbeat/scripts/package-step.sh b/.buildkite/heartbeat/scripts/package-step.sh index a53cbc254210..1cce0e59b685 100755 --- a/.buildkite/heartbeat/scripts/package-step.sh +++ b/.buildkite/heartbeat/scripts/package-step.sh @@ -46,15 +46,12 @@ EOF else cat <<-EOF steps: - - label: ":ubuntu: Packaging Linux X86" - key: "package-linux-x86" + - label: "Skipping packaging" + key: "package-skip" command: - - "buildkite-agent annotate "No required files changed" --style 'warning' --context 'ctx-warning'" + - "buildkite-agent annotate "No required files changed." --style 'warning' --context 'ctx-warning'" notify: - github_commit_status: - context: "Auditbeat/Packaging: Linux X86" -# agents: -# provider: "gcp" -# image: "${IMAGE_UBUNTU_X86_64}" + context: "heartbeat/package-skip" EOF fi From 6f0c2b346e13a3b693cc36a56b55eb781c8bc001 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 12:54:51 +0200 Subject: [PATCH 11/14] restored dynamic step --- .buildkite/heartbeat/heartbeat-pipeline.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 2133127e56ae..5e49a590be5e 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -136,3 +136,7 @@ steps: if: build.env("BUILDKITE_PULL_REQUEST") != "false" depends_on: - "mandatory-tests" + + steps: + - label: Package pipeline + commands: ".buildkite/heartbeat/scripts/package-step.sh | buildkite-agent pipeline upload" From 9f7bce8c4d9d67ef5455ec2fe56a85653ce92863 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 13:07:02 +0200 Subject: [PATCH 12/14] updated GH notifictions --- .buildkite/heartbeat/heartbeat-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 5e49a590be5e..5fcfc149b6f6 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -20,7 +20,7 @@ steps: - ".buildkite/heartbeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "heartbeat/Unit Tests {{matrix.image}}" + context: "heartbeat/ linux/Unit Tests" agents: provider: "gcp" image: "{{matrix.image}}" @@ -38,7 +38,7 @@ steps: - ".buildkite/heartbeat/scripts/unit-tests-win.ps1" notify: - github_commit_status: - context: "heartbeat/windows/Unit Tests {{matrix.image}}" + context: "heartbeat/ windows/Unit Tests" agents: provider: "gcp" image: "{{matrix.image}}" From 9349512ac8f5ecf12ffe5a58795d64df83ab3d02 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 15:57:03 +0200 Subject: [PATCH 13/14] updated GH notifications --- .buildkite/auditbeat/auditbeat-pipeline.yml | 14 +++++++------- .buildkite/auditbeat/scripts/package-step.sh | 16 ++++------------ .buildkite/filebeat/filebeat-pipeline.yml | 6 +++--- .buildkite/filebeat/scripts/package-step.sh | 16 ++++------------ .buildkite/heartbeat/heartbeat-pipeline.yml | 14 +++++++------- .buildkite/heartbeat/scripts/package-step.sh | 16 ++++------------ 6 files changed, 29 insertions(+), 53 deletions(-) diff --git a/.buildkite/auditbeat/auditbeat-pipeline.yml b/.buildkite/auditbeat/auditbeat-pipeline.yml index 147ca45ced16..62c0d86e259a 100644 --- a/.buildkite/auditbeat/auditbeat-pipeline.yml +++ b/.buildkite/auditbeat/auditbeat-pipeline.yml @@ -20,7 +20,7 @@ steps: - ".buildkite/auditbeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "auditbeat: Unit Tests" + context: "Auditbeat: linux/Unit Tests" agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -33,7 +33,7 @@ steps: - ".buildkite/auditbeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "auditbeat: Unit Tests" + context: "Auditbeat: rhel/Unit Tests" agents: provider: "gcp" image: "${IMAGE_RHEL9}" @@ -45,7 +45,7 @@ steps: command: ".buildkite/auditbeat/scripts/unit-tests-win.ps1" notify: - github_commit_status: - context: "auditbeat: Unit Tests" + context: "Auditbeat: windows/Unit Tests" agents: provider: "gcp" image: "{{matrix.image}}" @@ -68,7 +68,7 @@ steps: GOX_FLAGS: "-arch amd64" notify: - github_commit_status: - context: "auditbeat: Unit Tests" + context: "Auditbeat: Crosscompile" agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -85,7 +85,7 @@ steps: - ".buildkite/auditbeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "auditbeat/Extended: Unit Tests ARM" + context: "Auditbeat/Extended: Unit Tests ARM" agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" @@ -99,7 +99,7 @@ steps: - ".buildkite/auditbeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "auditbeat/Extended: MacOS Unit Tests" + context: "Auditbeat/Extended: MacOS Unit Tests" agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -115,7 +115,7 @@ steps: command: ".buildkite/auditbeat/scripts/unit-tests-win.ps1" notify: - github_commit_status: - context: "auditbeat/Extended: Win-2019 Unit Tests" + context: "Auditbeat/Extended: Win-2019 Unit Tests" agents: provider: "gcp" image: "${IMAGE_WIN_2019}" diff --git a/.buildkite/auditbeat/scripts/package-step.sh b/.buildkite/auditbeat/scripts/package-step.sh index 8717356a4a20..6c113f4e3cae 100755 --- a/.buildkite/auditbeat/scripts/package-step.sh +++ b/.buildkite/auditbeat/scripts/package-step.sh @@ -13,7 +13,7 @@ changeset="^auditbeat/ ^\.buildkite/auditbeat/" if are_files_changed "$changeset"; then - cat <<-EOF + cat <<-YAML steps: - label: ":ubuntu: Packaging Linux X86" key: "package-linux-x86" @@ -42,16 +42,8 @@ if are_files_changed "$changeset"; then provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" instanceType: "t4g.large" -EOF +YAML else - cat <<-EOF - steps: - - label: "Skipping packaging" - key: "package-skip" - command: - - "buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning'" - notify: - - github_commit_status: - context: "Auditbeat/package-skip" -EOF + buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning' + exit 0 fi diff --git a/.buildkite/filebeat/filebeat-pipeline.yml b/.buildkite/filebeat/filebeat-pipeline.yml index eda9fb93a669..f86ad7da11d4 100644 --- a/.buildkite/filebeat/filebeat-pipeline.yml +++ b/.buildkite/filebeat/filebeat-pipeline.yml @@ -19,7 +19,7 @@ steps: - ".buildkite/filebeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "Filebeat: Unit Tests" + context: "Filebeat: linux/Unit Tests" agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -33,7 +33,7 @@ steps: - ".buildkite/filebeat/scripts/integration-gotests.sh" notify: - github_commit_status: - context: "Filebeat: Integration Tests" + context: "Filebeat: Go Integration Tests" agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -60,7 +60,7 @@ steps: command: ".buildkite/filebeat/scripts/unit-tests-win.ps1" notify: - github_commit_status: - context: "Filebeat: Unit Tests" + context: "Filebeat: windows/Unit Tests" agents: provider: "gcp" image: "{{matrix.image}}" diff --git a/.buildkite/filebeat/scripts/package-step.sh b/.buildkite/filebeat/scripts/package-step.sh index e5b207682694..c2a1bf41a01d 100755 --- a/.buildkite/filebeat/scripts/package-step.sh +++ b/.buildkite/filebeat/scripts/package-step.sh @@ -13,7 +13,7 @@ changeset="^filebeat/ ^\.buildkite/filebeat/" if are_files_changed "$changeset"; then - cat <<-EOF + cat <<-YAML steps: - label: ":ubuntu: Packaging Linux X86" key: "package-linux-x86" @@ -42,16 +42,8 @@ if are_files_changed "$changeset"; then provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" instanceType: "t4g.large" -EOF +YAML else - cat <<-EOF - steps: - - label: "Skipping packaging" - key: "package-skip" - command: - - "buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning'" - notify: - - github_commit_status: - context: "Filebeat/package-skip" -EOF + buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning' + exit 0 fi diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 5fcfc149b6f6..93cbfc32008f 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -20,7 +20,7 @@ steps: - ".buildkite/heartbeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "heartbeat/ linux/Unit Tests" + context: "Heartbeat: linux/Unit Tests" agents: provider: "gcp" image: "{{matrix.image}}" @@ -38,7 +38,7 @@ steps: - ".buildkite/heartbeat/scripts/unit-tests-win.ps1" notify: - github_commit_status: - context: "heartbeat/ windows/Unit Tests" + context: "Heartbeat: windows/Unit Tests" agents: provider: "gcp" image: "{{matrix.image}}" @@ -58,7 +58,7 @@ steps: - ".buildkite/heartbeat/scripts/integration-gotests.sh" notify: - github_commit_status: - context: "heartbeat: Go Integration Tests" + context: "Heartbeat: Go Integration Tests" agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -71,7 +71,7 @@ steps: - ".buildkite/heartbeat/scripts/integration-pytests.sh" notify: - github_commit_status: - context: "heartbeat: Python Integration Tests" + context: "Heartbeat: Python Integration Tests" agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -91,7 +91,7 @@ steps: - ".buildkite/heartbeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "heartbeat/Extended: Unit Tests ARM" + context: "Heartbeat/Extended: Unit Tests ARM" agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" @@ -105,7 +105,7 @@ steps: - ".buildkite/heartbeat/scripts/unit-tests.sh" notify: - github_commit_status: - context: "heartbeat/Extended: MacOS Unit Tests" + context: "Heartbeat/Extended: MacOS Unit Tests" agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -121,7 +121,7 @@ steps: command: ".buildkite/heartbeat/scripts/unit-tests-win.ps1" notify: - github_commit_status: - context: "heartbeat/Extended: Win-2019 Unit Tests" + context: "Heartbeat/Extended: Win-2019 Unit Tests" agents: provider: "gcp" image: "${IMAGE_WIN_2019}" diff --git a/.buildkite/heartbeat/scripts/package-step.sh b/.buildkite/heartbeat/scripts/package-step.sh index 1cce0e59b685..05ef69b131ad 100755 --- a/.buildkite/heartbeat/scripts/package-step.sh +++ b/.buildkite/heartbeat/scripts/package-step.sh @@ -13,7 +13,7 @@ changeset="^heartbeat/ ^\.buildkite/heartbeat/" if are_files_changed "$changeset"; then - cat <<-EOF + cat <<-YAML steps: - label: ":ubuntu: Packaging Linux X86" key: "package-linux-x86" @@ -42,16 +42,8 @@ if are_files_changed "$changeset"; then provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" instanceType: "t4g.large" -EOF +YAML else - cat <<-EOF - steps: - - label: "Skipping packaging" - key: "package-skip" - command: - - "buildkite-agent annotate "No required files changed." --style 'warning' --context 'ctx-warning'" - notify: - - github_commit_status: - context: "heartbeat/package-skip" -EOF + buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning' + exit 0 fi From a18ea535b1a52096bb0d6a7858d90e984f5c280b Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 8 Feb 2024 19:37:13 +0200 Subject: [PATCH 14/14] added comments --- .buildkite/heartbeat/scripts/integration-gotests.sh | 3 +++ .buildkite/heartbeat/scripts/integration-pytests.sh | 3 +++ .buildkite/heartbeat/scripts/unit-tests.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.buildkite/heartbeat/scripts/integration-gotests.sh b/.buildkite/heartbeat/scripts/integration-gotests.sh index bb56795e87be..8eab0e8b5d88 100755 --- a/.buildkite/heartbeat/scripts/integration-gotests.sh +++ b/.buildkite/heartbeat/scripts/integration-gotests.sh @@ -2,11 +2,14 @@ set -euo pipefail +# Remove when custom image is set up source .buildkite/env-scripts/linux-env.sh echo "--- Executing Integration Tests" +# Remove when custom image is set up sudo chmod -R go-w heartbeat/ cd heartbeat +# Remove when custom image is set up umask 0022 mage goIntegTest diff --git a/.buildkite/heartbeat/scripts/integration-pytests.sh b/.buildkite/heartbeat/scripts/integration-pytests.sh index 0427d89663d9..729df5ae6f61 100755 --- a/.buildkite/heartbeat/scripts/integration-pytests.sh +++ b/.buildkite/heartbeat/scripts/integration-pytests.sh @@ -2,11 +2,14 @@ set -euo pipefail +# Remove when custom image is set up source .buildkite/env-scripts/linux-env.sh echo "--- Executing Integration Tests" +# Remove when custom image is set up sudo chmod -R go-w heartbeat/ cd heartbeat +# Remove when custom image is set up umask 0022 mage pythonIntegTest diff --git a/.buildkite/heartbeat/scripts/unit-tests.sh b/.buildkite/heartbeat/scripts/unit-tests.sh index edbcb37efecb..4b746da2d57c 100755 --- a/.buildkite/heartbeat/scripts/unit-tests.sh +++ b/.buildkite/heartbeat/scripts/unit-tests.sh @@ -2,11 +2,14 @@ set -euo pipefail +# Remove when custom image is set up source .buildkite/env-scripts/linux-env.sh echo "--- Running Unit Tests" +# Remove when custom image is set up sudo chmod -R go-w heartbeat/ cd heartbeat +# Remove when custom image is set up umask 0022 mage build unitTest