Gradle clean failing after a failed gradle check, folders created by Docker under 'root' user (#1726)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
This commit is contained in:
Andriy Redko 2021-12-18 10:57:04 -05:00 committed by GitHub
parent 3ed3fca4ae
commit 546eacc3dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -155,6 +155,10 @@ opensearch_distributions {
tasks.named("preProcessFixture").configure {
dependsOn opensearch_distributions.docker
// always run the task, otherwise the folders won't be created
outputs.upToDateWhen {
false
}
doLast {
// tests expect to have an empty repo
project.delete(
@ -262,3 +266,7 @@ subprojects { Project subProject ->
}
}
}
tasks.named("composeUp").configure {
dependsOn preProcessFixture
}

View File

@ -51,8 +51,12 @@ opensearch_distributions {
}
}
preProcessFixture {
tasks.named("preProcessFixture").configure {
dependsOn opensearch_distributions.docker
// always run the task, otherwise the folders won't be created
outputs.upToDateWhen {
false
}
doLast {
// tests expect to have an empty repo
project.delete(
@ -86,3 +90,7 @@ tasks.register("integTest", Test) {
}
tasks.named("check").configure { dependsOn "integTest" }
tasks.named("composeUp").configure {
dependsOn preProcessFixture
}