diff --git a/src/test/java/org/jenkinsci/plugins/docker/workflow/DockerDSLTest.java b/src/test/java/org/jenkinsci/plugins/docker/workflow/DockerDSLTest.java index 918b00c3d..bd0344d7f 100644 --- a/src/test/java/org/jenkinsci/plugins/docker/workflow/DockerDSLTest.java +++ b/src/test/java/org/jenkinsci/plugins/docker/workflow/DockerDSLTest.java @@ -113,7 +113,7 @@ private static void grep(File dir, String text, String prefix, Set match assumeDocker(); WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "prj"); p.setDefinition(new CpsFlowDefinition( - "def r = docker.image('httpd:2.4.12').inside {\n" + + "def r = docker.image('httpd:2.4.59').inside {\n" + " semaphore 'wait'\n" + " sh 'cat /usr/local/apache2/conf/extra/httpd-userdir.conf'\n" + " 42\n" + @@ -185,7 +185,7 @@ private static void grep(File dir, String text, String prefix, Set match WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "prj"); p.setDefinition(new CpsFlowDefinition( "node {\n" + - " def img = docker.image('httpd:2.4.12')\n" + + " def img = docker.image('httpd:2.4.59')\n" + " img.run().stop()\n" + " img.run('--memory-swap=-1').stop()\n" + " img.withRun {}\n" + @@ -204,7 +204,7 @@ private static void grep(File dir, String text, String prefix, Set match assumeDocker(); WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "prj"); p.setDefinition(new CpsFlowDefinition( - "def r = docker.image('httpd:2.4.12').withRun {c ->\n" + + "def r = docker.image('httpd:2.4.59').withRun {c ->\n" + " semaphore 'wait'\n" + " sh \"docker exec ${c.id} cat /usr/local/apache2/conf/extra/httpd-userdir.conf\"\n" + " 42\n" + @@ -346,7 +346,7 @@ private static void grep(File dir, String text, String prefix, Set match WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "prj"); p.setDefinition(new CpsFlowDefinition( "docker.withTool('default') {\n" + - " docker.image('httpd:2.4.12').withRun {}\n" + + " docker.image('httpd:2.4.59').withRun {}\n" + " sh 'echo PATH=$PATH'\n" + "}", true)); story.j.assertLogContains("PATH=/usr/bin:", story.j.assertBuildStatusSuccess(p.scheduleBuild2(0))); @@ -437,7 +437,7 @@ private static void grep(File dir, String text, String prefix, Set match WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "prj"); p.setDefinition(new CpsFlowDefinition( "node {\n" + - " def img = docker.image('httpd:2.4.12')\n" + + " def img = docker.image('httpd:2.4.59')\n" + " def port = img.withRun('-p 12345:80') { c -> c.port(80) }\n" + " echo \"container running on ${port}\"" + "}", true)); diff --git a/src/test/java/org/jenkinsci/plugins/docker/workflow/WithContainerStepTest.java b/src/test/java/org/jenkinsci/plugins/docker/workflow/WithContainerStepTest.java index a08b98cdf..9c4544f56 100644 --- a/src/test/java/org/jenkinsci/plugins/docker/workflow/WithContainerStepTest.java +++ b/src/test/java/org/jenkinsci/plugins/docker/workflow/WithContainerStepTest.java @@ -111,7 +111,7 @@ public class WithContainerStepTest { WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "prj"); p.setDefinition(new CpsFlowDefinition( "node {\n" + - " withDockerContainer('httpd:2.4.12') {\n" + + " withDockerContainer('httpd:2.4.59') {\n" + " sh 'cp /usr/local/apache2/conf/extra/httpd-userdir.conf .; ls -la'\n" + " }\n" + " sh 'ls -la; cat *.conf'\n" + @@ -135,7 +135,7 @@ public class WithContainerStepTest { p.setDefinition(new CpsFlowDefinition( "node {\n" + " timeout(time: 20, unit: 'SECONDS') {\n" + - " withDockerContainer('httpd:2.4.12') {\n" + + " withDockerContainer('httpd:2.4.59') {\n" + " sh 'sleep infinity'\n" + " }\n" + " }\n" + @@ -215,7 +215,7 @@ public class WithContainerStepTest { WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "prj"); p.setDefinition(new CpsFlowDefinition( "node {\n" + - " withDockerContainer('httpd:2.4.12') {\n" + + " withDockerContainer('httpd:2.4.59') {\n" + " semaphore 'wait'\n" + " sh 'cat /usr/local/apache2/conf/extra/httpd-userdir.conf'\n" + " }\n" + @@ -481,7 +481,7 @@ private static final class Execution extends SynchronousNonBlockingStepExecution p.setDefinition(new CpsFlowDefinition( "node('dockerized') {\n" + " sh 'which docker && docker version'\n" + - " withDockerContainer('httpd:2.4.12') {\n" + + " withDockerContainer('httpd:2.4.59') {\n" + " sh 'cp /usr/local/apache2/conf/extra/httpd-userdir.conf .; ls -la'\n" + " }\n" + " sh 'ls -la; cat *.conf'\n" + diff --git a/src/test/java/org/jenkinsci/plugins/docker/workflow/client/WindowsDockerClientTest.java b/src/test/java/org/jenkinsci/plugins/docker/workflow/client/WindowsDockerClientTest.java index c390e0735..888c2629f 100644 --- a/src/test/java/org/jenkinsci/plugins/docker/workflow/client/WindowsDockerClientTest.java +++ b/src/test/java/org/jenkinsci/plugins/docker/workflow/client/WindowsDockerClientTest.java @@ -32,7 +32,7 @@ public void test_run() throws IOException, InterruptedException { EnvVars launchEnv = DockerTestUtil.newDockerLaunchEnv(); String containerId = dockerClient.run( launchEnv, - "learn/tutorial", + "busybox", null, null, Collections.emptyMap(), @@ -43,7 +43,7 @@ public void test_run() throws IOException, InterruptedException { Assert.assertEquals(64, containerId.length()); ContainerRecord containerRecord = dockerClient.getContainerRecord(launchEnv, containerId); - Assert.assertEquals(dockerClient.inspect(launchEnv, "learn/tutorial", ".Id"), containerRecord.getImageId()); + Assert.assertEquals(dockerClient.inspect(launchEnv, "busybox", ".Id"), containerRecord.getImageId()); Assert.assertTrue(containerRecord.getContainerName().length() > 0); Assert.assertTrue(containerRecord.getHost().length() > 0); Assert.assertTrue(containerRecord.getCreated() > 1000000000000L); diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDocker.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDocker.groovy index c23a6bdd0..2f0c436e2 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDocker.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDocker.groovy @@ -25,7 +25,7 @@ pipeline { agent { docker { - image "httpd:2.4.12" + image "httpd:2.4.59" args "-v /tmp:/tmp" } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDocker.json b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDocker.json index ae16c4168..8799b9938 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDocker.json +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDocker.json @@ -34,7 +34,7 @@ "key": "image", "value": { "isLiteral": true, - "value": "httpd:2.4.12" + "value": "httpd:2.4.59" } }, { diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerContainerPerStage.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerContainerPerStage.groovy index 1bd05c8a2..fc24df923 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerContainerPerStage.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerContainerPerStage.groovy @@ -25,7 +25,7 @@ pipeline { agent { docker { - image "httpd:2.4.12" + image "httpd:2.4.59" label "docker" } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerDontReuseNode.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerDontReuseNode.groovy index b9d62fc85..cffc96bb4 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerDontReuseNode.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerDontReuseNode.groovy @@ -40,7 +40,7 @@ pipeline { agent { docker { label "other-docker" - image "httpd:2.4.12" + image "httpd:2.4.59" reuseNode true } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerEnvSpecLabel.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerEnvSpecLabel.groovy index d22d761d4..f384ac83a 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerEnvSpecLabel.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerEnvSpecLabel.groovy @@ -30,7 +30,7 @@ pipeline { agent { docker { label "thisspec" - image "httpd:2.4.12" + image "httpd:2.4.59" args "-v /tmp:/tmp" } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerEnvTest.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerEnvTest.groovy index 395b3fa27..146b3a423 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerEnvTest.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerEnvTest.groovy @@ -29,7 +29,7 @@ pipeline { agent { docker { - image "httpd:2.4.12" + image "httpd:2.4.59" args "-v /tmp:/tmp" } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerReuseNode.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerReuseNode.groovy index 5459fe656..c473457fc 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerReuseNode.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerReuseNode.groovy @@ -37,7 +37,7 @@ pipeline { stage("bar") { agent { docker { - image "httpd:2.4.12" + image "httpd:2.4.59" reuseNode true } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithCreds.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithCreds.groovy index 15b78483a..a09dd5ddd 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithCreds.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithCreds.groovy @@ -27,7 +27,7 @@ pipeline { docker { alwaysPull true registryCredentialsId "dockerhub" - image "jtaboada/httpd:2.4.12" + image "jtaboada/httpd:2.4.59" args "-v /tmp:/tmp" } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithEmptyDockerArgs.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithEmptyDockerArgs.groovy index 672b3b8db..48c3709b8 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithEmptyDockerArgs.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithEmptyDockerArgs.groovy @@ -25,7 +25,7 @@ pipeline { agent { docker { - image "httpd:2.4.12" + image "httpd:2.4.59" args "" } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithNullDockerArgs.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithNullDockerArgs.groovy index c3ec01638..303b91e2a 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithNullDockerArgs.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithNullDockerArgs.groovy @@ -25,7 +25,7 @@ pipeline { agent { docker { - image "httpd:2.4.12" + image "httpd:2.4.59" args null } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithRegistryNoCreds.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithRegistryNoCreds.groovy index 864d62bbd..1b4c8b47a 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithRegistryNoCreds.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithRegistryNoCreds.groovy @@ -26,7 +26,7 @@ pipeline { agent { docker { alwaysPull true - image "httpd:2.4.12" + image "httpd:2.4.59" registryUrl "https://index.docker.io/v2/" args "-v /tmp:/tmp" } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithoutContainerPerStage.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithoutContainerPerStage.groovy index 4af0c97c8..d1f2caf9b 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithoutContainerPerStage.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentDockerWithoutContainerPerStage.groovy @@ -25,7 +25,7 @@ pipeline { agent { docker { - image "httpd:2.4.12" + image "httpd:2.4.59" label "docker" } } diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentInStageAutoCheckout.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentInStageAutoCheckout.groovy index c62897ef4..6840463c8 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentInStageAutoCheckout.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/agentInStageAutoCheckout.groovy @@ -37,7 +37,7 @@ pipeline { stage("bar") { agent { docker { - image "httpd:2.4.12" + image "httpd:2.4.59" reuseNode true } } @@ -50,7 +50,7 @@ pipeline { stage("new node - docker") { agent { docker { - image "httpd:2.4.12" + image "httpd:2.4.59" } } steps { diff --git a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/nonExistentDockerImage.groovy b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/nonExistentDockerImage.groovy index 869780756..f98ac8b08 100644 --- a/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/nonExistentDockerImage.groovy +++ b/src/test/resources/org/jenkinsci/plugins/docker/workflow/declarative/nonExistentDockerImage.groovy @@ -25,7 +25,7 @@ pipeline { agent { docker { - image "httpdIDontExist:2.4.12" + image "httpdIDontExist:2.4.59" args "-v /tmp:/tmp" } }