From 88a0a769c1da45e07fcc3285a27eda63e821ca62 Mon Sep 17 00:00:00 2001 From: Bogdan Vaneev Date: Sun, 30 Jun 2019 22:50:14 +0300 Subject: [PATCH 1/2] Fix docker Signed-off-by: Bogdan Vaneev --- .../soramitsu/devops/docker/DockerPlugin.groovy | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy b/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy index b0eb02b..323ad70 100644 --- a/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy +++ b/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy @@ -192,16 +192,13 @@ class DockerPlugin implements Plugin { -XX:MaxRAMFraction=\${MAX_RAM_FRACTION} -XX:+UseContainerSupport \\ -XX:+PrintFlagsFinal -XshowSettings:vm \${JAVA_OPTIONS}" """ - def customFiles = dockerConfig.files - if (customFiles == null || customFiles.isEmpty()) { - return - } - - // copy files from context dir to dst - customFiles.each { _, dst -> - // remove leading slash from path - def from = dst.replaceAll(/^\//, '') - t.copyFile(from, dst) + if (dockerConfig.files != null && !dockerConfig.files.isEmpty()) { + // copy files from context dir to dst + dockerConfig.files.each { _, dst -> + // remove leading slash from path + def from = dst.replaceAll(/^\//, '') + t.copyFile(from, dst) + } } // copy jar From 5333cd1159f9b5fc2b214a88491b3edd01b7b93a Mon Sep 17 00:00:00 2001 From: Bogdan Vaneev Date: Sun, 30 Jun 2019 22:51:04 +0300 Subject: [PATCH 2/2] Simplify Signed-off-by: Bogdan Vaneev --- .../groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy b/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy index 323ad70..404d017 100644 --- a/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy +++ b/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy @@ -192,7 +192,7 @@ class DockerPlugin implements Plugin { -XX:MaxRAMFraction=\${MAX_RAM_FRACTION} -XX:+UseContainerSupport \\ -XX:+PrintFlagsFinal -XshowSettings:vm \${JAVA_OPTIONS}" """ - if (dockerConfig.files != null && !dockerConfig.files.isEmpty()) { + if (dockerConfig.files != null) { // copy files from context dir to dst dockerConfig.files.each { _, dst -> // remove leading slash from path