Skip to content

Commit 85ef423

Browse files
authored
Breakup release tests in PR (#120692) (#120729)
* Breakup release tests in PR * fix test release task dependencies (cherry picked from commit 1484f78) # Conflicts: # build.gradle
1 parent fd79db6 commit 85ef423

File tree

3 files changed

+63
-17
lines changed

3 files changed

+63
-17
lines changed
Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
config:
22
allow-labels: test-release
33
steps:
4-
- label: release-tests
5-
command: .buildkite/scripts/release-tests.sh
6-
timeout_in_minutes: 300
7-
agents:
8-
provider: gcp
9-
image: family/elasticsearch-ubuntu-2004
10-
diskSizeGb: 350
11-
machineType: custom-32-98304
4+
- group: release-tests
5+
steps:
6+
- label: "{{matrix.CHECK_TASK}} / release-tests"
7+
key: "packaging-tests-unix"
8+
command: .buildkite/scripts/release-tests.sh {{matrix.CHECK_TASK}}
9+
timeout_in_minutes: 120
10+
matrix:
11+
setup:
12+
CHECK_TASK:
13+
- checkPart1
14+
- checkPart2
15+
- checkPart3
16+
- checkPart4
17+
- checkPart5
18+
agents:
19+
provider: gcp
20+
image: family/elasticsearch-ubuntu-2004
21+
diskSizeGb: 350
22+
machineType: custom-32-98304

.buildkite/scripts/release-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ curl --fail -o "${ML_IVY_REPO}/maven/org/elasticsearch/ml/ml-cpp/${ES_VERSION}/m
2020
curl --fail -o "${ML_IVY_REPO}/maven/org/elasticsearch/ml/ml-cpp/${ES_VERSION}/ml-cpp-${ES_VERSION}.zip" https://artifacts-snapshot.elastic.co/ml-cpp/${ES_VERSION}-SNAPSHOT/downloads/ml-cpp/ml-cpp-${ES_VERSION}-SNAPSHOT.zip
2121

2222
.ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dbuild.snapshot=false -Dbuild.ml_cpp.repo=file://${ML_IVY_REPO} \
23-
-Dtests.jvm.argline=-Dbuild.snapshot=false -Dlicense.key=${WORKSPACE}/x-pack/license-tools/src/test/resources/public.key -Dbuild.id=deadbeef assemble functionalTests
23+
-Dtests.jvm.argline=-Dbuild.snapshot=false -Dlicense.key=${WORKSPACE}/x-pack/license-tools/src/test/resources/public.key -Dbuild.id=deadbeef ${@:-functionalTests}

build.gradle

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -300,22 +300,57 @@ allprojects {
300300
}
301301
}
302302

303+
ext.withReleaseBuild = { Closure config ->
304+
if(buildParams.snapshotBuild == false) {
305+
config.call()
306+
}
307+
}
308+
303309
plugins.withId('lifecycle-base') {
304310
if (project.path.startsWith(":x-pack:")) {
305311
if (project.path.contains("security") || project.path.contains(":ml")) {
306-
tasks.register('checkPart4') { dependsOn 'check' }
307-
} else if (project.path == ":x-pack:plugin" || project.path.contains("ql") || project.path.contains("smoke-test")) {
308-
tasks.register('checkPart3') { dependsOn 'check' }
312+
tasks.register('checkPart4') {
313+
dependsOn 'check'
314+
withReleaseBuild {
315+
dependsOn 'assemble'
316+
}
317+
}
318+
} else if (project.path == ":x-pack:plugin" || project.path.contains("ql") || project.path.contains("smoke-test")) {
319+
tasks.register('checkPart3') {
320+
dependsOn 'check'
321+
withReleaseBuild {
322+
dependsOn 'assemble'
323+
}
324+
}
309325
} else if (project.path.contains("multi-node")) {
310-
tasks.register('checkPart5') { dependsOn 'check' }
326+
tasks.register('checkPart5') {
327+
dependsOn 'check'
328+
withReleaseBuild {
329+
dependsOn 'assemble'
330+
}
331+
}
311332
} else {
312-
tasks.register('checkPart2') { dependsOn 'check' }
333+
tasks.register('checkPart2') {
334+
dependsOn 'check'
335+
withReleaseBuild {
336+
dependsOn 'assemble'
337+
}
338+
}
313339
}
314340
} else {
315-
tasks.register('checkPart1') { dependsOn 'check' }
341+
tasks.register('checkPart1') {
342+
dependsOn 'check'
343+
withReleaseBuild {
344+
dependsOn 'assemble'
345+
}
346+
}
347+
}
348+
tasks.register('functionalTests') {
349+
dependsOn 'check'
350+
withReleaseBuild {
351+
dependsOn 'assemble'
352+
}
316353
}
317-
318-
tasks.register('functionalTests') { dependsOn 'check' }
319354
}
320355

321356
/*

0 commit comments

Comments
 (0)