From 64efd9e51373f40563129e25c9aabd9467461b65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 10:58:18 +0000 Subject: [PATCH 1/6] Bump authentication-tokens from 1.4 to 1.53.v1c90fd9191a_b_ Bumps [authentication-tokens](https://github.com/jenkinsci/authentication-tokens-plugin) from 1.4 to 1.53.v1c90fd9191a_b_. - [Release notes](https://github.com/jenkinsci/authentication-tokens-plugin/releases) - [Changelog](https://github.com/jenkinsci/authentication-tokens-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/jenkinsci/authentication-tokens-plugin/commits) --- updated-dependencies: - dependency-name: org.jenkins-ci.plugins:authentication-tokens dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fef7545..c06e32f 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ org.jenkins-ci.plugins authentication-tokens - 1.4 + 1.53.v1c90fd9191a_b_ org.jenkinsci.plugins From b9a93d4524a2162b7ccef02594c9e2bfa84a773c Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sat, 8 Jul 2023 14:02:13 +0000 Subject: [PATCH 2/6] Adapt test to not require docker socket access --- .../docker/commons/tools/DockerToolInstallerTest.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java b/src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java index 7887c91..bb6dc30 100644 --- a/src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java +++ b/src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java @@ -124,9 +124,14 @@ private FilePath downloadDocker(DumbSlave slave, FilePath toolDir, String versio assertThat(baos.toString(), not(containsString(Messages.DockerToolInstaller_downloading_docker_client_(version)))); // Version check: baos.reset(); - assertEquals(0, slave.createLauncher(l).launch().cmds(exe.getRemote(), "version", "--format", "{{.Client.Version}}").quiet(true).stdout(tee).stderr(System.err).join()); - if (!version.equals("latest")) { - assertEquals(version, baos.toString().trim()); + if (slave.createLauncher(l).launch().cmds(exe.getRemote(), "version", "--format", "{{.Client.Version}}").quiet(true).stdout(tee).stderr(tee).join() != 0) { + /* Failure message should mention /var/run/docker.sock */ + assertThat(baos.toString(), containsString("/var/run/docker.sock")); + } else { + /* Successful output should either be `latest` or include the docker version */ + if (!version.equals("latest")) { + assertEquals(version, baos.toString().trim()); + } } return exe; } From c0851c91a2ec330a0e929c1d07ab27b423aef9ea Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sat, 8 Jul 2023 08:06:26 -0600 Subject: [PATCH 3/6] Use parent pom 4.70 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 060284b..285ddbb 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.plugins plugin - 4.68 + 4.70 From 3436a3f931929f4625f3ff6497806c745a15884a Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sat, 8 Jul 2023 08:13:15 -0600 Subject: [PATCH 4/6] Use separate stream for stderr --- .../docker/commons/tools/DockerToolInstallerTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java b/src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java index bb6dc30..bf2201e 100644 --- a/src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java +++ b/src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java @@ -111,6 +111,7 @@ private FilePath downloadDocker(DumbSlave slave, FilePath toolDir, String versio ByteArrayOutputStream baos = new ByteArrayOutputStream(); TeeOutputStream tee = new TeeOutputStream(baos, new PlainTextConsoleOutputStream(System.err)); TaskListener l = new StreamTaskListener(tee); + ByteArrayOutputStream errStream = new ByteArrayOutputStream(); FilePath exe = toolDir.child(version+"/bin/docker"); // Download for first time: @@ -124,9 +125,9 @@ private FilePath downloadDocker(DumbSlave slave, FilePath toolDir, String versio assertThat(baos.toString(), not(containsString(Messages.DockerToolInstaller_downloading_docker_client_(version)))); // Version check: baos.reset(); - if (slave.createLauncher(l).launch().cmds(exe.getRemote(), "version", "--format", "{{.Client.Version}}").quiet(true).stdout(tee).stderr(tee).join() != 0) { + if (slave.createLauncher(l).launch().cmds(exe.getRemote(), "version", "--format", "{{.Client.Version}}").quiet(true).stdout(tee).stderr(errStream).join() != 0) { /* Failure message should mention /var/run/docker.sock */ - assertThat(baos.toString(), containsString("/var/run/docker.sock")); + assertThat(errStream.toString(), containsString("/var/run/docker.sock")); } else { /* Successful output should either be `latest` or include the docker version */ if (!version.equals("latest")) { From 45e1066d4c268c5451a36447f6e739a433d2fee7 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sat, 8 Jul 2023 14:16:19 +0000 Subject: [PATCH 5/6] Use bom 2230.v0cb_4040cde55 Most recent version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 285ddbb..6b35d90 100644 --- a/pom.xml +++ b/pom.xml @@ -156,7 +156,7 @@ io.jenkins.tools.bom bom-2.387.x - 2163.v2d916d90c305 + 2230.v0cb_4040cde55 import pom From ef5777319e6b7f4b5e53106b0eee4e0220ac54fd Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sat, 8 Jul 2023 14:30:49 +0000 Subject: [PATCH 6/6] Use authentication tokens version from bom --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6b35d90..97011b5 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,6 @@ org.jenkins-ci.plugins authentication-tokens - 1.53.v1c90fd9191a_b_ org.jenkinsci.plugins