all() {
/**
* Gets minimal required Java version.
*
- * @return Minimal Java version required on the master and agent side.
+ * @return Minimal Java version required on the controller and agent side.
* @since TODO
*
*/
diff --git a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
index a282a1b8..061925f7 100644
--- a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
+++ b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
@@ -661,7 +661,7 @@ private void startAgent(SlaveComputer computer, final TaskListener listener, Str
private void expandChannelBufferSize(Session session, TaskListener listener) {
// see hudson.remoting.Channel.PIPE_WINDOW_SIZE for the discussion of why 1MB is in the right ball park
- // but this particular session is where all the master/agent communication will happen, so
+ // but this particular session is where all the controller/agent communication will happen, so
// it's worth using a bigger buffer to really better utilize bandwidth even when the latency is even larger
// (and since we are draining this pipe very rapidly, it's unlikely that we'll actually accumulate this much data)
int sz = 4;
diff --git a/src/main/resources/hudson/plugins/sshslaves/SSHLauncher/help.properties b/src/main/resources/hudson/plugins/sshslaves/SSHLauncher/help.properties
index aea3739c..44420a0a 100644
--- a/src/main/resources/hudson/plugins/sshslaves/SSHLauncher/help.properties
+++ b/src/main/resources/hudson/plugins/sshslaves/SSHLauncher/help.properties
@@ -21,5 +21,5 @@
# THE SOFTWARE.
blurb=Starts an agent by sending commands over a secure SSH connection. \
- The agent needs to be reachable from the master, and you will have to supply an \
+ The agent needs to be reachable from the Jenkins controller, and you will have to supply an \
account that can log in on the target machine. No root privileges are required.
diff --git a/src/main/resources/hudson/plugins/sshslaves/SSHLauncher/help_de.properties b/src/main/resources/hudson/plugins/sshslaves/SSHLauncher/help_de.properties
index 7c9a56ef..3ca66d2e 100644
--- a/src/main/resources/hudson/plugins/sshslaves/SSHLauncher/help_de.properties
+++ b/src/main/resources/hudson/plugins/sshslaves/SSHLauncher/help_de.properties
@@ -22,6 +22,6 @@
blurb=Startet einen Agent durch Kommandos, die \u00FCber eine gesicherte SSH-Verbindung \
gesendet werden. \
- Der Agent muss dazu vom Master aus erreichbar sein, und Sie m\u00FCssen einen \
+ Der Agent muss dazu vom Controller aus erreichbar sein, und Sie m\u00FCssen einen \
Benutzeraccount mit Login-Rechten auf dem Agent angeben. \
Root-Rechte sind f\u00FCr diesen Account nicht erforderlich.
diff --git a/src/main/resources/hudson/plugins/sshslaves/verifiers/KnownHostsFileKeyVerificationStrategy/help.html b/src/main/resources/hudson/plugins/sshslaves/verifiers/KnownHostsFileKeyVerificationStrategy/help.html
index 86ec8c73..2a7a7d8e 100644
--- a/src/main/resources/hudson/plugins/sshslaves/verifiers/KnownHostsFileKeyVerificationStrategy/help.html
+++ b/src/main/resources/hudson/plugins/sshslaves/verifiers/KnownHostsFileKeyVerificationStrategy/help.html
@@ -1,2 +1,2 @@
Checks the known_hosts file (~/.ssh/known_hosts) for the user Jenkins is executing under, to see if an entry exists that matches the current connection.
-This method does not make any updates to the Known Hosts file, instead using the file as a read-only source and expecting someone with suitable access to the appropriate user account on the Jenkins master to update the file as required, potentially using the ssh hostname command to initiate a connection and update the file appropriately.
+This method does not make any updates to the Known Hosts file, instead using the file as a read-only source and expecting someone with suitable access to the appropriate user account on the Jenkins controller to update the file as required, potentially using the ssh hostname command to initiate a connection and update the file appropriately.
From 5648f3e1fb4956eedab827ee606e564bb7415785 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 4 May 2021 18:22:10 +0200
Subject: [PATCH 17/80] Bump bom-2.277.x from 28 to 29 (#227)
Bumps [bom-2.277.x](https://github.com/jenkinsci/bom) from 28 to 29.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 40c98796..1df4b589 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.277.x
- 28
+ 29
pom
import
From ebb3160260bc1b6e0996ae6b83420554c16a4748 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 15 May 2021 14:21:26 +0200
Subject: [PATCH 18/80] Bump bom-2.277.x from 29 to 807.v6d348e44c987 (#229)
Bumps [bom-2.277.x](https://github.com/jenkinsci/bom) from 29 to 807.v6d348e44c987.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 1df4b589..1c4e76b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.277.x
- 29
+ 807.v6d348e44c987
pom
import
From b883c7e292ba7eac96832e4c4d18166d0d5f312f Mon Sep 17 00:00:00 2001
From: Basil Crow
Date: Sat, 15 May 2021 05:21:57 -0700
Subject: [PATCH 19/80] Replace usages of `com.google.common.io.ByteStreams`
with usages of `org.apache.commons.io.IOUtils` (#228)
---
src/main/java/hudson/plugins/sshslaves/SSHLauncher.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
index 061925f7..c6ff51f8 100644
--- a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
+++ b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
@@ -30,7 +30,6 @@
import com.cloudbees.plugins.credentials.domains.HostnamePortRequirement;
import com.cloudbees.plugins.credentials.domains.SchemeRequirement;
import com.cloudbees.plugins.credentials.common.StandardUsernameListBoxModel;
-import com.google.common.io.ByteStreams;
import com.trilead.ssh2.ChannelCondition;
import com.trilead.ssh2.Connection;
import com.trilead.ssh2.SCPClient;
@@ -794,7 +793,7 @@ static byte[] readInputStreamIntoByteArrayAndClose(InputStream inputStream) thro
byte[] bytes = null;
try{
- bytes = ByteStreams.toByteArray(inputStream);
+ bytes = IOUtils.toByteArray(inputStream);
}catch(IOException e){
throw e;
} finally {
From bba7096ea3d4a972425345f76fdf3c0191657281 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Sat, 5 Jun 2021 14:28:07 +0200
Subject: [PATCH 20/80] chore: bump version to 1.32.0
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 1c4e76b1..b84d2966 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
- 1.31.8
+ 1.32.0
-SNAPSHOT
2.282
8
From 918d0f6eeff8dedb93aeba71e764ba4cb23188b7 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Sat, 5 Jun 2021 14:29:28 +0200
Subject: [PATCH 21/80] [maven-release-plugin] prepare release
ssh-slaves-1.32.0
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index b84d2966..d31c4a38 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
ssh-slaves
- ${revision}${changelist}
+ 1.32.0
hpi
SSH Build Agents plugin
@@ -81,7 +81,7 @@
scm:git:git://github.com/jenkinsci/ssh-slaves-plugin.git
scm:git:git@github.com:jenkinsci/ssh-slaves-plugin.git
https://github.com/jenkinsci/ssh-slaves-plugin
- ${scmTag}
+ ssh-slaves-1.32.0
From 38ad3f68e3345bb3a4604f5eb15b8c947627ae8b Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Sat, 5 Jun 2021 14:29:44 +0200
Subject: [PATCH 22/80] [maven-release-plugin] prepare for next development
iteration
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index d31c4a38..da5516be 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
ssh-slaves
- 1.32.0
+ ${revision}${changelist}
hpi
SSH Build Agents plugin
@@ -25,7 +25,7 @@
- 1.32.0
+ 1.32.1
-SNAPSHOT
2.282
8
@@ -81,7 +81,7 @@
scm:git:git://github.com/jenkinsci/ssh-slaves-plugin.git
scm:git:git@github.com:jenkinsci/ssh-slaves-plugin.git
https://github.com/jenkinsci/ssh-slaves-plugin
- ssh-slaves-1.32.0
+ ${scmTag}
From 22f2e08a627a6300ac673d091febdadf9c4ee618 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 6 Jun 2021 14:25:14 +0200
Subject: [PATCH 23/80] Bump plugin from 4.18 to 4.19 (#231)
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.18 to 4.19.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.18...plugin-4.19)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index da5516be..2f6236d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.18
+ 4.19
ssh-slaves
From 34d997c5266fa5c384268493c86b6e583a1d2351 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 2 Jul 2021 11:00:34 +0200
Subject: [PATCH 24/80] Bump bom-2.277.x from 807.v6d348e44c987 to
887.vae9c8ac09ff7 (#235)
Bumps [bom-2.277.x](https://github.com/jenkinsci/bom) from 807.v6d348e44c987 to 887.vae9c8ac09ff7.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.277.x
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 2f6236d7..8413a501 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.277.x
- 807.v6d348e44c987
+ 887.vae9c8ac09ff7
pom
import
From 1efd677326b8dffc629c8b245b35fef1718fe7f1 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Fri, 2 Jul 2021 13:58:34 +0200
Subject: [PATCH 25/80] [JENKINS-65929] Detection of docker is unreliable
(#236)
---
.../rules/CheckIsDockerAvailable.java | 20 ++-----------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/src/test/java/hudson/plugins/sshslaves/rules/CheckIsDockerAvailable.java b/src/test/java/hudson/plugins/sshslaves/rules/CheckIsDockerAvailable.java
index 4a8bf7d5..b2b95b93 100644
--- a/src/test/java/hudson/plugins/sshslaves/rules/CheckIsDockerAvailable.java
+++ b/src/test/java/hudson/plugins/sshslaves/rules/CheckIsDockerAvailable.java
@@ -5,6 +5,7 @@
import org.testcontainers.DockerClientFactory;
import java.io.IOException;
+import static org.junit.Assume.assumeTrue;
/**
* Rule to check if Docker is available.
@@ -14,23 +15,6 @@
public class CheckIsDockerAvailable extends ExternalResource {
@Override
protected void before() {
- org.junit.Assume.assumeTrue(isDockerAvailable());
- }
-
- boolean isDockerAvailable() {
- int exitCode = 0;
- try {
- ProcessBuilder builder = new ProcessBuilder();
- if (SystemUtils.IS_OS_WINDOWS) {
- builder.command("cmd.exe", "/c", "docker --version");
- } else {
- builder.command("sh", "-c", "docker --version");
- }
- Process process = builder.start();
- exitCode = process.waitFor();
- } catch (InterruptedException|IOException e) {
- exitCode = 0;
- }
- return exitCode == 0;
+ assumeTrue(DockerClientFactory.instance().isDockerAvailable());
}
}
From 24c2d1ea23860f07ff62d76fc7a5b9fa78e88fe3 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 11 Jul 2021 13:53:20 +0200
Subject: [PATCH 26/80] Bump git-changelist-maven-extension from 1.0-beta-7 to
1.2 (#237)
Bumps [git-changelist-maven-extension](https://github.com/jenkinsci/incrementals-tools) from 1.0-beta-7 to 1.2.
- [Release notes](https://github.com/jenkinsci/incrementals-tools/releases)
- [Commits](https://github.com/jenkinsci/incrementals-tools/commits/parent-1.2)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.incrementals:git-changelist-maven-extension
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.mvn/extensions.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
index 94863e60..43d62816 100644
--- a/.mvn/extensions.xml
+++ b/.mvn/extensions.xml
@@ -2,6 +2,6 @@
io.jenkins.tools.incrementals
git-changelist-maven-extension
- 1.0-beta-7
+ 1.2
From eed7f2a7e25912c4bfe762aa01ab6c867fa88c17 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 24 Jul 2021 13:47:48 +0200
Subject: [PATCH 27/80] Bump plugin from 4.19 to 4.20 (#239)
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.19 to 4.20.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.19...plugin-4.20)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 8413a501..cd1aa234 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.19
+ 4.20
ssh-slaves
From 8ab9baa333f8544a5e04195ff14e51ead89401d1 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 24 Jul 2021 13:48:01 +0200
Subject: [PATCH 28/80] Bump sshd from 3.0.3 to 3.0.4 (#238)
Bumps [sshd](https://github.com/jenkinsci/sshd-plugin) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/jenkinsci/sshd-plugin/releases)
- [Changelog](https://github.com/jenkinsci/sshd-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/sshd-plugin/compare/sshd-3.0.3...sshd-3.0.4)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.modules:sshd
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index cd1aa234..8bc96078 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,7 +134,7 @@
org.jenkins-ci.modules
sshd
- 3.0.3
+ 3.0.4
test
From 506b86870fc96f46f93ddfeb5a2de529775e85a6 Mon Sep 17 00:00:00 2001
From: Carroll Chiou
Date: Fri, 20 Aug 2021 02:12:20 -0600
Subject: [PATCH 29/80] update package name for CommandFactory for mina-sshd
2.5.1 (#247)
---
.../verifiers/TrustHostKeyActionTest.java | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/test/java/hudson/plugins/sshslaves/verifiers/TrustHostKeyActionTest.java b/src/test/java/hudson/plugins/sshslaves/verifiers/TrustHostKeyActionTest.java
index 39cf6d6e..2ed2c10d 100644
--- a/src/test/java/hudson/plugins/sshslaves/verifiers/TrustHostKeyActionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/verifiers/TrustHostKeyActionTest.java
@@ -53,10 +53,10 @@
import hudson.slaves.SlaveComputer;
public class TrustHostKeyActionTest {
-
+
@Rule
public final TemporaryFolder temporaryFolder = new TemporaryFolder();
-
+
@Rule
public final JenkinsRule jenkins = new JenkinsRule();
@@ -66,7 +66,7 @@ private static int findPort() throws IOException {
return socket.getLocalPort();
}
}
-
+
@SuppressWarnings("unchecked")
@Test
public void testSubmitNotAuthorised() throws Exception {
@@ -76,7 +76,7 @@ public void testSubmitNotAuthorised() throws Exception {
new UsernamePasswordCredentialsImpl(CredentialsScope.SYSTEM, "dummyCredentialId", null, "user", "pass")
)
);
-
+
final int port = findPort();
try {
@@ -109,30 +109,30 @@ public void testSubmitNotAuthorised() throws Exception {
DumbSlave agent = new DumbSlave("test-agent", "SSH Test agent",
temporaryFolder.newFolder().getAbsolutePath(), "1", Mode.NORMAL, "",
launcher, RetentionStrategy.NOOP, Collections.emptyList());
-
+
jenkins.getInstance().addNode(agent);
SlaveComputer computer = (SlaveComputer) jenkins.getInstance().getComputer("test-agent");
try {
computer.connect(false).get();
} catch (ExecutionException ex){
- //TODO(oleg_nenashev): "Slave" check is still needed for PCT purposes, but it should be eventually cleaned up
+ //TODO(oleg_nenashev): "Slave" check is still needed for PCT purposes, but it should be eventually cleaned up
if (!ex.getMessage().startsWith("java.io.IOException: Slave failed") && !ex.getMessage().startsWith("java.io.IOException: Agent failed")) {
throw ex;
}
}
-
+
List actions = computer.getActions(TrustHostKeyAction.class);
assertEquals(computer.getLog(), 1, actions.size());
assertNull(actions.get(0).getExistingHostKey());
-
+
HtmlPage p = jenkins.createWebClient().getPage(agent, actions.get(0).getUrlName());
p.getElementByName("Yes").click();
-
+
assertTrue(actions.get(0).isComplete());
assertEquals(actions.get(0).getExistingHostKey(), actions.get(0).getHostKey());
-
-
+
+
}
private Object newSshServer() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
@@ -180,7 +180,7 @@ private Object newFactory() throws ClassNotFoundException, NoSuchMethodException
}
private Class newCommandFactoryClass() throws ClassNotFoundException {
- return Class.forName("org.apache.sshd.server.CommandFactory");
+ return Class.forName("org.apache.sshd.server.command.CommandFactory");
}
private Object newCommandFactory(Class commandFactoryClass) throws ClassNotFoundException, IllegalArgumentException {
From ba1d6573512534ce47681136d1c893a3e74a7231 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 22 Aug 2021 15:02:44 +0200
Subject: [PATCH 30/80] Bump plugin from 4.20 to 4.24 (#244)
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.20 to 4.24.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.20...plugin-4.24)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 8bc96078..83a8ce9d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.20
+ 4.24
ssh-slaves
From d03bc5db342a2161ca401a5568a3d5ededc923ea Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 22 Aug 2021 15:03:50 +0200
Subject: [PATCH 31/80] Bump bom-2.277.x from 887.vae9c8ac09ff7 to
924.vda78166e6655 (#246)
Bumps [bom-2.277.x](https://github.com/jenkinsci/bom) from 887.vae9c8ac09ff7 to 924.vda78166e6655.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.277.x
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 83a8ce9d..648b894f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.277.x
- 887.vae9c8ac09ff7
+ 924.vda78166e6655
pom
import
From 8c2bfbe7577d3f52748e2f651abfb7be320b6f20 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Mon, 23 Aug 2021 19:26:25 +0200
Subject: [PATCH 32/80] fix: use user and password intead of DSA key in the
test (#248)
---
.../sshslaves/agents/AgentConnectionBase.java | 24 +++++++++++++++++--
.../AgentUserAndPasswordConnectionTest.java | 3 +--
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentConnectionBase.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentConnectionBase.java
index 6a9bc930..7d6a3e98 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentConnectionBase.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentConnectionBase.java
@@ -20,7 +20,9 @@
import com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey;
import com.cloudbees.plugins.credentials.CredentialsScope;
import com.cloudbees.plugins.credentials.SystemCredentialsProvider;
+import com.cloudbees.plugins.credentials.common.StandardUsernameCredentials;
import com.cloudbees.plugins.credentials.domains.Domain;
+import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
import static org.junit.Assert.assertTrue;
/**
@@ -77,7 +79,7 @@ protected void waitForAgentConnected(Node node) throws InterruptedException {
protected Node createPermanentAgent(String name, String host, int sshPort, String keyResourcePath, String passphrase)
throws Descriptor.FormException, IOException {
String credId = "sshCredentialsId";
- createSshCredentials(credId, keyResourcePath, passphrase);
+ createSshKeyCredentials(credId, keyResourcePath, passphrase);
final SSHLauncher launcher = new SSHLauncher(host , sshPort, credId);
launcher.setSshHostKeyVerificationStrategy(new NonVerifyingKeyVerificationStrategy());
DumbSlave agent = new DumbSlave(name, AGENT_WORK_DIR, launcher);
@@ -85,7 +87,18 @@ protected Node createPermanentAgent(String name, String host, int sshPort, Strin
return j.jenkins.getNode(agent.getNodeName());
}
- private void createSshCredentials(String id, String keyResourcePath, String passphrase) throws IOException {
+ protected Node createPermanentAgent(String name, String host, int sshPort)
+ throws Descriptor.FormException, IOException {
+ String credId = "sshCredentialsId";
+ createSshCredentials(credId);
+ final SSHLauncher launcher = new SSHLauncher(host , sshPort, credId);
+ launcher.setSshHostKeyVerificationStrategy(new NonVerifyingKeyVerificationStrategy());
+ DumbSlave agent = new DumbSlave(name, AGENT_WORK_DIR, launcher);
+ j.jenkins.addNode(agent);
+ return j.jenkins.getNode(agent.getNodeName());
+ }
+
+ private void createSshKeyCredentials(String id, String keyResourcePath, String passphrase) throws IOException {
String privateKey = IOUtils.toString(getClass().getResourceAsStream(keyResourcePath), StandardCharsets.UTF_8);
BasicSSHUserPrivateKey.DirectEntryPrivateKeySource privateKeySource = new BasicSSHUserPrivateKey.DirectEntryPrivateKeySource(
privateKey);
@@ -94,4 +107,11 @@ private void createSshCredentials(String id, String keyResourcePath, String pass
SystemCredentialsProvider.getInstance().getDomainCredentialsMap().put(Domain.global(),
Collections.singletonList(credentials));
}
+
+ private void createSshCredentials(String id) throws IOException {
+ StandardUsernameCredentials credentials =
+ new UsernamePasswordCredentialsImpl(CredentialsScope.SYSTEM, id, "", USER, PASSWORD);
+ SystemCredentialsProvider.getInstance().getDomainCredentialsMap().put(Domain.global(),
+ Collections.singletonList(credentials));
+ }
}
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentUserAndPasswordConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentUserAndPasswordConnectionTest.java
index bc5f5128..de1c8877 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentUserAndPasswordConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentUserAndPasswordConnectionTest.java
@@ -34,8 +34,7 @@ public class AgentUserAndPasswordConnectionTest extends AgentConnectionBase {
@Test
public void connectionTests() throws IOException, InterruptedException, Descriptor.FormException {
- Node node = createPermanentAgent(SSH_AGENT_NAME, agentContainer.getHost(), agentContainer.getMappedPort(SSH_PORT),
- SSH_AGENT_NAME + "/" + SSH_KEY_PATH, "");
+ Node node = createPermanentAgent(SSH_AGENT_NAME, agentContainer.getHost(), agentContainer.getMappedPort(SSH_PORT));
waitForAgentConnected(node);
assertTrue(isSuccessfullyConnected(node));
}
From 6009893c880c4de072088a82b073f7ab9c0adccb Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 23 Aug 2021 19:27:58 +0200
Subject: [PATCH 33/80] Bump testcontainers from 1.15.3 to 1.16.0 (#240)
Bumps [testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.15.3 to 1.16.0.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.15.3...1.16.0)
---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 648b894f..a411779f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -162,7 +162,7 @@
org.testcontainers
testcontainers
- 1.15.3
+ 1.16.0
test
From a48f96018fd692f99ae3aa278292727ef1094004 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Wed, 25 Aug 2021 13:01:14 +0200
Subject: [PATCH 34/80] chore: bump Jenkins core to 1.289.1 LTS version (#250)
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index a411779f..86fb9ba4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
1.32.1
-SNAPSHOT
- 2.282
+ 2.289.1
8
1.31.0
From 22f5f5fb82149aa9eb0d7e92f7d50788ad482da1 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 25 Aug 2021 13:47:07 +0200
Subject: [PATCH 35/80] Bump sshd from 3.0.4 to 3.1.0 (#242)
Bumps [sshd](https://github.com/jenkinsci/sshd-plugin) from 3.0.4 to 3.1.0.
- [Release notes](https://github.com/jenkinsci/sshd-plugin/releases)
- [Changelog](https://github.com/jenkinsci/sshd-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/sshd-plugin/compare/sshd-3.0.4...sshd-3.1)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.modules:sshd
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 86fb9ba4..31fc0e9c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,7 +134,7 @@
org.jenkins-ci.modules
sshd
- 3.0.4
+ 3.1.0
test
From 99113ff9b4f4a0277c2006d6a844562418f18035 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Wed, 25 Aug 2021 13:54:26 +0200
Subject: [PATCH 36/80] [maven-release-plugin] prepare release
ssh-slaves-1.33.0
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 31fc0e9c..19ad10d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
ssh-slaves
- ${revision}${changelist}
+ 1.33.0
hpi
SSH Build Agents plugin
@@ -81,7 +81,7 @@
scm:git:git://github.com/jenkinsci/ssh-slaves-plugin.git
scm:git:git@github.com:jenkinsci/ssh-slaves-plugin.git
https://github.com/jenkinsci/ssh-slaves-plugin
- ${scmTag}
+ ssh-slaves-1.33.0
From 21b694bbeab352b37d62f4881a5d46348c9b7c11 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Wed, 25 Aug 2021 13:55:00 +0200
Subject: [PATCH 37/80] [maven-release-plugin] prepare for next development
iteration
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 19ad10d7..6d31432b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
ssh-slaves
- 1.33.0
+ ${revision}${changelist}
hpi
SSH Build Agents plugin
@@ -25,7 +25,7 @@
- 1.32.1
+ 1.33.1
-SNAPSHOT
2.289.1
8
@@ -81,7 +81,7 @@
scm:git:git://github.com/jenkinsci/ssh-slaves-plugin.git
scm:git:git@github.com:jenkinsci/ssh-slaves-plugin.git
https://github.com/jenkinsci/ssh-slaves-plugin
- ssh-slaves-1.33.0
+ ${scmTag}
From 8708c63b538e5c217bb3954e834c67e2e00e749b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 1 Sep 2021 13:31:59 +0200
Subject: [PATCH 38/80] Bump bom-2.277.x from 924.vda78166e6655 to
937.v51fde92016ed (#251)
Bumps [bom-2.277.x](https://github.com/jenkinsci/bom) from 924.vda78166e6655 to 937.v51fde92016ed.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.277.x
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6d31432b..c5774aec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.277.x
- 924.vda78166e6655
+ 937.v51fde92016ed
pom
import
From 4b3a02a729f7376a1794920af7d1b661b310339d Mon Sep 17 00:00:00 2001
From: offa
Date: Sat, 6 Nov 2021 11:18:10 +0000
Subject: [PATCH 39/80] [JENKINS-42969] Use Computer.addAction() (#261)
---
...anuallyTrustedKeyVerificationStrategy.java | 45 +++++--------------
1 file changed, 11 insertions(+), 34 deletions(-)
diff --git a/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyTrustedKeyVerificationStrategy.java b/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyTrustedKeyVerificationStrategy.java
index 49adb8e1..1d960663 100644
--- a/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyTrustedKeyVerificationStrategy.java
+++ b/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyTrustedKeyVerificationStrategy.java
@@ -24,21 +24,15 @@
package hudson.plugins.sshslaves.verifiers;
import hudson.Extension;
-import hudson.model.Action;
-import hudson.model.Actionable;
-import hudson.model.Computer;
import hudson.model.TaskListener;
import hudson.plugins.sshslaves.Messages;
import hudson.plugins.sshslaves.SSHLauncher;
import hudson.slaves.SlaveComputer;
import java.io.IOException;
-import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.logging.Level;
import java.util.logging.Logger;
-import javax.annotation.Nonnull;
import org.kohsuke.stapler.DataBoundConstructor;
/**
@@ -55,29 +49,29 @@
public class ManuallyTrustedKeyVerificationStrategy extends SshHostKeyVerificationStrategy {
private static final Logger LOGGER = Logger.getLogger(ManuallyTrustedKeyVerificationStrategy.class.getName());
-
+
private final boolean requireInitialManualTrust;
-
+
@DataBoundConstructor
public ManuallyTrustedKeyVerificationStrategy(boolean requireInitialManualTrust) {
super();
this.requireInitialManualTrust = requireInitialManualTrust;
}
-
+
public boolean isRequireInitialManualTrust() {
return requireInitialManualTrust;
}
-
+
@Override
public boolean verify(final SlaveComputer computer, HostKey hostKey, TaskListener listener) throws IOException {
HostKeyHelper hostManager = HostKeyHelper.getInstance();
-
+
HostKey existingHostKey = hostManager.getHostKey(computer);
if (null == existingHostKey) {
if (isRequireInitialManualTrust()) {
listener.getLogger().println(Messages.ManualTrustingHostKeyVerifier_KeyNotTrusted(SSHLauncher.getTimestamp()));
if (!hasExistingTrustAction(computer, hostKey)) {
- addAction(computer, new TrustHostKeyAction(computer, hostKey));
+ computer.addAction(new TrustHostKeyAction(computer, hostKey));
}
return false;
}
@@ -90,7 +84,7 @@ public boolean verify(final SlaveComputer computer, HostKey hostKey, TaskListene
else if (!existingHostKey.equals(hostKey)) {
listener.getLogger().println(Messages.ManualTrustingHostKeyVerifier_KeyNotTrusted(SSHLauncher.getTimestamp()));
if (!hasExistingTrustAction(computer, hostKey)) {
- addAction(computer, new TrustHostKeyAction(computer, hostKey));
+ computer.addAction(new TrustHostKeyAction(computer, hostKey));
}
return false;
}
@@ -118,33 +112,16 @@ public String[] getPreferredKeyAlgorithms(SlaveComputer computer) throws IOExcep
return algorithms;
}
- /** TODO replace with {@link Computer#addAction} after core baseline picks up JENKINS-42969 fix */
- private static void addAction(@Nonnull Computer c, @Nonnull Action a) {
- try {
- c.addAction(a);
- } catch (UnsupportedOperationException x) {
- try {
- Field actionsF = Actionable.class.getDeclaredField("actions");
- actionsF.setAccessible(true);
- @SuppressWarnings("unchecked")
- List actions = (List) actionsF.get(c);
- actions.add(a);
- } catch (Exception x2) {
- LOGGER.log(Level.WARNING, null, x2);
- }
- }
- }
-
private boolean hasExistingTrustAction(SlaveComputer computer, HostKey hostKey) {
for (TrustHostKeyAction action : computer.getActions(TrustHostKeyAction.class)) {
if (!action.isComplete() && action.getHostKey().equals(hostKey)) {
return true;
}
}
-
+
return false;
}
-
+
@Extension
public static class ManuallyTrustedKeyVerificationStrategyDescriptor extends SshHostKeyVerificationStrategyDescriptor {
@@ -152,7 +129,7 @@ public static class ManuallyTrustedKeyVerificationStrategyDescriptor extends Ssh
public String getDisplayName() {
return Messages.ManualTrustingHostKeyVerifier_DescriptorDisplayName();
}
-
+
}
-
+
}
From d86f588bec1843c079335984a383ac19f9b12dd3 Mon Sep 17 00:00:00 2001
From: Mark Waite
Date: Sat, 6 Nov 2021 05:20:23 -0600
Subject: [PATCH 40/80] [JENKINS-66601] host key allows ed25519 & ecdsa (#256)
Add ED-25519 and ECDSA as allowed host key algorithms.
Remove DSS because the DSA algorithm has been removed from OpenSSH.
See https://security.stackexchange.com/questions/112802/why-openssh-deprecated-dsa-keys
---
doc/CONFIGURE.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/CONFIGURE.md b/doc/CONFIGURE.md
index dd0bbf2e..a4cf7930 100644
--- a/doc/CONFIGURE.md
+++ b/doc/CONFIGURE.md
@@ -116,7 +116,7 @@ potentially using the ssh hostname command to initiate a connection and update t
Checks the key provided by the remote host matches the key set by the user who configured this connection.
The SSH key expected for this connection. This key should be in the form `algorithm value`
-where algorithm is one of ssh-rsa or ssh-dss, and value is the Base 64 encoded content of the key. The keys should be placed in /etc/ssh/.pub
+where `algorithm` is one of ssh-rsa, ssh-ed25519, or ecdsa-sha2-nistp256, and `value` is the base 64 encoded content of the key. The public keys for a Linux agent can be read from the agent file system at `/etc/ssh/.pub`.
#### Manually trusted key Verification Strategy
From b52701eb20a46e8d71f86ed478eca774f99e4dbc Mon Sep 17 00:00:00 2001
From: Thomas
Date: Sat, 6 Nov 2021 12:21:58 +0100
Subject: [PATCH 41/80] Updated Readme ## Notes linkname to 1.31 (#252)
The README specifies plugin rename in 1.32 but links to ssh-slaves-1.31.0 tag.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 06d42dee..ba58836b 100644
--- a/README.md
+++ b/README.md
@@ -21,4 +21,4 @@ Provides a means to launch agents via SSH.
## Notes
This plugin is formerly known as "SSH Slaves Plugin".
-It was renamed in [1.32.0](https://github.com/jenkinsci/ssh-slaves-plugin/releases/tag/ssh-slaves-1.31.0), but the plugin ID was retained as `ssh-slaves` to retain compatibility for the plugin users.
+It was renamed in [1.31.0](https://github.com/jenkinsci/ssh-slaves-plugin/releases/tag/ssh-slaves-1.31.0), but the plugin ID was retained as `ssh-slaves` to retain compatibility for the plugin users.
From affacf58886a8b11e08819c526dbc9f3c0f7a0ca Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 6 Nov 2021 12:22:20 +0100
Subject: [PATCH 42/80] Bump bom-2.277.x from 937.v51fde92016ed to
961.vf0c9f6f59827 (#258)
Bumps [bom-2.277.x](https://github.com/jenkinsci/bom) from 937.v51fde92016ed to 961.vf0c9f6f59827.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.277.x
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c5774aec..d28a5f3e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.277.x
- 937.v51fde92016ed
+ 961.vf0c9f6f59827
pom
import
From 7b02af147e8c1b4f09237a7b36aa66a37404fcfa Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 6 Nov 2021 12:22:30 +0100
Subject: [PATCH 43/80] Bump plugin from 4.24 to 4.29 (#262)
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.24 to 4.29.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.24...plugin-4.29)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d28a5f3e..bceb284f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.24
+ 4.29
ssh-slaves
From 3045a3cab4b30fac11e649cd5fae57d89868ae7e Mon Sep 17 00:00:00 2001
From: offa
Date: Sat, 6 Nov 2021 12:04:22 +0000
Subject: [PATCH 44/80] Add missing nullability annotations and replace JSR 305
(#260)
Co-authored-by: Ivan Fernandez Calvo
---
.../plugins/sshslaves/JavaProvider.java | 10 +++++-----
.../plugins/sshslaves/JavaVersionChecker.java | 1 -
.../plugins/sshslaves/SSHConnector.java | 4 +++-
.../hudson/plugins/sshslaves/SSHLauncher.java | 10 ++++++----
...KnownHostsFileKeyVerificationStrategy.java | 2 ++
...nuallyProvidedKeyVerificationStrategy.java | 20 ++++++++++---------
...anuallyTrustedKeyVerificationStrategy.java | 2 ++
.../NonVerifyingKeyVerificationStrategy.java | 12 ++++++-----
.../rules/CheckIsDockerAvailable.java | 2 --
9 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/src/main/java/hudson/plugins/sshslaves/JavaProvider.java b/src/main/java/hudson/plugins/sshslaves/JavaProvider.java
index e2d39d84..fa738765 100644
--- a/src/main/java/hudson/plugins/sshslaves/JavaProvider.java
+++ b/src/main/java/hudson/plugins/sshslaves/JavaProvider.java
@@ -24,6 +24,7 @@
package hudson.plugins.sshslaves;
import com.trilead.ssh2.Connection;
+import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.ExtensionList;
import hudson.ExtensionPoint;
import hudson.slaves.SlaveComputer;
@@ -32,13 +33,12 @@
import java.util.List;
import java.util.Collections;
-import javax.annotation.Nonnull;
/**
* Guess where Java is.
*/
public abstract class JavaProvider implements ExtensionPoint {
-
+
private static final VersionNumber JAVA_LEVEL_8 = new VersionNumber("8");
/**
@@ -68,12 +68,12 @@ public static ExtensionList all() {
/**
* Gets minimal required Java version.
- *
+ *
* @return Minimal Java version required on the controller and agent side.
* @since TODO
- *
+ *
*/
- @Nonnull
+ @NonNull
public static VersionNumber getMinJavaLevel() {
return JAVA_LEVEL_8;
}
diff --git a/src/main/java/hudson/plugins/sshslaves/JavaVersionChecker.java b/src/main/java/hudson/plugins/sshslaves/JavaVersionChecker.java
index 1f6f2d66..04a1bbf6 100644
--- a/src/main/java/hudson/plugins/sshslaves/JavaVersionChecker.java
+++ b/src/main/java/hudson/plugins/sshslaves/JavaVersionChecker.java
@@ -44,7 +44,6 @@
import hudson.slaves.SlaveComputer;
import hudson.util.VersionNumber;
import static java.util.logging.Level.FINE;
-import static java.util.logging.Level.WARNING;
/**
* class to check if the version of java installed on the agent is a supported one.
diff --git a/src/main/java/hudson/plugins/sshslaves/SSHConnector.java b/src/main/java/hudson/plugins/sshslaves/SSHConnector.java
index 7e7770b2..d7c5b4b6 100644
--- a/src/main/java/hudson/plugins/sshslaves/SSHConnector.java
+++ b/src/main/java/hudson/plugins/sshslaves/SSHConnector.java
@@ -28,6 +28,7 @@
import com.cloudbees.plugins.credentials.common.StandardUsernameCredentials;
import com.cloudbees.plugins.credentials.common.StandardUsernameListBoxModel;
import com.trilead.ssh2.Connection;
+import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.ItemGroup;
import hudson.model.TaskListener;
@@ -167,7 +168,7 @@ public SSHConnector(int port, String credentialsId, String jvmOptions, String ja
}
@Override
- public SSHLauncher launch(String host, TaskListener listener) {
+ public SSHLauncher launch(@NonNull String host, TaskListener listener) {
SSHLauncher sshLauncher = new SSHLauncher(host, port, credentialsId, jvmOptions, javaPath, prefixStartSlaveCmd,
suffixStartSlaveCmd, launchTimeoutSeconds, maxNumRetries, retryWaitTime, sshHostKeyVerificationStrategy);
sshLauncher.setWorkDir(workDir);
@@ -283,6 +284,7 @@ public Boolean getTcpNoDelay() {
@Extension
public static class DescriptorImpl extends ComputerConnectorDescriptor {
+ @NonNull
@Override
public String getDisplayName() {
return Messages.SSHLauncher_DescriptorDisplayName();
diff --git a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
index c6ff51f8..44664078 100644
--- a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
+++ b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
@@ -258,7 +258,8 @@ public boolean verifyServerHostKey(String hostname, int port, String serverHostK
*/
public SSHLauncher(@NonNull String host, int port, String credentialsId,
String jvmOptions, String javaPath, String prefixStartSlaveCmd, String suffixStartSlaveCmd,
- Integer launchTimeoutSeconds, Integer maxNumRetries, Integer retryWaitTime, SshHostKeyVerificationStrategy sshHostKeyVerificationStrategy) {
+ Integer launchTimeoutSeconds, Integer maxNumRetries, Integer retryWaitTime,
+ @CheckForNull SshHostKeyVerificationStrategy sshHostKeyVerificationStrategy) {
setHost(host);
setJvmOptions(jvmOptions);
setPort(port);
@@ -1030,7 +1031,7 @@ SshHostKeyVerificationStrategy getSshHostKeyVerificationStrategyDefaulted() {
}
@DataBoundSetter
- public void setSshHostKeyVerificationStrategy(SshHostKeyVerificationStrategy value) {
+ public void setSshHostKeyVerificationStrategy(@CheckForNull SshHostKeyVerificationStrategy value) {
this.sshHostKeyVerificationStrategy = value;
}
@@ -1204,6 +1205,7 @@ public static class DescriptorImpl extends Descriptor {
/**
* {@inheritDoc}
*/
+ @NonNull
public String getDisplayName() {
return Messages.SSHLauncher_DescriptorDisplayName();
}
@@ -1345,12 +1347,12 @@ public void flush() throws IOException {
}
@Override
- public void write(byte[] b) throws IOException {
+ public void write(@NonNull byte[] b) throws IOException {
if (out != null) out.write(b);
}
@Override
- public void write(byte[] b, int off, int len) throws IOException {
+ public void write(@NonNull byte[] b, int off, int len) throws IOException {
if (out != null) out.write(b, off, len);
}
}
diff --git a/src/main/java/hudson/plugins/sshslaves/verifiers/KnownHostsFileKeyVerificationStrategy.java b/src/main/java/hudson/plugins/sshslaves/verifiers/KnownHostsFileKeyVerificationStrategy.java
index cf403475..220a00b0 100644
--- a/src/main/java/hudson/plugins/sshslaves/verifiers/KnownHostsFileKeyVerificationStrategy.java
+++ b/src/main/java/hudson/plugins/sshslaves/verifiers/KnownHostsFileKeyVerificationStrategy.java
@@ -24,6 +24,7 @@
package hudson.plugins.sshslaves.verifiers;
import com.trilead.ssh2.KnownHosts;
+import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.TaskListener;
import hudson.plugins.sshslaves.Messages;
@@ -117,6 +118,7 @@ public File getKnownHostsFile() {
@Extension
public static class KnownHostsFileKeyVerificationStrategyDescriptor extends SshHostKeyVerificationStrategyDescriptor {
+ @NonNull
@Override
public String getDisplayName() {
return Messages.KnownHostsFileHostKeyVerifier_DisplayName();
diff --git a/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyProvidedKeyVerificationStrategy.java b/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyProvidedKeyVerificationStrategy.java
index 0f01e65d..14ba2ff1 100644
--- a/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyProvidedKeyVerificationStrategy.java
+++ b/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyProvidedKeyVerificationStrategy.java
@@ -30,6 +30,7 @@
import java.util.List;
import java.util.StringTokenizer;
+import edu.umd.cs.findbugs.annotations.NonNull;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
@@ -51,7 +52,7 @@
public class ManuallyProvidedKeyVerificationStrategy extends SshHostKeyVerificationStrategy {
private final HostKey key;
-
+
@DataBoundConstructor
public ManuallyProvidedKeyVerificationStrategy(String key) {
super();
@@ -61,15 +62,15 @@ public ManuallyProvidedKeyVerificationStrategy(String key) {
throw new IllegalArgumentException("Invalid key: " + e.getMessage(), e);
}
}
-
+
public String getKey() {
return key.getAlgorithm() + " " + Base64.getEncoder().encodeToString(key.getKey());
}
-
+
public HostKey getParsedKey() {
return key;
}
-
+
@Override
public boolean verify(SlaveComputer computer, HostKey hostKey, TaskListener listener) throws Exception {
if (key.equals(hostKey)) {
@@ -91,7 +92,7 @@ public String[] getPreferredKeyAlgorithms(SlaveComputer computer) throws IOExcep
return sortedAlgorithms.toArray(new String[0]);
}
-
+
private static HostKey parseKey(String key) throws KeyParseException {
if (!key.contains(" ")) {
throw new IllegalArgumentException(Messages.ManualKeyProvidedHostKeyVerifier_TwoPartKey());
@@ -102,18 +103,19 @@ private static HostKey parseKey(String key) throws KeyParseException {
if (null == keyValue) {
throw new KeyParseException(Messages.ManualKeyProvidedHostKeyVerifier_Base64EncodedKeyValueRequired());
}
-
+
return TrileadVersionSupportManager.getTrileadSupport().parseKey(algorithm, keyValue);
}
-
+
@Extension
public static class ManuallyProvidedKeyVerificationStrategyDescriptor extends SshHostKeyVerificationStrategyDescriptor {
+ @NonNull
@Override
public String getDisplayName() {
return Messages.ManualKeyProvidedHostKeyVerifier_DisplayName();
}
-
+
public FormValidation doCheckKey(@QueryParameter String key) {
try {
ManuallyProvidedKeyVerificationStrategy.parseKey(key);
@@ -122,7 +124,7 @@ public FormValidation doCheckKey(@QueryParameter String key) {
return FormValidation.error(ex.getMessage());
}
}
-
+
}
}
diff --git a/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyTrustedKeyVerificationStrategy.java b/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyTrustedKeyVerificationStrategy.java
index 1d960663..d929edff 100644
--- a/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyTrustedKeyVerificationStrategy.java
+++ b/src/main/java/hudson/plugins/sshslaves/verifiers/ManuallyTrustedKeyVerificationStrategy.java
@@ -23,6 +23,7 @@
*/
package hudson.plugins.sshslaves.verifiers;
+import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.TaskListener;
import hudson.plugins.sshslaves.Messages;
@@ -125,6 +126,7 @@ private boolean hasExistingTrustAction(SlaveComputer computer, HostKey hostKey)
@Extension
public static class ManuallyTrustedKeyVerificationStrategyDescriptor extends SshHostKeyVerificationStrategyDescriptor {
+ @NonNull
@Override
public String getDisplayName() {
return Messages.ManualTrustingHostKeyVerifier_DescriptorDisplayName();
diff --git a/src/main/java/hudson/plugins/sshslaves/verifiers/NonVerifyingKeyVerificationStrategy.java b/src/main/java/hudson/plugins/sshslaves/verifiers/NonVerifyingKeyVerificationStrategy.java
index 5a95097d..56f38317 100644
--- a/src/main/java/hudson/plugins/sshslaves/verifiers/NonVerifyingKeyVerificationStrategy.java
+++ b/src/main/java/hudson/plugins/sshslaves/verifiers/NonVerifyingKeyVerificationStrategy.java
@@ -23,6 +23,7 @@
*/
package hudson.plugins.sshslaves.verifiers;
+import edu.umd.cs.findbugs.annotations.NonNull;
import org.kohsuke.stapler.DataBoundConstructor;
import hudson.Extension;
@@ -45,21 +46,22 @@ public class NonVerifyingKeyVerificationStrategy extends SshHostKeyVerificationS
public NonVerifyingKeyVerificationStrategy() {
super();
}
-
+
@Override
public boolean verify(SlaveComputer computer, HostKey hostKey, TaskListener listener) {
listener.getLogger().println(Messages.NonVerifyingHostKeyVerifier_NoVerificationWarning(SSHLauncher.getTimestamp()));
return true;
}
-
+
@Extension
public static class NonVerifyingKeyVerificationStrategyDescriptor extends SshHostKeyVerificationStrategyDescriptor {
+ @NonNull
@Override
public String getDisplayName() {
return Messages.NonVerifyingHostKeyVerifier_DescriptorDisplayName();
}
-
+
}
-
-}
\ No newline at end of file
+
+}
diff --git a/src/test/java/hudson/plugins/sshslaves/rules/CheckIsDockerAvailable.java b/src/test/java/hudson/plugins/sshslaves/rules/CheckIsDockerAvailable.java
index b2b95b93..b28e25cf 100644
--- a/src/test/java/hudson/plugins/sshslaves/rules/CheckIsDockerAvailable.java
+++ b/src/test/java/hudson/plugins/sshslaves/rules/CheckIsDockerAvailable.java
@@ -1,10 +1,8 @@
package hudson.plugins.sshslaves.rules;
-import org.apache.commons.lang.SystemUtils;
import org.junit.rules.ExternalResource;
import org.testcontainers.DockerClientFactory;
-import java.io.IOException;
import static org.junit.Assume.assumeTrue;
/**
From 1dff6b3cc9dd3eaf3af2f6ce90d131cef9d27c6b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 9 Nov 2021 16:25:19 +0100
Subject: [PATCH 45/80] Bump plugin from 4.29 to 4.31 (#264)
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.29 to 4.31.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.29...plugin-4.31)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index bceb284f..5a198ea0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.29
+ 4.31
ssh-slaves
From 22bdd5d2b9f429b099400390330bd1801e5467c5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Nov 2021 09:48:17 +0100
Subject: [PATCH 46/80] Bump testcontainers from 1.16.0 to 1.16.2 (#263)
* Bump testcontainers from 1.16.0 to 1.16.2
Bumps [testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.16.0 to 1.16.2.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.0...1.16.2)
---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
* fix: add some exclusions
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivan Fernandez Calvo
---
pom.xml | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 5a198ea0..580b2177 100644
--- a/pom.xml
+++ b/pom.xml
@@ -162,8 +162,18 @@
org.testcontainers
testcontainers
- 1.16.0
+ 1.16.2
test
+
+
+ org.apache.commons
+ commons-compress
+
+
+ org.slf4j
+ slf4j-api
+
+
From 964c6038619cd89d52868034059ebc9c4a279faa Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 3 Jan 2022 20:01:50 +0000
Subject: [PATCH 47/80] Bump git-changelist-maven-extension from 1.2 to 1.3
Bumps [git-changelist-maven-extension](https://github.com/jenkinsci/incrementals-tools) from 1.2 to 1.3.
- [Release notes](https://github.com/jenkinsci/incrementals-tools/releases)
- [Commits](https://github.com/jenkinsci/incrementals-tools/compare/parent-1.2...parent-1.3)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.incrementals:git-changelist-maven-extension
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
.mvn/extensions.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
index 43d62816..a65d82e1 100644
--- a/.mvn/extensions.xml
+++ b/.mvn/extensions.xml
@@ -2,6 +2,6 @@
io.jenkins.tools.incrementals
git-changelist-maven-extension
- 1.2
+ 1.3
From bc4dc045e801c3d965759e57db0c5edaef500d00 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 21 Jan 2022 11:23:49 +0100
Subject: [PATCH 48/80] Bump plugin from 4.31 to 4.33 (#267)
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.31 to 4.33.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.31...plugin-4.33)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 580b2177..6aa7cbc0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.31
+ 4.33
ssh-slaves
From 36c379a07ceff43b080829374a55aa51feb95083 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Sat, 26 Feb 2022 14:04:23 +0100
Subject: [PATCH 49/80] Create jenkins-security-scan.yml
---
.github/workflows/jenkins-security-scan.yml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 .github/workflows/jenkins-security-scan.yml
diff --git a/.github/workflows/jenkins-security-scan.yml b/.github/workflows/jenkins-security-scan.yml
new file mode 100644
index 00000000..ae503c1d
--- /dev/null
+++ b/.github/workflows/jenkins-security-scan.yml
@@ -0,0 +1,15 @@
+name: Jenkins Security Scan
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ types: [ opened, synchronize, reopened ]
+ workflow_dispatch:
+
+jobs:
+ security-scan:
+ uses: jenkins-infra/jenkins-security-scan/.github/workflows/jenkins-security-scan.yaml@v1
+ with:
+ java-cache: '' # Optionally enable use of a build dependency cache. Specify 'maven' or 'gradle' as appropriate.
+ java-version: 11 # What version of Java to set up for the build.
From e0fde81d891388488c96c8213d4386d8442aee5a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 26 Feb 2022 14:06:55 +0100
Subject: [PATCH 50/80] Bump testcontainers from 1.16.2 to 1.16.3 (#268)
Bumps [testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.16.2 to 1.16.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.2...1.16.3)
---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6aa7cbc0..34e79dc9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -162,7 +162,7 @@
org.testcontainers
testcontainers
- 1.16.2
+ 1.16.3
test
From ecacc09652535a8ff972dc8dbcad202e919a5012 Mon Sep 17 00:00:00 2001
From: offa
Date: Sat, 26 Feb 2022 13:11:32 +0000
Subject: [PATCH 51/80] Replace assertion and use lambda (#270)
* Replace assertion
* Use lambdas
---
.../hudson/plugins/sshslaves/SSHLauncher.java | 104 +++++++++---------
.../plugins/sshslaves/SSHLauncherTest.java | 12 +-
.../verifiers/TrustHostKeyActionTest.java | 44 +++-----
3 files changed, 73 insertions(+), 87 deletions(-)
diff --git a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
index 44664078..7e781f74 100644
--- a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
+++ b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
@@ -419,60 +419,58 @@ public void launch(final SlaveComputer computer, final TaskListener listener) th
launcherExecutorService = Executors.newSingleThreadExecutor(
new NamingThreadFactory(Executors.defaultThreadFactory(), "SSHLauncher.launch for '" + computer.getName() + "' node"));
Set> callables = new HashSet<>();
- callables.add(new Callable() {
- public Boolean call() throws InterruptedException {
- Boolean rval = Boolean.FALSE;
- try {
- String[] preferredKeyAlgorithms = getSshHostKeyVerificationStrategyDefaulted().getPreferredKeyAlgorithms(computer);
- if (preferredKeyAlgorithms != null && preferredKeyAlgorithms.length > 0) { // JENKINS-44832
- connection.setServerHostKeyAlgorithms(preferredKeyAlgorithms);
- } else {
- listener.getLogger().println("Warning: no key algorithms provided; JENKINS-42959 disabled");
- }
-
- listener.getLogger().println(logConfiguration());
-
- openConnection(listener, computer);
-
- verifyNoHeaderJunk(listener);
- reportEnvironment(listener);
-
- final String workingDirectory = getWorkingDirectory(computer);
- if (workingDirectory == null) {
- listener.error("Cannot get the working directory for " + computer);
- return Boolean.FALSE;
- }
-
- String java = null;
- if (StringUtils.isNotBlank(javaPath)) {
- java = expandExpression(computer, javaPath);
- } else {
- checkJavaIsInPath(listener);
- //FIXME deprecated on 2020-12-10, it will removed after 2021-09-01
- JavaVersionChecker javaVersionChecker = new JavaVersionChecker(computer, listener, getJvmOptions(),
- connection);
- java = javaVersionChecker.resolveJava();
- }
-
- copyAgentJar(listener, workingDirectory);
-
- startAgent(computer, listener, java, workingDirectory);
-
- PluginImpl.register(connection);
- rval = Boolean.TRUE;
- } catch (RuntimeException|Error e) {
- String msg = Messages.SSHLauncher_UnexpectedError();
- if(StringUtils.isNotBlank(e.getMessage())){
- msg = e.getMessage();
- }
- e.printStackTrace(listener.error(msg));
- } catch (AbortException e) {
- listener.getLogger().println(e.getMessage());
- } catch (IOException e) {
- e.printStackTrace(listener.getLogger());
- } finally {
- return rval;
+ callables.add(() -> {
+ Boolean rval = Boolean.FALSE;
+ try {
+ String[] preferredKeyAlgorithms = getSshHostKeyVerificationStrategyDefaulted().getPreferredKeyAlgorithms(computer);
+ if (preferredKeyAlgorithms != null && preferredKeyAlgorithms.length > 0) { // JENKINS-44832
+ connection.setServerHostKeyAlgorithms(preferredKeyAlgorithms);
+ } else {
+ listener.getLogger().println("Warning: no key algorithms provided; JENKINS-42959 disabled");
+ }
+
+ listener.getLogger().println(logConfiguration());
+
+ openConnection(listener, computer);
+
+ verifyNoHeaderJunk(listener);
+ reportEnvironment(listener);
+
+ final String workingDirectory = getWorkingDirectory(computer);
+ if (workingDirectory == null) {
+ listener.error("Cannot get the working directory for " + computer);
+ return Boolean.FALSE;
+ }
+
+ String java = null;
+ if (StringUtils.isNotBlank(javaPath)) {
+ java = expandExpression(computer, javaPath);
+ } else {
+ checkJavaIsInPath(listener);
+ //FIXME deprecated on 2020-12-10, it will removed after 2021-09-01
+ JavaVersionChecker javaVersionChecker = new JavaVersionChecker(computer, listener, getJvmOptions(),
+ connection);
+ java = javaVersionChecker.resolveJava();
+ }
+
+ copyAgentJar(listener, workingDirectory);
+
+ startAgent(computer, listener, java, workingDirectory);
+
+ PluginImpl.register(connection);
+ rval = Boolean.TRUE;
+ } catch (RuntimeException|Error e) {
+ String msg = Messages.SSHLauncher_UnexpectedError();
+ if(StringUtils.isNotBlank(e.getMessage())){
+ msg = e.getMessage();
}
+ e.printStackTrace(listener.error(msg));
+ } catch (AbortException e) {
+ listener.getLogger().println(e.getMessage());
+ } catch (IOException e) {
+ e.printStackTrace(listener.getLogger());
+ } finally {
+ return rval;
}
});
diff --git a/src/test/java/hudson/plugins/sshslaves/SSHLauncherTest.java b/src/test/java/hudson/plugins/sshslaves/SSHLauncherTest.java
index 3d27c7c9..f0b69b31 100644
--- a/src/test/java/hudson/plugins/sshslaves/SSHLauncherTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/SSHLauncherTest.java
@@ -76,6 +76,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -154,12 +155,7 @@ private static boolean checkSupported(final String testVersionOutput) throws IOE
}
private static void assertNotSupported(final String testVersionOutput) throws AssertionError {
- try {
- checkSupported(testVersionOutput);
- fail("Expected version " + testVersionOutput + " to be not supported, but it is supported");
- } catch (IOException e) {
- // expected
- }
+ assertThrows(IOException.class, () -> checkSupported(testVersionOutput));
}
private void checkRoundTrip(String host) throws Exception {
@@ -400,7 +396,7 @@ public void getMd5Hash() {
try {
byte[] bytes = "Leave me alone!".getBytes();
String result = SSHLauncher.getMd5Hash(bytes);
- assertTrue("1EB226C8E950BAC1494BE197E84A264C".equals(result));
+ assertEquals("1EB226C8E950BAC1494BE197E84A264C", result);
} catch (Exception e) {
e.printStackTrace();
}
@@ -420,7 +416,7 @@ public void readInputStreamIntoByteArrayAndClose() {
byte[] bytes = SSHLauncher.readInputStreamIntoByteArrayAndClose(inputStream);
assertNotNull(bytes);
assertTrue(bytes.length > 0);
- assertTrue("Don't change me or add newlines!".equals(new String(bytes)));
+ assertEquals("Don't change me or add newlines!", new String(bytes));
} catch (Exception e) {
e.printStackTrace();
diff --git a/src/test/java/hudson/plugins/sshslaves/verifiers/TrustHostKeyActionTest.java b/src/test/java/hudson/plugins/sshslaves/verifiers/TrustHostKeyActionTest.java
index 2ed2c10d..db177361 100644
--- a/src/test/java/hudson/plugins/sshslaves/verifiers/TrustHostKeyActionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/verifiers/TrustHostKeyActionTest.java
@@ -187,25 +187,21 @@ private Object newCommandFactory(Class commandFactoryClass) throws ClassNotFound
return java.lang.reflect.Proxy.newProxyInstance(
commandFactoryClass.getClassLoader(),
new java.lang.Class[]{commandFactoryClass},
- new java.lang.reflect.InvocationHandler() {
+ (proxy, method, args) -> {
- @Override
- public Object invoke(Object proxy, java.lang.reflect.Method method, Object[] args) throws java.lang.Throwable {
+ if (method.getName().equals("createCommand")) {
+ Class commandClass;
+ try {
+ commandClass = Class.forName("org.apache.sshd.server.command.UnknownCommand");
+ } catch (ClassNotFoundException e) {
+ commandClass = Class.forName("org.apache.sshd.server.scp.UnknownCommand");
+ }
- if (method.getName().equals("createCommand")) {
- Class commandClass;
- try {
- commandClass = Class.forName("org.apache.sshd.server.command.UnknownCommand");
- } catch (ClassNotFoundException e) {
- commandClass = Class.forName("org.apache.sshd.server.scp.UnknownCommand");
- }
+ return commandClass.getConstructor(String.class).newInstance(args[0]);
+ }
- return commandClass.getConstructor(String.class).newInstance(args[0]);
- }
-
- return null;
- }
- });
+ return null;
+ });
}
private Class newCommandAuthenticatorClass() throws ClassNotFoundException {
@@ -223,18 +219,14 @@ private Object newAuthenticator(Class passwordAuthenticatorClass) throws ClassNo
return java.lang.reflect.Proxy.newProxyInstance(
passwordAuthenticatorClass.getClassLoader(),
new java.lang.Class[]{passwordAuthenticatorClass},
- new java.lang.reflect.InvocationHandler() {
-
- @Override
- public Object invoke(Object proxy, java.lang.reflect.Method method, Object[] args) throws java.lang.Throwable {
+ (proxy, method, args) -> {
- if (method.getName().equals("authenticate")) {
- return Boolean.TRUE;
- }
+ if (method.getName().equals("authenticate")) {
+ return Boolean.TRUE;
+ }
- return null;
- }
- });
+ return null;
+ });
}
private Object invoke(Object target, String methodName, Class[] parameterTypes, Object[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
From 2eb371006b0b6cffb775cf107be8376578eea762 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 26 Feb 2022 14:11:55 +0100
Subject: [PATCH 52/80] Bump plugin from 4.33 to 4.35 (#272)
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.33 to 4.35.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.33...plugin-4.35)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 34e79dc9..1c980aa5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.33
+ 4.35
ssh-slaves
From f3105af5e5d3adf9343c74ebae03c08b6c2fafe4 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Sat, 26 Feb 2022 14:21:55 +0100
Subject: [PATCH 53/80] Update jenkins-security-scan.yml
---
.github/workflows/jenkins-security-scan.yml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/jenkins-security-scan.yml b/.github/workflows/jenkins-security-scan.yml
index ae503c1d..17136b16 100644
--- a/.github/workflows/jenkins-security-scan.yml
+++ b/.github/workflows/jenkins-security-scan.yml
@@ -3,8 +3,9 @@ on:
push:
branches:
- main
- pull_request:
- types: [ opened, synchronize, reopened ]
+# see https://github.com/jenkins-infra/jenkins-security-scan/issues/3
+# pull_request:
+# types: [ opened, synchronize, reopened ]
workflow_dispatch:
jobs:
From 4f02481ae75370d5ce9d9c760aac52056c9c9f06 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Tue, 1 Mar 2022 12:59:24 +0100
Subject: [PATCH 54/80] feat: enable continouos delivery (#269)
---
.github/dependabot.yml | 6 +++-
.github/release-drafter.yml | 6 ++--
.github/workflows/cd.yaml | 59 +++++++++++++++++++++++++++++++++++++
.mvn/maven.config | 1 +
pom.xml | 2 +-
5 files changed, 68 insertions(+), 6 deletions(-)
create mode 100644 .github/workflows/cd.yaml
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 04ceb6e8..b7814523 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -3,4 +3,8 @@ updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
- interval: "weekly"
+ interval: "daily"
+ - package-ecosystem: "github-actions"
+ directory: /
+ schedule:
+ interval: "daily"
\ No newline at end of file
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
index 10fb79a1..bbef3509 100644
--- a/.github/release-drafter.yml
+++ b/.github/release-drafter.yml
@@ -1,6 +1,4 @@
# https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc
+# https://www.jenkins.io/doc/developer/publishing/releasing-cd/#release-notes
_extends: .github
-# Semantic versioning is used d=for this plugin: https://semver.org/
-version-template: $MAJOR.$MINOR.$PATCH
-tag-template: ssh-slaves-$NEXT_PATCH_VERSION
-name-template: $NEXT_PATCH_VERSION
+
diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
new file mode 100644
index 00000000..8dfdb7b9
--- /dev/null
+++ b/.github/workflows/cd.yaml
@@ -0,0 +1,59 @@
+# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins
+
+name: cd
+on:
+ workflow_dispatch:
+ check_run:
+ types:
+ - completed
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ outputs:
+ should_release: ${{ steps.verify-ci-status.outputs.result == 'success' && steps.interesting-categories.outputs.interesting == 'true' }}
+ steps:
+ - name: Verify CI status
+ uses: jenkins-infra/verify-ci-status-action@v1.2.0
+ id: verify-ci-status
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ output_result: true
+
+ - name: Release Drafter
+ uses: release-drafter/release-drafter@v5
+ if: steps.verify-ci-status.outputs.result == 'success'
+ with:
+ name: next
+ tag: next
+ version: next
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Check interesting categories
+ uses: jenkins-infra/interesting-category-action@v1.0.0
+ id: interesting-categories
+ if: steps.verify-ci-status.outputs.result == 'success'
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ release:
+ runs-on: ubuntu-latest
+ needs: [validate]
+ if: needs.validate.outputs.should_release == 'true'
+ steps:
+ - name: Check out
+ uses: actions/checkout@v2.3.4
+ with:
+ fetch-depth: 0
+ - name: Set up JDK 8
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'adopt'
+ java-version: 8
+ - name: Release
+ uses: jenkins-infra/jenkins-maven-cd-action@v1.2.0
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
+ MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
\ No newline at end of file
diff --git a/.mvn/maven.config b/.mvn/maven.config
index 2a0299c4..f7daf60d 100644
--- a/.mvn/maven.config
+++ b/.mvn/maven.config
@@ -1,2 +1,3 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
+-Dchangelist.format=%d.v%s
diff --git a/pom.xml b/pom.xml
index 1c980aa5..be6e3339 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
ssh-slaves
- ${revision}${changelist}
+ ${revision}-${changelist}
hpi
SSH Build Agents plugin
From 726b4e1bffb1bbdedcea0bab71ae9b71427898a4 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 1 Mar 2022 13:52:50 +0100
Subject: [PATCH 55/80] Bump actions/checkout from 2.3.4 to 2.4.0 (#276)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.4.0)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/cd.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
index 8dfdb7b9..b2bc2386 100644
--- a/.github/workflows/cd.yaml
+++ b/.github/workflows/cd.yaml
@@ -43,7 +43,7 @@ jobs:
if: needs.validate.outputs.should_release == 'true'
steps:
- name: Check out
- uses: actions/checkout@v2.3.4
+ uses: actions/checkout@v2.4.0
with:
fetch-depth: 0
- name: Set up JDK 8
From f245b0d52b8e17ae2a07dec05bd3df6814208bbf Mon Sep 17 00:00:00 2001
From: Adrien Lecharpentier
Date: Tue, 1 Mar 2022 15:42:36 +0100
Subject: [PATCH 56/80] Changes monitor category (#274)
---
.../MissingVerificationStrategyAdministrativeMonitor.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/main/java/hudson/plugins/sshslaves/verifiers/MissingVerificationStrategyAdministrativeMonitor.java b/src/main/java/hudson/plugins/sshslaves/verifiers/MissingVerificationStrategyAdministrativeMonitor.java
index 62994a60..4235400f 100644
--- a/src/main/java/hudson/plugins/sshslaves/verifiers/MissingVerificationStrategyAdministrativeMonitor.java
+++ b/src/main/java/hudson/plugins/sshslaves/verifiers/MissingVerificationStrategyAdministrativeMonitor.java
@@ -65,6 +65,11 @@ public String getDisplayName() {
}
public String getAgentNames() {
- return agentNames != null ? agentNames.toString() : "";
+ return agentNames != null ? agentNames.toString() : "";
+ }
+
+ @Override
+ public boolean isSecurity() {
+ return true;
}
}
From 66beec1c2e731a1a9a98ec5a00bbb6107a603220 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 1 Mar 2022 15:42:49 +0100
Subject: [PATCH 57/80] Bump plugin from 4.35 to 4.37 (#275)
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.35 to 4.37.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.35...plugin-4.37)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index be6e3339..b03e32af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.35
+ 4.37
ssh-slaves
From ba0d6a21f32229aa2de51f458070b6b7cd75cc5a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 3 Mar 2022 10:34:55 +0100
Subject: [PATCH 58/80] Bump actions/checkout from 2.4.0 to 3 (#277)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/cd.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
index b2bc2386..ce0e8718 100644
--- a/.github/workflows/cd.yaml
+++ b/.github/workflows/cd.yaml
@@ -43,7 +43,7 @@ jobs:
if: needs.validate.outputs.should_release == 'true'
steps:
- name: Check out
- uses: actions/checkout@v2.4.0
+ uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 8
From 2253cedd3295ed8886eb32552d329d0106608775 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Sat, 5 Mar 2022 11:47:29 +0100
Subject: [PATCH 59/80] chore: change the version number format (#278)
change the version number format to a one more accurate
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index b03e32af..b6a96bfe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
ssh-slaves
- ${revision}-${changelist}
+ ${revision}.${changelist}
hpi
SSH Build Agents plugin
@@ -25,8 +25,8 @@
- 1.33.1
- -SNAPSHOT
+ 1
+ 999999-SNAPSHOT
2.289.1
8
1.31.0
From 80a9538ba9b0bb6caa049cab9eb4d1ee26d51434 Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Mon, 7 Mar 2022 11:09:19 +0100
Subject: [PATCH 60/80] chore: test most common SSH connections (#279)
---
.../hudson/plugins/sshslaves/agents/AgentDSAConnectionTest.java | 2 ++
.../sshslaves/agents/AgentECDHSha2Nistp256ConnectionTest.java | 2 ++
.../sshslaves/agents/AgentECDHSha2Nistp384ConnectionTest.java | 2 ++
.../plugins/sshslaves/agents/AgentRSA256ConnectionTest.java | 2 ++
.../sshslaves/agents/AgentRSA_AES128CBC_ConnectionTest.java | 2 ++
.../sshslaves/agents/AgentRSA_AES192CBC_ConnectionTest.java | 2 ++
.../sshslaves/agents/AgentRSA_DESCBC_ConnectionTest.java | 2 ++
.../sshslaves/agents/AgentRSA_DES_EDE3CBC_ConnectionTest.java | 2 ++
.../sshslaves/agents/AgentUbuntu1404RSAConnectionTest.java | 2 ++
.../sshslaves/agents/AgentUbuntu1604RSAConnectionTest.java | 2 ++
.../sshslaves/agents/AgentUbuntu1804RSAConnectionTest.java | 2 ++
11 files changed, 22 insertions(+)
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentDSAConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentDSAConnectionTest.java
index e9184ac7..ff7de11f 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentDSAConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentDSAConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKeyAuthenticationTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentDSAConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-dsa";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentECDHSha2Nistp256ConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentECDHSha2Nistp256ConnectionTest.java
index b491c093..37a2b09a 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentECDHSha2Nistp256ConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentECDHSha2Nistp256ConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKexTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKexTest.class})
public class AgentECDHSha2Nistp256ConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-ecdh-sha2-nistp256";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentECDHSha2Nistp384ConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentECDHSha2Nistp384ConnectionTest.java
index 59666c22..b6a475af 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentECDHSha2Nistp384ConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentECDHSha2Nistp384ConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKexTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKexTest.class})
public class AgentECDHSha2Nistp384ConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-ecdh-sha2-nistp384";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA256ConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA256ConnectionTest.java
index ed66f2a7..5bfa655e 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA256ConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA256ConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKeyAuthenticationTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentRSA256ConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-rsa256";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_AES128CBC_ConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_AES128CBC_ConnectionTest.java
index 6c8b64f0..a12387f9 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_AES128CBC_ConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_AES128CBC_ConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKeyAuthenticationTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentRSA_AES128CBC_ConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-rsa";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_AES192CBC_ConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_AES192CBC_ConnectionTest.java
index 12ad532a..ca27295f 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_AES192CBC_ConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_AES192CBC_ConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKeyAuthenticationTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentRSA_AES192CBC_ConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-rsa";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_DESCBC_ConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_DESCBC_ConnectionTest.java
index 3527a87f..4a09361b 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_DESCBC_ConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_DESCBC_ConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKeyAuthenticationTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentRSA_DESCBC_ConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-rsa";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_DES_EDE3CBC_ConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_DES_EDE3CBC_ConnectionTest.java
index 7403667a..dcfdea27 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_DES_EDE3CBC_ConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentRSA_DES_EDE3CBC_ConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKeyAuthenticationTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentRSA_DES_EDE3CBC_ConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-rsa";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1404RSAConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1404RSAConnectionTest.java
index 2f643ff2..855159f9 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1404RSAConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1404RSAConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKeyAuthenticationTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentUbuntu1404RSAConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-ubuntu-14.04";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1604RSAConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1604RSAConnectionTest.java
index 1793b399..d73777b5 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1604RSAConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1604RSAConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKeyAuthenticationTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentUbuntu1604RSAConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-ubuntu-16.04";
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1804RSAConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1804RSAConnectionTest.java
index 73acbab4..2c0cd94f 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1804RSAConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu1804RSAConnectionTest.java
@@ -11,12 +11,14 @@
import hudson.plugins.sshslaves.categories.AgentSSHTest;
import hudson.plugins.sshslaves.categories.SSHKeyAuthenticationTest;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
/**
* Connect to a remote SSH Agent
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentUbuntu1804RSAConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-ubuntu-18.04";
From 2d29533b5ea2c2de4d2a832c570651f3d1f237da Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 8 Apr 2022 10:14:42 +0200
Subject: [PATCH 61/80] Bump plugin from 4.37 to 4.40 (#282)
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.37 to 4.40.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.37...plugin-4.40)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index b6a96bfe..1a552b80 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.37
+ 4.40
ssh-slaves
From 1083ce377107424f055b869cdf8d6ede963e873e Mon Sep 17 00:00:00 2001
From: Ivan Fernandez Calvo
Date: Fri, 8 Apr 2022 13:14:42 +0200
Subject: [PATCH 62/80] chore: update Jenkins Core to 2.319 (#284)
* chore: update Jenkins Core to 2.319
* test: disable Ubuntu 20.04 tests
* Update pom.xml
---
pom.xml | 10 +++-------
.../agents/AgentUbuntu2004RSAConnectionTest.java | 2 ++
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1a552b80..39698d47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
1
999999-SNAPSHOT
- 2.289.1
+ 2.319.1
8
1.31.0
@@ -102,8 +102,8 @@
io.jenkins.tools.bom
- bom-2.277.x
- 961.vf0c9f6f59827
+ bom-2.319.x
+ 1246.va_b_50630c1d19
pom
import
@@ -111,10 +111,6 @@
org.jenkins-ci.plugins
jackson2-api
-
- org.slf4j
- slf4j-api
-
diff --git a/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu2004RSAConnectionTest.java b/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu2004RSAConnectionTest.java
index 5151f7de..c08d9e48 100644
--- a/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu2004RSAConnectionTest.java
+++ b/src/test/java/hudson/plugins/sshslaves/agents/AgentUbuntu2004RSAConnectionTest.java
@@ -1,6 +1,7 @@
package hudson.plugins.sshslaves.agents;
import java.io.IOException;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -18,6 +19,7 @@
*
* @author Kuisathaverat
*/
+@Ignore("Only for manual test.")
@Category({ AgentSSHTest.class, SSHKeyAuthenticationTest.class})
public class AgentUbuntu2004RSAConnectionTest extends AgentConnectionBase {
public static final String SSH_AGENT_NAME = "ssh-agent-ubuntu-20.04";
From fad54aa44a03558951b29a0d142060d1534fc1fc Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 11 Apr 2022 12:23:46 +0200
Subject: [PATCH 63/80] Bump actions/setup-java from 2 to 3 (#285)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2 to 3.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v2...v3)
---
updated-dependencies:
- dependency-name: actions/setup-java
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/cd.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
index ce0e8718..feb707ce 100644
--- a/.github/workflows/cd.yaml
+++ b/.github/workflows/cd.yaml
@@ -47,7 +47,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up JDK 8
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 8
From ab864a8847733d168c6284a82365b2fa7f3782a7 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 20 Apr 2022 17:21:50 +0200
Subject: [PATCH 64/80] Bump sshd from 3.1.0 to 3.228.v4c9f9e652c86 (#287)
Bumps [sshd](https://github.com/jenkinsci/sshd-plugin) from 3.1.0 to 3.228.v4c9f9e652c86.
- [Release notes](https://github.com/jenkinsci/sshd-plugin/releases)
- [Changelog](https://github.com/jenkinsci/sshd-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/sshd-plugin/compare/sshd-3.1...3.228.v4c9f9e652c86)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.modules:sshd
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 39698d47..9cc94948 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,7 +130,7 @@
org.jenkins-ci.modules
sshd
- 3.1.0
+ 3.228.v4c9f9e652c86
test
From b9e346efff2d6d442805b470ca85d87201bcb79e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 20 Apr 2022 17:22:06 +0200
Subject: [PATCH 65/80] Bump bom-2.319.x from 1246.va_b_50630c1d19 to
1280.vd669827e38cd (#290)
Bumps [bom-2.319.x](https://github.com/jenkinsci/bom) from 1246.va_b_50630c1d19 to 1280.vd669827e38cd.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.319.x
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 9cc94948..a2e22e6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.319.x
- 1246.va_b_50630c1d19
+ 1280.vd669827e38cd
pom
import
From ffaccaa4d710cd9c18e4a473f1ac1d846cfb5c60 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 21 Apr 2022 14:42:06 +0200
Subject: [PATCH 66/80] Bump testcontainers from 1.16.3 to 1.17.1 (#289)
Bumps [testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.16.3 to 1.17.1.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.16.3...1.17.1)
---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index a2e22e6d..8e22dea5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -158,7 +158,7 @@
org.testcontainers
testcontainers
- 1.16.3
+ 1.17.1
test
From c82988f54b105e2c85d113dbaeb89baeb1dda727 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 25 Apr 2022 10:38:09 +0200
Subject: [PATCH 67/80] Bump bom-2.319.x from 1280.vd669827e38cd to
1289.v5c4b_1c43511b_ (#291)
Bumps [bom-2.319.x](https://github.com/jenkinsci/bom) from 1280.vd669827e38cd to 1289.v5c4b_1c43511b_.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.319.x
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 8e22dea5..e3772597 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.319.x
- 1280.vd669827e38cd
+ 1289.v5c4b_1c43511b_
pom
import
From dcc863121f366d34c068b269bb74d97efeeac864 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 29 Apr 2022 10:07:03 +0200
Subject: [PATCH 68/80] Bump bom-2.319.x from 1289.v5c4b_1c43511b_ to
1342.v729ca_3818e88 (#293)
Bumps [bom-2.319.x](https://github.com/jenkinsci/bom) from 1289.v5c4b_1c43511b_ to 1342.v729ca_3818e88.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.319.x
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index e3772597..579517bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.319.x
- 1289.v5c4b_1c43511b_
+ 1342.v729ca_3818e88
pom
import
From 2d13263f2986172772120b1b4d6af255c1391f43 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 9 May 2022 13:30:10 +0200
Subject: [PATCH 69/80] Bump jenkins-infra/jenkins-maven-cd-action from 1.2.0
to 1.3.0 (#296)
Bumps [jenkins-infra/jenkins-maven-cd-action](https://github.com/jenkins-infra/jenkins-maven-cd-action) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/jenkins-infra/jenkins-maven-cd-action/releases)
- [Commits](https://github.com/jenkins-infra/jenkins-maven-cd-action/compare/v1.2.0...v1.3.0)
---
updated-dependencies:
- dependency-name: jenkins-infra/jenkins-maven-cd-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/cd.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
index feb707ce..983bf1eb 100644
--- a/.github/workflows/cd.yaml
+++ b/.github/workflows/cd.yaml
@@ -52,7 +52,7 @@ jobs:
distribution: 'adopt'
java-version: 8
- name: Release
- uses: jenkins-infra/jenkins-maven-cd-action@v1.2.0
+ uses: jenkins-infra/jenkins-maven-cd-action@v1.3.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
From 796376b435b519e60b13f3016ccc2baa4d1019f0 Mon Sep 17 00:00:00 2001
From: Alex Earl
Date: Mon, 9 May 2022 04:31:35 -0700
Subject: [PATCH 70/80] Update information for Windows OpenSSH agents (#294)
This updates the description of the prefix/suffix commands for connecting to agents over SSH when Powershell is the default shell on the remote system.
---
doc/CONFIGURE.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/doc/CONFIGURE.md b/doc/CONFIGURE.md
index a4cf7930..a63fe304 100644
--- a/doc/CONFIGURE.md
+++ b/doc/CONFIGURE.md
@@ -226,13 +226,16 @@ See [SSH Build Agents and Cygwin](https://wiki.jenkins.io/display/JENKINS/SSH+sl
### Launch Windows agents using Microsoft OpenSSH
-The current version of the plugin does not run directly on PowerShell, you have to use prefix and suffix settings to trick the command and make it works, Windows 10 machines can run as SSH agents with the Microsoft OpenSSH server by using:
+The current version of the plugin does not run when Powershell is the default shell for the agent system. To connect to the agent you have to use prefix and suffix settings to trick the command and make it work, Windows 10/11 machines can run as SSH agents with the Microsoft OpenSSH server by using:
**Prefix Start Agent Command**
```
powershell -Command "cd C:\J\S ; C:\J\S\jdk\bin\java.exe -jar remoting.jar" ; exit 0 ; rem '
```
+
+`C:\J\S` is the path to the agent work directory on the agent system. If java is in a different directory, you will need to specify that directory instead of `C:\J\S\jdk\bin`.
+
**Suffix Start Agent Command**
```
From 87a762fdaa2c7e98808f2181f2176ebcf42bb9ab Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 10 May 2022 10:46:19 +0200
Subject: [PATCH 71/80] Bump jenkins-infra/interesting-category-action from
1.0.0 to 1.1.0 (#297)
Bumps [jenkins-infra/interesting-category-action](https://github.com/jenkins-infra/interesting-category-action) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/jenkins-infra/interesting-category-action/releases)
- [Commits](https://github.com/jenkins-infra/interesting-category-action/compare/v1.0.0...v1.1.0)
---
updated-dependencies:
- dependency-name: jenkins-infra/interesting-category-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/cd.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
index 983bf1eb..9d5dd257 100644
--- a/.github/workflows/cd.yaml
+++ b/.github/workflows/cd.yaml
@@ -31,7 +31,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check interesting categories
- uses: jenkins-infra/interesting-category-action@v1.0.0
+ uses: jenkins-infra/interesting-category-action@v1.1.0
id: interesting-categories
if: steps.verify-ci-status.outputs.result == 'success'
with:
From 1c7698dda8e12a5dd60523bf04d85ba0b80cb972 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 20 May 2022 16:39:27 +0200
Subject: [PATCH 72/80] Bump sshd from 3.228.v4c9f9e652c86 to
3.236.ved5e1b_cb_50b_2 (#300)
Bumps [sshd](https://github.com/jenkinsci/sshd-plugin) from 3.228.v4c9f9e652c86 to 3.236.ved5e1b_cb_50b_2.
- [Release notes](https://github.com/jenkinsci/sshd-plugin/releases)
- [Changelog](https://github.com/jenkinsci/sshd-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/sshd-plugin/commits)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.modules:sshd
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 579517bf..6e8075b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,7 +130,7 @@
org.jenkins-ci.modules
sshd
- 3.228.v4c9f9e652c86
+ 3.236.ved5e1b_cb_50b_2
test
From e0badc9e5902a3529edfc3d4e976471878b0fb52 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 23 May 2022 11:49:37 +0200
Subject: [PATCH 73/80] Bump sshd from 3.236.ved5e1b_cb_50b_2 to
3.237.v883d165a_c1d3 (#302)
Bumps [sshd](https://github.com/jenkinsci/sshd-plugin) from 3.236.ved5e1b_cb_50b_2 to 3.237.v883d165a_c1d3.
- [Release notes](https://github.com/jenkinsci/sshd-plugin/releases)
- [Changelog](https://github.com/jenkinsci/sshd-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/sshd-plugin/commits)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.modules:sshd
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6e8075b5..b2de117b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,7 +130,7 @@
org.jenkins-ci.modules
sshd
- 3.236.ved5e1b_cb_50b_2
+ 3.237.v883d165a_c1d3
test
From d834f8ac390e346ead9e9776046b14e12d9e9593 Mon Sep 17 00:00:00 2001
From: Tomasz Jarosik
Date: Mon, 13 Jun 2022 11:55:18 +0100
Subject: [PATCH 74/80] Fix deadlock when afterDisconnect is called during
launch() (#304)
Deadlock happens between:
(a) https://github.com/jenkinsci/ssh-slaves-plugin/blob/main/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L953
(b) https://github.com/jenkinsci/ssh-slaves-plugin/blob/main/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L413
Launch() is stuck here: https://github.com/jenkinsci/ssh-slaves-plugin/blob/main/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L486 ,
and `callable` is stuck waiting here: https://github.com/jenkinsci/trilead-ssh2/blob/8e7118e74deacd7ef044df9076fcb9b95280c163/src/com/trilead/ssh2/channel/FifoBuffer.java#L212
After some time `afterDisconnect` is called which initiates tear down process. Teardown process calls launcherExecutorService.shutdown()
(here: https://github.com/jenkinsci/ssh-slaves-plugin/blob/main/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L941) and continues to (a).
But because there is no writer writing to FifoBuffer, launch() never finishes and is stuck in (b), and because `shutdown()` only prevents new tasks being submitted
(https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ExecutorService.html) there is no one to interrupt lock.wait() in FifoBuffer, thus deadlock. The solutions is to use recommended way of shutting down ExecutorService from docs.
---
.../hudson/plugins/sshslaves/SSHLauncher.java | 37 +++++++++++++------
1 file changed, 26 insertions(+), 11 deletions(-)
diff --git a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
index 7e781f74..d7f56f14 100644
--- a/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
+++ b/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
@@ -505,11 +505,7 @@ public void launch(final SlaveComputer computer, final TaskListener listener) th
System.out.println(Messages.SSHLauncher_LaunchFailed(getTimestamp(),
nodeName, host));
} finally {
- ExecutorService srv = launcherExecutorService;
- if (srv != null) {
- srv.shutdownNow();
- launcherExecutorService = null;
- }
+ shutdownAndAwaitTerminationOfLauncher();
}
}
if (node != null && getTrackCredentials()) {
@@ -934,12 +930,7 @@ public void afterDisconnect(SlaveComputer slaveComputer, final TaskListener list
// Nothing to do here, the connection is not established
return;
}
-
- ExecutorService srv = launcherExecutorService;
- if (srv != null) {
- // If the service is still running, shut it down and interrupt the operations if any
- srv.shutdown();
- }
+ shutdownAndAwaitTerminationOfLauncher();
if (tearingDownConnection) {
// tear down operation is in progress, do not even try to synchronize the call.
@@ -982,6 +973,30 @@ private void tearDownConnectionImpl(@NonNull SlaveComputer slaveComputer, final
}
}
+ private void shutdownAndAwaitTerminationOfLauncher() {
+ ExecutorService srv = launcherExecutorService;
+ if (srv == null) {
+ return;
+ }
+ srv.shutdown(); // Disable new tasks from being submitted
+ launcherExecutorService = null;
+ try {
+ // Wait a while for existing tasks to terminate
+ if (!srv.awaitTermination(10, TimeUnit.SECONDS)) {
+ srv.shutdownNow(); // Cancel currently executing tasks
+ // Wait a while for tasks to respond to being cancelled
+ if (!srv.awaitTermination(10, TimeUnit.SECONDS)) {
+ LOGGER.log(WARNING, "launcherExecutorService thread pool did not terminate cleanly");
+ }
+ }
+ } catch (InterruptedException ie) {
+ // (Re-)Cancel if current thread also interrupted
+ srv.shutdownNow();
+ // Preserve interrupt status
+ Thread.currentThread().interrupt();
+ }
+ }
+
/**
* If the SSH connection as a whole is lost, report that information.
*/
From 2e09e60bcecee905c2dd2ddfff7ebe683d0b2a5c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 14 Jun 2022 10:04:25 +0200
Subject: [PATCH 75/80] Bump jenkins-infra/interesting-category-action from
1.1.0 to 1.2.0 (#305)
Bumps [jenkins-infra/interesting-category-action](https://github.com/jenkins-infra/interesting-category-action) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/jenkins-infra/interesting-category-action/releases)
- [Commits](https://github.com/jenkins-infra/interesting-category-action/compare/v1.1.0...v1.2.0)
---
updated-dependencies:
- dependency-name: jenkins-infra/interesting-category-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/cd.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
index 9d5dd257..2d96d859 100644
--- a/.github/workflows/cd.yaml
+++ b/.github/workflows/cd.yaml
@@ -31,7 +31,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check interesting categories
- uses: jenkins-infra/interesting-category-action@v1.1.0
+ uses: jenkins-infra/interesting-category-action@v1.2.0
id: interesting-categories
if: steps.verify-ci-status.outputs.result == 'success'
with:
From ee139c04bb1706e3ab4c2041cb813f20057f09ea Mon Sep 17 00:00:00 2001
From: Joseph Petersen
Date: Wed, 15 Jun 2022 16:55:11 +0200
Subject: [PATCH 76/80] chore: use jenkins infra maven cd reusable workflow
(#308)
---
.github/workflows/cd.yaml | 54 ++++-----------------------------------
1 file changed, 5 insertions(+), 49 deletions(-)
diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
index 2d96d859..0279984d 100644
--- a/.github/workflows/cd.yaml
+++ b/.github/workflows/cd.yaml
@@ -8,52 +8,8 @@ on:
- completed
jobs:
- validate:
- runs-on: ubuntu-latest
- outputs:
- should_release: ${{ steps.verify-ci-status.outputs.result == 'success' && steps.interesting-categories.outputs.interesting == 'true' }}
- steps:
- - name: Verify CI status
- uses: jenkins-infra/verify-ci-status-action@v1.2.0
- id: verify-ci-status
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- output_result: true
-
- - name: Release Drafter
- uses: release-drafter/release-drafter@v5
- if: steps.verify-ci-status.outputs.result == 'success'
- with:
- name: next
- tag: next
- version: next
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Check interesting categories
- uses: jenkins-infra/interesting-category-action@v1.2.0
- id: interesting-categories
- if: steps.verify-ci-status.outputs.result == 'success'
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- release:
- runs-on: ubuntu-latest
- needs: [validate]
- if: needs.validate.outputs.should_release == 'true'
- steps:
- - name: Check out
- uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Set up JDK 8
- uses: actions/setup-java@v3
- with:
- distribution: 'adopt'
- java-version: 8
- - name: Release
- uses: jenkins-infra/jenkins-maven-cd-action@v1.3.0
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
- MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
\ No newline at end of file
+ maven-cd:
+ uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1
+ secrets:
+ MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
+ MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
From 2e6629b7e1001b55eeec4c31098c686114ef2041 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 15 Jun 2022 16:55:30 +0200
Subject: [PATCH 77/80] Bump testcontainers from 1.17.1 to 1.17.2 (#301)
Bumps [testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.17.1 to 1.17.2.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.17.1...1.17.2)
---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index b2de117b..f7f17c18 100644
--- a/pom.xml
+++ b/pom.xml
@@ -158,7 +158,7 @@
org.testcontainers
testcontainers
- 1.17.1
+ 1.17.2
test
From a64c6e4f4731c1068d079572f013537d46f03c17 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 15 Jun 2022 16:55:40 +0200
Subject: [PATCH 78/80] Bump bom-2.319.x from 1342.v729ca_3818e88 to
1409.v7659b_c072f18 (#303)
Bumps [bom-2.319.x](https://github.com/jenkinsci/bom) from 1342.v729ca_3818e88 to 1409.v7659b_c072f18.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)
---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.319.x
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f7f17c18..cfde022b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
io.jenkins.tools.bom
bom-2.319.x
- 1342.v729ca_3818e88
+ 1409.v7659b_c072f18
pom
import
From 790b08541ff744f797c79135a4647d203110189f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 23 Jun 2022 17:40:25 +0200
Subject: [PATCH 79/80] Bump sshd from 3.237.v883d165a_c1d3 to
3.242.va_db_9da_b_26a_c3 (#310)
Bumps [sshd](https://github.com/jenkinsci/sshd-plugin) from 3.237.v883d165a_c1d3 to 3.242.va_db_9da_b_26a_c3.
- [Release notes](https://github.com/jenkinsci/sshd-plugin/releases)
- [Changelog](https://github.com/jenkinsci/sshd-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/sshd-plugin/commits)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.modules:sshd
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index cfde022b..30a8e783 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,7 +130,7 @@
org.jenkins-ci.modules
sshd
- 3.237.v883d165a_c1d3
+ 3.242.va_db_9da_b_26a_c3
test
From 3056dfb46e85374da4dc419fda68f7fb094ec953 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 27 Jun 2022 20:05:56 +0000
Subject: [PATCH 80/80] Bump plugin from 4.40 to 4.41
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.40 to 4.41.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.40...plugin-4.41)
---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
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 30a8e783..0aa459c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.jenkins-ci.plugins
plugin
- 4.40
+ 4.41
ssh-slaves