Skip to content

Commit

Permalink
Breakup release tests in PR (elastic#120692)
Browse files Browse the repository at this point in the history
* Breakup release tests in PR
* fix test release task dependencies
  • Loading branch information
breskeby authored Jan 23, 2025
1 parent 609705a commit 1484f78
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 16 deletions.
27 changes: 19 additions & 8 deletions .buildkite/pipelines/pull-request/release-tests.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
config:
allow-labels: test-release
steps:
- label: release-tests
command: .buildkite/scripts/release-tests.sh
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
diskSizeGb: 350
machineType: custom-32-98304
- group: release-tests
steps:
- label: "{{matrix.CHECK_TASK}} / release-tests"
key: "packaging-tests-unix"
command: .buildkite/scripts/release-tests.sh {{matrix.CHECK_TASK}}
timeout_in_minutes: 120
matrix:
setup:
CHECK_TASK:
- checkPart1
- checkPart2
- checkPart3
- checkPart4
- checkPart5
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
diskSizeGb: 350
machineType: custom-32-98304
2 changes: 1 addition & 1 deletion .buildkite/scripts/release-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ curl --fail -o "${ML_IVY_REPO}/maven/org/elasticsearch/ml/ml-cpp/${ES_VERSION}/m
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

.ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dbuild.snapshot=false -Dbuild.ml_cpp.repo=file://${ML_IVY_REPO} \
-Dtests.jvm.argline=-Dbuild.snapshot=false -Dlicense.key=${WORKSPACE}/x-pack/license-tools/src/test/resources/public.key -Dbuild.id=deadbeef assemble functionalTests
-Dtests.jvm.argline=-Dbuild.snapshot=false -Dlicense.key=${WORKSPACE}/x-pack/license-tools/src/test/resources/public.key -Dbuild.id=deadbeef ${@:-functionalTests}
49 changes: 42 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -293,22 +293,57 @@ allprojects {
}
}

ext.withReleaseBuild = { Closure config ->
if(buildParams.snapshotBuild == false) {
config.call()
}
}

plugins.withId('lifecycle-base') {
if (project.path.startsWith(":x-pack:")) {
if (project.path.contains("security") || project.path.contains(":ml")) {
tasks.register('checkPart4') { dependsOn 'check' }
tasks.register('checkPart4') {
dependsOn 'check'
withReleaseBuild {
dependsOn 'assemble'
}
}
} else if (project.path == ":x-pack:plugin" || project.path.contains("ql") || project.path.contains("smoke-test")) {
tasks.register('checkPart3') { dependsOn 'check' }
tasks.register('checkPart3') {
dependsOn 'check'
withReleaseBuild {
dependsOn 'assemble'
}
}
} else if (project.path.contains("multi-node")) {
tasks.register('checkPart5') { dependsOn 'check' }
tasks.register('checkPart5') {
dependsOn 'check'
withReleaseBuild {
dependsOn 'assemble'
}
}
} else {
tasks.register('checkPart2') { dependsOn 'check' }
tasks.register('checkPart2') {
dependsOn 'check'
withReleaseBuild {
dependsOn 'assemble'
}
}
}
} else {
tasks.register('checkPart1') { dependsOn 'check' }
tasks.register('checkPart1') {
dependsOn 'check'
withReleaseBuild {
dependsOn 'assemble'
}
}
}
tasks.register('functionalTests') {
dependsOn 'check'
withReleaseBuild {
dependsOn 'assemble'
}
}

tasks.register('functionalTests') { dependsOn 'check' }
}

/*
Expand Down

0 comments on commit 1484f78

Please sign in to comment.