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 01/18] 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 02/18] 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 03/18] 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 04/18] 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 05/18] 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 06/18] 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 07/18] 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 08/18] 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 09/18] 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 10/18] 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 11/18] 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 12/18] 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 13/18] 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 14/18] 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 15/18] 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 16/18] 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 17/18] 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 88b623088fa69dd864b5246803679303d1a20ea0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Apr 2022 20:04:07 +0000 Subject: [PATCH 18/18] Bump testcontainers from 1.16.3 to 1.17.1 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] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 39698d47..0f07813c 100644 --- a/pom.xml +++ b/pom.xml @@ -158,7 +158,7 @@ org.testcontainers testcontainers - 1.16.3 + 1.17.1 test