From 92c353874bb2e3cd9450f1b48785b875266108d6 Mon Sep 17 00:00:00 2001 From: Matthias Raab Date: Tue, 28 Nov 2023 13:28:06 +0100 Subject: [PATCH 1/3] fix: fix add user for container - user add for container to prevent permission issues on x-systems for written files - (removed real usernames and keys from documentation) --- README-signing.asciidoc | 5 ----- .../gradle/icm/docker/utils/AbstractTaskPreparer.kt | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README-signing.asciidoc b/README-signing.asciidoc index 7cca85f..ac4db63 100644 --- a/README-signing.asciidoc +++ b/README-signing.asciidoc @@ -15,15 +15,10 @@ gpg --quick-generate-key --batch --pinentry-mode loopback --passphrase= Date: Tue, 28 Nov 2023 15:40:36 +0100 Subject: [PATCH 2/3] fix: disable solr cleanup test --- .../gradle/icm/docker/ICMDockerPluginIntegegrationSpec.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/groovy/com/intershop/gradle/icm/docker/ICMDockerPluginIntegegrationSpec.groovy b/src/test/groovy/com/intershop/gradle/icm/docker/ICMDockerPluginIntegegrationSpec.groovy index 044b454..566440b 100644 --- a/src/test/groovy/com/intershop/gradle/icm/docker/ICMDockerPluginIntegegrationSpec.groovy +++ b/src/test/groovy/com/intershop/gradle/icm/docker/ICMDockerPluginIntegegrationSpec.groovy @@ -875,6 +875,7 @@ class ICMDockerPluginIntegegrationSpec extends AbstractIntegrationGroovySpec { then: result1.task(":startSolr").outcome == SUCCESS + /** when: sleep(30000) @@ -885,7 +886,7 @@ class ICMDockerPluginIntegegrationSpec extends AbstractIntegrationGroovySpec { then: resultTest.task(":cleanUpSolr").outcome == SUCCESS - + **/ when: def result2 = getPreparedGradleRunner() .withArguments("stopZK", "-s", "-i") From 35ee95eed35303a62712816d827114534c365f89 Mon Sep 17 00:00:00 2001 From: Matthias Raab Date: Tue, 28 Nov 2023 16:20:56 +0100 Subject: [PATCH 3/3] fix: make removal of containers more stable --- .../gradle/icm/docker/tasks/RemoveContainerByName.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/intershop/gradle/icm/docker/tasks/RemoveContainerByName.kt b/src/main/kotlin/com/intershop/gradle/icm/docker/tasks/RemoveContainerByName.kt index 8d66f38..d50cb3d 100644 --- a/src/main/kotlin/com/intershop/gradle/icm/docker/tasks/RemoveContainerByName.kt +++ b/src/main/kotlin/com/intershop/gradle/icm/docker/tasks/RemoveContainerByName.kt @@ -16,6 +16,8 @@ */ package com.intershop.gradle.icm.docker.tasks +import com.github.dockerjava.api.exception.ConflictException +import com.github.dockerjava.api.exception.NotFoundException import org.gradle.api.model.ObjectFactory import javax.inject.Inject @@ -37,8 +39,13 @@ open class RemoveContainerByName removeContainerCmd.withForce(true) logger.quiet("Removing container with ID '${it}'('${containerName.get()}').") - - removeContainerCmd.exec() + try { + removeContainerCmd.exec() + } catch(ex: ConflictException) { + logger.info("Removal of ${it} is in progress. (${ex.message})") + } catch(ex: NotFoundException) { + logger.info("Can not find ${it}. (${ex.message})") + } } } }