From 22903d9bc5cefe05b4c6975196d36278dd1dae22 Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Thu, 30 Jan 2020 15:23:00 -0800 Subject: [PATCH] Disable build cache for packaging tests Signed-off-by: Mark Vieira --- .../java/org/elasticsearch/gradle/test/DistroTestPlugin.java | 2 ++ distribution/docker/build.gradle | 1 + 2 files changed, 3 insertions(+) diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/test/DistroTestPlugin.java b/buildSrc/src/main/java/org/elasticsearch/gradle/test/DistroTestPlugin.java index ab86ddf800185..23be7c41425f6 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/test/DistroTestPlugin.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/test/DistroTestPlugin.java @@ -46,6 +46,7 @@ import org.gradle.api.plugins.ExtraPropertiesExtension; import org.gradle.api.plugins.JavaBasePlugin; import org.gradle.api.provider.Provider; +import org.gradle.api.specs.Specs; import org.gradle.api.tasks.Copy; import org.gradle.api.tasks.TaskInputs; import org.gradle.api.tasks.TaskProvider; @@ -325,6 +326,7 @@ private static TaskProvider configureVMWrapperTask( private static TaskProvider configureDistroTest(Project project, ElasticsearchDistribution distribution) { return project.getTasks().register(destructiveDistroTestTaskName(distribution), Test.class, t -> { + t.getOutputs().doNotCacheIf("Build cache is disabled for packaging tests", Specs.satisfyAll()); t.setMaxParallelForks(1); t.setWorkingDir(project.getProjectDir()); t.systemProperty(DISTRIBUTION_SYSPROP, distribution.toString()); diff --git a/distribution/docker/build.gradle b/distribution/docker/build.gradle index 9ef1cc3958451..f9d12ce242da8 100644 --- a/distribution/docker/build.gradle +++ b/distribution/docker/build.gradle @@ -137,6 +137,7 @@ processTestResources { } task integTest(type: Test) { + outputs.doNotCacheIf('Build cache is disabled for Docker tests') { true } maxParallelForks = '1' include '**/*IT.class' // don't add the tasks to build the docker images if we have no way of testing them