Skip to content

Commit b7475e6

Browse files
committed
Split fips integration tests into two steps (elastic#17038)
* Split fips integration tests into two steps The integration tests suite takes about 40 minutes. This is far too slow for reasonable feedback on a PR. This commit follows the pattern for the non-fips integration tests whereby the tests are split into two sections that can run in parallel across two steps. This should halve the feedback time. The logic for getting a list of specs files to run has been extracted to a shared shell script for use here and in the integration tests shell script. * Use shared function for splitting integration tests The logic for getting a list of specs to run has been extracted so that it can be shared across fips and non fips integration test modes. This commit updates the non fips integration tests to use the shared function. * fix typo in helper name (kebab case, not snake) * Escape $ so buildkite upload does not try to interpolate * Wrap integration tests in shell script to avoid BK interpolation * Move entrypoint for running integration tests inside docker
1 parent f280ffc commit b7475e6

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

.buildkite/pull_request_pipeline.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ steps:
125125
manual:
126126
allowed: true
127127

128-
- label: ":lab_coat: Integration Tests - FIPS mode"
129-
key: "integration-tests-fips"
128+
- label: ":lab_coat: Integration Tests - FIPS mode / part 1"
129+
key: "integration-tests-fips-part-1"
130130
agents:
131131
provider: gcp
132132
imageProject: elastic-images-prod
@@ -141,7 +141,25 @@ steps:
141141
set -euo pipefail
142142
143143
docker build -t test-runner-image -f x-pack/distributions/internal/observabilitySRE/docker/Dockerfile .
144-
docker run test-runner-image ./gradlew --info --stacktrace -PrunTestsInFIPSMode=true runIntegrationTests
144+
docker run test-runner-image ci/run-fips-integration-tests.sh 0
145+
146+
- label: ":lab_coat: Integration Tests - FIPS mode / part 2"
147+
key: "integration-tests-fips-part-2"
148+
agents:
149+
provider: gcp
150+
imageProject: elastic-images-prod
151+
image: family/platform-ingest-logstash-ubuntu-2204
152+
machineType: "n2-standard-4"
153+
diskSizeGb: 64
154+
retry:
155+
automatic:
156+
# dont retry on failure while they are expected
157+
- limit: 0
158+
command: |
159+
set -euo pipefail
160+
161+
docker build -t test-runner-image -f x-pack/distributions/internal/observabilitySRE/docker/Dockerfile .
162+
docker run test-runner-image ci/run-fips-integration-tests.sh 1
145163
146164
- label: ":lab_coat: Integration Tests / part 1"
147165
key: "integration-tests-part-1"

ci/run-fips-integration-tests.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# get_test_half returns either the first or second half of integration tests
3+
# Usage: get_test_half <half_number>
4+
# half_number: 0 for first half, 1 for second half
5+
6+
half_number=$1
7+
source ci/get-test-half.sh
8+
specs=$(get_test_half "$half_number")
9+
./gradlew --info --stacktrace -PrunTestsInFIPSMode=true runIntegrationTests -PrubyIntegrationSpecs="$specs"

0 commit comments

Comments
 (0)