Skip to content

Commit 8b1ed89

Browse files
committed
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.
1 parent df94d53 commit 8b1ed89

1 file changed

Lines changed: 39 additions & 3 deletions

File tree

.buildkite/pull_request_pipeline.yml

Lines changed: 39 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,43 @@ 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 /bin/bash -c '
145+
pushd qa/integration
146+
glob1=(specs/*spec.rb)
147+
glob2=(specs/**/*spec.rb)
148+
all_specs=("${glob1[@]}" "${glob2[@]}")
149+
# This is how we get the first half (double ::)
150+
specs=${all_specs[@]::$((${#all_specs[@]} / 2))}
151+
popd
152+
./gradlew --info --stacktrace -PrunTestsInFIPSMode=true runIntegrationTests -PrubyIntegrationSpecs="$specs"
153+
'
154+
155+
- label: ":lab_coat: Integration Tests - FIPS mode / part 2"
156+
key: "integration-tests-fips-part-2"
157+
agents:
158+
provider: gcp
159+
imageProject: elastic-images-prod
160+
image: family/platform-ingest-logstash-ubuntu-2204
161+
machineType: "n2-standard-4"
162+
diskSizeGb: 64
163+
retry:
164+
automatic:
165+
# dont retry on failure while they are expected
166+
- limit: 0
167+
command: |
168+
set -euo pipefail
169+
170+
docker build -t test-runner-image -f x-pack/distributions/internal/observabilitySRE/docker/Dockerfile .
171+
docker run test-runner-image /bin/bash -c '
172+
pushd qa/integration
173+
glob1=(specs/*spec.rb)
174+
glob2=(specs/**/*spec.rb)
175+
all_specs=("${glob1[@]}" "${glob2[@]}")
176+
# This is how we get the second half (single :)
177+
specs=${all_specs[@]:$((${#all_specs[@]} / 2))}
178+
popd
179+
./gradlew --info --stacktrace -PrunTestsInFIPSMode=true runIntegrationTests -PrubyIntegrationSpecs="$specs"
180+
'
145181
146182
- label: ":lab_coat: Integration Tests / part 1"
147183
key: "integration-tests-part-1"

0 commit comments

Comments
 (0)