Skip to content

Commit c3e15ac

Browse files
authored
Breakup release tests in PR (elastic#120692) (elastic#120728)
* Breakup release tests in PR * fix test release task dependencies (cherry picked from commit 1484f78) # Conflicts: # build.gradle
1 parent b108530 commit c3e15ac

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
@@ -296,22 +296,57 @@ allprojects {
296296
}
297297
}
298298

299+
ext.withReleaseBuild = { Closure config ->
300+
if(buildParams.snapshotBuild == false) {
301+
config.call()
302+
}
303+
}
304+
299305
plugins.withId('lifecycle-base') {
300306
if (project.path.startsWith(":x-pack:")) {
301307
if (project.path.contains("security") || project.path.contains(":ml")) {
302-
tasks.register('checkPart4') { dependsOn 'check' }
303-
} else if (project.path == ":x-pack:plugin" || project.path.contains("ql") || project.path.contains("smoke-test")) {
304-
tasks.register('checkPart3') { dependsOn 'check' }
308+
tasks.register('checkPart4') {
309+
dependsOn 'check'
310+
withReleaseBuild {
311+
dependsOn 'assemble'
312+
}
313+
}
314+
} else if (project.path == ":x-pack:plugin" || project.path.contains("ql") || project.path.contains("smoke-test")) {
315+
tasks.register('checkPart3') {
316+
dependsOn 'check'
317+
withReleaseBuild {
318+
dependsOn 'assemble'
319+
}
320+
}
305321
} else if (project.path.contains("multi-node")) {
306-
tasks.register('checkPart5') { dependsOn 'check' }
322+
tasks.register('checkPart5') {
323+
dependsOn 'check'
324+
withReleaseBuild {
325+
dependsOn 'assemble'
326+
}
327+
}
307328
} else {
308-
tasks.register('checkPart2') { dependsOn 'check' }
329+
tasks.register('checkPart2') {
330+
dependsOn 'check'
331+
withReleaseBuild {
332+
dependsOn 'assemble'
333+
}
334+
}
309335
}
310336
} else {
311-
tasks.register('checkPart1') { dependsOn 'check' }
337+
tasks.register('checkPart1') {
338+
dependsOn 'check'
339+
withReleaseBuild {
340+
dependsOn 'assemble'
341+
}
342+
}
343+
}
344+
tasks.register('functionalTests') {
345+
dependsOn 'check'
346+
withReleaseBuild {
347+
dependsOn 'assemble'
348+
}
312349
}
313-
314-
tasks.register('functionalTests') { dependsOn 'check' }
315350
}
316351

317352
/*

0 commit comments

Comments
 (0)