Skip to content

Commit 1484f78

Browse files
authored
Breakup release tests in PR (#120692)
* Breakup release tests in PR * fix test release task dependencies
1 parent 609705a commit 1484f78

File tree

3 files changed

+62
-16
lines changed

3 files changed

+62
-16
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: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,22 +293,57 @@ allprojects {
293293
}
294294
}
295295

296+
ext.withReleaseBuild = { Closure config ->
297+
if(buildParams.snapshotBuild == false) {
298+
config.call()
299+
}
300+
}
301+
296302
plugins.withId('lifecycle-base') {
297303
if (project.path.startsWith(":x-pack:")) {
298304
if (project.path.contains("security") || project.path.contains(":ml")) {
299-
tasks.register('checkPart4') { dependsOn 'check' }
305+
tasks.register('checkPart4') {
306+
dependsOn 'check'
307+
withReleaseBuild {
308+
dependsOn 'assemble'
309+
}
310+
}
300311
} else if (project.path == ":x-pack:plugin" || project.path.contains("ql") || project.path.contains("smoke-test")) {
301-
tasks.register('checkPart3') { dependsOn 'check' }
312+
tasks.register('checkPart3') {
313+
dependsOn 'check'
314+
withReleaseBuild {
315+
dependsOn 'assemble'
316+
}
317+
}
302318
} else if (project.path.contains("multi-node")) {
303-
tasks.register('checkPart5') { dependsOn 'check' }
319+
tasks.register('checkPart5') {
320+
dependsOn 'check'
321+
withReleaseBuild {
322+
dependsOn 'assemble'
323+
}
324+
}
304325
} else {
305-
tasks.register('checkPart2') { dependsOn 'check' }
326+
tasks.register('checkPart2') {
327+
dependsOn 'check'
328+
withReleaseBuild {
329+
dependsOn 'assemble'
330+
}
331+
}
306332
}
307333
} else {
308-
tasks.register('checkPart1') { dependsOn 'check' }
334+
tasks.register('checkPart1') {
335+
dependsOn 'check'
336+
withReleaseBuild {
337+
dependsOn 'assemble'
338+
}
339+
}
340+
}
341+
tasks.register('functionalTests') {
342+
dependsOn 'check'
343+
withReleaseBuild {
344+
dependsOn 'assemble'
345+
}
309346
}
310-
311-
tasks.register('functionalTests') { dependsOn 'check' }
312347
}
313348

314349
/*

0 commit comments

Comments
 (0)