Skip to content

Commit

Permalink
Gradle clean failing after a failed gradle check, folders created by …
Browse files Browse the repository at this point in the history
…Docker under 'root' user (#1726) (#1775)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta authored Dec 23, 2021
1 parent 85c7a1a commit d19cbc0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions distribution/docker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -262,3 +266,7 @@ subprojects { Project subProject ->
}
}
}

tasks.named("composeUp").configure {
dependsOn preProcessFixture
}
10 changes: 9 additions & 1 deletion qa/remote-clusters/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -86,3 +90,7 @@ tasks.register("integTest", Test) {
}

tasks.named("check").configure { dependsOn "integTest" }

tasks.named("composeUp").configure {
dependsOn preProcessFixture
}

0 comments on commit d19cbc0

Please sign in to comment.