Hi guys, I'm trying to use Docker cloud and I have 2 questions:
1) How can I debug the spawned docker agent container? I've found that by setting the "Docker Command" field in "Docker Agent Templates" > "Container Settings" I can have the container stopped but not removed. FTR I've put in this field: "docker run -v /var/run/docker.sock:/var/run/docker.sock xwiki/xwiki-jenkins-slave" However, what's strange is that I see in the job logs that the Jenkins workspace is located in /root/workspace (/root being the home dir of the root user), but when I start the stopped container with "docker start", there's nothing in /root Is there some volume binding happening? I was also expecting "docker start" to restart any volume binding. 2) In my logs, I can see that I've set JAVA_HOME properly but when maven installs and starts it says it's not set: ➡ JAVA_HOME: /home/hudsonagent/java8[Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Using Maven tool: Maven[Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Using Maven options: -Xmx2048m -Xms512m[Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Artifact archiving: false[Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Dependencies fingerprinting: false[Pipeline] withMaven <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>[withMaven] Options: [org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.DependenciesFingerprintPublisher[disabled=true, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}]] [withMaven] Available options: [withMaven] using JDK installation provided by the build agent Unpacking https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip to /root/tools/hudson.tasks.Maven_MavenInstallation/Maven on Jenkins SSH Slave-000bzx6dkvokq on docker [withMaven] using Maven installation 'Maven'[Pipeline] { <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>[Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Using Maven goals: clean verify[Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Using Maven profiles: docker,integration-tests [Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Using Maven properties: [Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Using timeout: 240[Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Java version used:[Pipeline] sh <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>+ java -version Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/root/workspace/VincentDockerTest/master@tmp/withMavenf241505a/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/root/workspace/VincentDockerTest/master@tmp/withMavenf241505a" openjdk version "1.8.0_202" OpenJDK Runtime Environment Corretto-8.202.08.2 (build 1.8.0_202-b08) OpenJDK 64-Bit Server VM Corretto-8.202.08.2 (build 25.202-b08, mixed mode)[Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Current user:[Pipeline] sh <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#> + whoami root[Pipeline] timeout <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>Timeout set to expire in 4 hr 0 min[Pipeline] { <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>[Pipeline] echo <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>➡ Using POM file: pom.xml[Pipeline] sh <https://ci.xwiki.org/view/All/job/VincentDockerTest/43/console#>+ mvn -f pom.xml clean verify -Pdocker,integration-tests --projects org.xwiki.platform:xwiki-platform-menu-test-docker -Dmaven.test.failure.ignore ----- withMaven Wrapper script ----- The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE[Pipeline] }[Pipeline] // timeout[Pipeline] }[Pipeline] // withMaven Any idea? Thanks -Vincent -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e30589de-9d6c-44de-a7d0-6fe6b4f07181%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.