Skip to content

Commit 6ec63f8

Browse files
authored
Prune images between module checks (#2376)
1 parent 6f7b17a commit 6ec63f8

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ jobs:
3737
inputs:
3838
gradleWrapperFile: 'gradlew'
3939
jdkVersionOption: '1.11'
40-
options: '--continue -x testcontainers:check -x jdbc-test:check'
40+
options: '--continue -x testcontainers:check -x jdbc-test:check -PpostCheckCommand="docker image prune -af"'
4141
tasks: 'check'
4242
publishJUnitResults: true
4343
testResultsFiles: '**/TEST-*.xml'
44-
45-

build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ subprojects {
7171
// Ensure that Javadoc generation is always tested
7272
check.dependsOn(javadoc)
7373

74+
def postCheckCommand = properties["postCheckCommand"]
75+
if (postCheckCommand) {
76+
check.finalizedBy(tasks.create("postCheckExec", Exec) {
77+
if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
78+
commandLine('cmd', '/c', postCheckCommand)
79+
} else {
80+
commandLine('sh', '-c', postCheckCommand)
81+
}
82+
})
83+
}
84+
7485
javadoc {
7586
dependsOn delombok
7687
source = delombok.outputs

0 commit comments

Comments
 (0)