Skip to content

Commit a24bf40

Browse files
committed
#369 Restrict Integration test for, Docker
Execute the Docker integration test only if Docker is available.
1 parent 8bf0fee commit a24bf40

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

integration-test/build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,17 @@ tasks.register("integrationTestDocker") {
203203
mustRunAfter(cleanIntegrationTestDocker)
204204

205205
doLast {
206+
try {
207+
if (System.getProperty("os.name") ==~ /Windows.*/) {
208+
'cmd /c "docker --version"'.execute().waitFor()
209+
} else {
210+
'docker --version'.execute().waitFor()
211+
}
212+
} catch (Exception e) {
213+
logger.quiet("Docker is not available - skipping Docker integration tests")
214+
return
215+
}
216+
206217
buildReportsDirectory.mkdirs()
207218
// Compute the image tag exactly as in the CLI module: use branch name tag
208219
String currentBranch = "${'git branch --show-current'.execute().text.trim()}"

0 commit comments

Comments
 (0)