From ab0c35368f061aa3862bdbdf145e08571d18bb43 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 24 Feb 2020 14:19:35 +0100 Subject: [PATCH] Prune images between module checks (#2376) --- azure-pipelines.yml | 4 +--- build.gradle | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4b060c5fcea..68330550ee1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -37,9 +37,7 @@ jobs: inputs: gradleWrapperFile: 'gradlew' jdkVersionOption: '1.11' - options: '--continue -x testcontainers:check -x jdbc-test:check' + options: '--continue -x testcontainers:check -x jdbc-test:check -PpostCheckCommand="docker image prune -af"' tasks: 'check' publishJUnitResults: true testResultsFiles: '**/TEST-*.xml' - - diff --git a/build.gradle b/build.gradle index bac06d64052..c8b2267a049 100644 --- a/build.gradle +++ b/build.gradle @@ -71,6 +71,17 @@ subprojects { // Ensure that Javadoc generation is always tested check.dependsOn(javadoc) + def postCheckCommand = properties["postCheckCommand"] + if (postCheckCommand) { + check.finalizedBy(tasks.create("postCheckExec", Exec) { + if (org.gradle.internal.os.OperatingSystem.current().isWindows()) { + commandLine('cmd', '/c', postCheckCommand) + } else { + commandLine('sh', '-c', postCheckCommand) + } + }) + } + javadoc { dependsOn delombok source = delombok.outputs