From 816d7e6b2b854e1672c68bc9239c5fb74e47fd0b Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Fri, 13 Oct 2023 17:01:01 +0300 Subject: [PATCH] [ci] Add PR it-tests (part 1+2) to Buildkite (#15438) This commit adds integration tests to the Buildkite PR pipeline. Relates: - https://github.com/elastic/logstash/pull/15437 - https://github.com/elastic/ingest-dev/issues/1721 - https://github.com/elastic/logstash/pull/15279 --- .buildkite/pull_request_pipeline.yml | 30 ++++++++++++++++++++ .buildkite/scripts/common/container-agent.sh | 10 +++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.buildkite/pull_request_pipeline.yml b/.buildkite/pull_request_pipeline.yml index e48dc616932..ab18195c054 100644 --- a/.buildkite/pull_request_pipeline.yml +++ b/.buildkite/pull_request_pipeline.yml @@ -42,3 +42,33 @@ steps: source .buildkite/scripts/common/container-agent.sh source .buildkite/scripts/pull-requests/sonar-env.sh ci/unit_tests.sh java + + - label: ":lab_coat: Integration Tests / part 1" + key: "integration-tests-part-1" + agents: + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root" + cpu: "8" + memory: "16Gi" + ephemeralStorage: "100Gi" + # Run as a non-root user + imageUID: "1002" + command: | + set -euo pipefail + + source .buildkite/scripts/common/container-agent.sh + ci/integration_tests.sh split 0 + + - label: ":lab_coat: Integration Tests / part 2" + key: "integration-tests-part-2" + agents: + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root" + cpu: "8" + memory: "16Gi" + ephemeralStorage: "100Gi" + # Run as a non-root user + imageUID: "1002" + command: | + set -euo pipefail + + source .buildkite/scripts/common/container-agent.sh + ci/integration_tests.sh split 1 diff --git a/.buildkite/scripts/common/container-agent.sh b/.buildkite/scripts/common/container-agent.sh index c664883f6f0..e0e2019e226 100644 --- a/.buildkite/scripts/common/container-agent.sh +++ b/.buildkite/scripts/common/container-agent.sh @@ -7,5 +7,11 @@ set -euo pipefail -export PATH="/usr/local/rbenv/bin:$PATH" -eval "$(rbenv init -)" +if [[ $(whoami) == "logstash" ]] +then + export PATH="/home/logstash/.rbenv/bin:$PATH" + eval "$(rbenv init -)" +else + export PATH="/usr/local/rbenv/bin:$PATH" + eval "$(rbenv init -)" +fi