From 361666926cf26302b1e1bda2e2e9347bedd01f84 Mon Sep 17 00:00:00 2001 From: Jenkins Release Bot <66998184+jenkins-release-bot@users.noreply.github.com> Date: Tue, 10 May 2022 15:21:46 +0000 Subject: [PATCH 01/16] [maven-release-plugin] prepare release jenkins-2.347 --- bom/pom.xml | 2 +- cli/pom.xml | 2 +- core/pom.xml | 2 +- coverage/pom.xml | 2 +- pom.xml | 4 ++-- test/pom.xml | 2 +- war/pom.xml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bom/pom.xml b/bom/pom.xml index cf75ee27e20e..83ec85088504 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -28,7 +28,7 @@ THE SOFTWARE. org.jenkins-ci.main jenkins-parent - ${revision}${changelist} + 2.347 jenkins-bom diff --git a/cli/pom.xml b/cli/pom.xml index 2bfaf2dd6a86..a902ab99c7e4 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.main jenkins-parent - ${revision}${changelist} + 2.347 cli diff --git a/core/pom.xml b/core/pom.xml index bf1b35b11045..ee6910dff382 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -29,7 +29,7 @@ THE SOFTWARE. org.jenkins-ci.main jenkins-parent - ${revision}${changelist} + 2.347 jenkins-core diff --git a/coverage/pom.xml b/coverage/pom.xml index 9f27c8d11cf0..8b97b4b597e8 100644 --- a/coverage/pom.xml +++ b/coverage/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.main jenkins-parent - ${revision}${changelist} + 2.347 jenkins-coverage diff --git a/pom.xml b/pom.xml index d712bb28a456..8454429338d1 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ THE SOFTWARE. org.jenkins-ci.main jenkins-parent - ${revision}${changelist} + 2.347 pom Jenkins main module @@ -61,7 +61,7 @@ THE SOFTWARE. scm:git:https://github.com/jenkinsci/jenkins.git scm:git:git@github.com:jenkinsci/jenkins.git - ${scmTag} + jenkins-2.347 https://github.com/jenkinsci/jenkins diff --git a/test/pom.xml b/test/pom.xml index 5e61a138da45..612654b978d7 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -28,7 +28,7 @@ THE SOFTWARE. org.jenkins-ci.main jenkins-parent - ${revision}${changelist} + 2.347 jenkins-test diff --git a/war/pom.xml b/war/pom.xml index dcdf9ebb993c..94d3b32357ba 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -28,7 +28,7 @@ THE SOFTWARE. org.jenkins-ci.main jenkins-parent - ${revision}${changelist} + 2.347 jenkins-war From eb997ae74d74bdd93d131b79ed8adfb2b33942f2 Mon Sep 17 00:00:00 2001 From: Jenkins Release Bot <66998184+jenkins-release-bot@users.noreply.github.com> Date: Tue, 10 May 2022 15:22:06 +0000 Subject: [PATCH 02/16] [maven-release-plugin] prepare for next development iteration --- bom/pom.xml | 2 +- cli/pom.xml | 2 +- core/pom.xml | 2 +- coverage/pom.xml | 2 +- pom.xml | 6 +++--- test/pom.xml | 2 +- war/pom.xml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bom/pom.xml b/bom/pom.xml index 83ec85088504..cf75ee27e20e 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -28,7 +28,7 @@ THE SOFTWARE. org.jenkins-ci.main jenkins-parent - 2.347 + ${revision}${changelist} jenkins-bom diff --git a/cli/pom.xml b/cli/pom.xml index a902ab99c7e4..2bfaf2dd6a86 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.main jenkins-parent - 2.347 + ${revision}${changelist} cli diff --git a/core/pom.xml b/core/pom.xml index ee6910dff382..bf1b35b11045 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -29,7 +29,7 @@ THE SOFTWARE. org.jenkins-ci.main jenkins-parent - 2.347 + ${revision}${changelist} jenkins-core diff --git a/coverage/pom.xml b/coverage/pom.xml index 8b97b4b597e8..9f27c8d11cf0 100644 --- a/coverage/pom.xml +++ b/coverage/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.main jenkins-parent - 2.347 + ${revision}${changelist} jenkins-coverage diff --git a/pom.xml b/pom.xml index 8454429338d1..5f795a6b8ab9 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ THE SOFTWARE. org.jenkins-ci.main jenkins-parent - 2.347 + ${revision}${changelist} pom Jenkins main module @@ -61,7 +61,7 @@ THE SOFTWARE. scm:git:https://github.com/jenkinsci/jenkins.git scm:git:git@github.com:jenkinsci/jenkins.git - jenkins-2.347 + ${scmTag} https://github.com/jenkinsci/jenkins @@ -71,7 +71,7 @@ THE SOFTWARE. - 2.347 + 2.348 -SNAPSHOT - + From f5eee7dcb4783cf9d6469ee17aae31acb5962885 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Wed, 11 May 2022 10:08:07 -0700 Subject: [PATCH 07/16] Move Checkstyle configuration to a separate file (#6552) --- pom.xml | 152 +------------------- src/checkstyle/checkstyle-configuration.xml | 150 +++++++++++++++++++ 2 files changed, 151 insertions(+), 151 deletions(-) create mode 100644 src/checkstyle/checkstyle-configuration.xml diff --git a/pom.xml b/pom.xml index 5f795a6b8ab9..1a4a24f983cf 100644 --- a/pom.xml +++ b/pom.xml @@ -399,157 +399,7 @@ THE SOFTWARE. true true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ${maven.multiModuleProjectDirectory}/src/checkstyle/checkstyle-configuration.xml diff --git a/src/checkstyle/checkstyle-configuration.xml b/src/checkstyle/checkstyle-configuration.xml new file mode 100644 index 000000000000..5ad876ef8bdb --- /dev/null +++ b/src/checkstyle/checkstyle-configuration.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 23c5cee13ce3bd79e021af301500c1f4f823a37e Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Thu, 12 May 2022 08:54:39 -0700 Subject: [PATCH 08/16] [JENKINS-68492] `javadoc:javadoc` can no longer be executed with `install` (#6560) --- pom.xml | 1 + src/checkstyle/checkstyle-suppressions.xml | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 src/checkstyle/checkstyle-suppressions.xml diff --git a/pom.xml b/pom.xml index 1a4a24f983cf..4c14da242dea 100644 --- a/pom.xml +++ b/pom.xml @@ -400,6 +400,7 @@ THE SOFTWARE. true true ${maven.multiModuleProjectDirectory}/src/checkstyle/checkstyle-configuration.xml + ${maven.multiModuleProjectDirectory}/src/checkstyle/checkstyle-suppressions.xml diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml new file mode 100644 index 000000000000..6699de930d0a --- /dev/null +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + From f2a396933ce8d6b59ba01c538f5a28220f7c2c31 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Thu, 12 May 2022 10:40:24 -0600 Subject: [PATCH 09/16] [JENKINS-68200] Winstone 5.25 - Bump Jetty from 9.4.45.v20220203 to 9.4.46.v20220331 (#6558) --- war/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/war/pom.xml b/war/pom.xml index dcdf9ebb993c..bf000697debd 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -162,7 +162,7 @@ THE SOFTWARE. org.jenkins-ci winstone - 5.24 + 5.25 test @@ -509,7 +509,7 @@ THE SOFTWARE. org.eclipse.jetty jetty-maven-plugin - 9.4.45.v20220203 + 9.4.46.v20220331 -
java${it.launcher.vmargs == null ? '' : ' ' + it.launcher.vmargs} -jar agent.jar -jnlpUrl ${h.inferHudsonURL(request)}${it.url}jenkins-agent.jnlp -secret ${it.jnlpMac} ${it.launcher.getWorkDirOptions(it)}
+
curl -sO ${jenkinsURL}jnlpJars/agent.jar
+java -jar agent.jar -jnlpUrl ${jenkinsURL}${it.url}jenkins-agent.jnlp -secret ${it.jnlpMac} ${it.launcher.getWorkDirOptions(it)}

- ${%Run from agent command line, with the secret stored in a file:} + ${%Or run from agent command line, with the secret stored in a file:}

echo ${it.jnlpMac} > secret-file
-java${it.launcher.vmargs == null ? '' : ' ' + it.launcher.vmargs} -jar agent.jar -jnlpUrl ${h.inferHudsonURL(request)}${it.url}jenkins-agent.jnlp -secret @secret-file ${it.launcher.getWorkDirOptions(it)}
- +curl -sO ${jenkinsURL}jnlpJars/agent.jar +java -jar agent.jar -jnlpUrl ${jenkinsURL}${it.url}jenkins-agent.jnlp -secret @secret-file ${it.launcher.getWorkDirOptions(it)}
- -
diff --git a/core/src/main/resources/hudson/slaves/SlaveComputer/jenkins-agent.jnlp.jelly b/core/src/main/resources/hudson/slaves/SlaveComputer/jenkins-agent.jnlp.jelly index 22b7a562448e..e8053df3cedd 100644 --- a/core/src/main/resources/hudson/slaves/SlaveComputer/jenkins-agent.jnlp.jelly +++ b/core/src/main/resources/hudson/slaves/SlaveComputer/jenkins-agent.jnlp.jelly @@ -27,40 +27,11 @@ THE SOFTWARE. - - - - - - - Agent for ${it.displayName} - Jenkins project - - - - - - - + + - - - - - - - - - - - - - - + ${it.jnlpMac} ${it.node.nodeName} diff --git a/core/src/test/java/jenkins/RemotingJarSignatureTest.java b/core/src/test/java/jenkins/RemotingJarSignatureTest.java deleted file mode 100644 index a0d37e09a208..000000000000 --- a/core/src/test/java/jenkins/RemotingJarSignatureTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package jenkins; - -import static org.junit.Assert.assertNotNull; - -import hudson.remoting.Channel; -import hudson.remoting.Which; -import java.io.File; -import java.util.Enumeration; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import org.apache.commons.io.IOUtils; -import org.apache.commons.io.output.NullOutputStream; -import org.junit.Test; - -/** - * @author Kohsuke Kawaguchi - */ -public class RemotingJarSignatureTest { - /** - * Makes sure that the remoting jar is properly signed. - */ - @Test - public void testSignature() throws Exception { - File jar = Which.jarFile(Channel.class); - System.out.println("Verifying " + jar); - - JarFile myJar = new JarFile(jar, true); - - Enumeration entries = myJar.entries(); - while (entries.hasMoreElements()) { - JarEntry entry = entries.nextElement(); - if (entry.isDirectory()) continue; - - // unsigned files that are related to signatures - String name = entry.getName(); - if (name.equals("META-INF/MANIFEST.MF")) continue; - if (name.startsWith("META-INF/") && name.endsWith(".SF")) continue; - if (name.startsWith("META-INF/") && name.endsWith(".RSA")) continue; - if (name.startsWith("META-INF/") && name.endsWith(".DSA")) continue; - - // make sure bits are signed - IOUtils.copy(myJar.getInputStream(entry), NullOutputStream.NULL_OUTPUT_STREAM); - assertNotNull("No signature for " + name, entry.getCodeSigners()); - } - } -} diff --git a/pom.xml b/pom.xml index cea4dc7c95dd..78ed55665897 100644 --- a/pom.xml +++ b/pom.xml @@ -90,7 +90,7 @@ THE SOFTWARE. https://www.jenkins.io/changelog - 4.13 + 4.14 3.14 diff --git a/test/pom.xml b/test/pom.xml index e47c401ef355..d65a26019650 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -178,13 +178,6 @@ THE SOFTWARE. 318.va_f3ccb_729b_71 test - - - org.jvnet.hudson - netx - 0.5-hudson-2 - test - org.mockito mockito-inline diff --git a/test/src/test/java/hudson/slaves/JNLPLauncherTest.java b/test/src/test/java/hudson/slaves/JNLPLauncherTest.java index f10e32060724..87378f6822ff 100644 --- a/test/src/test/java/hudson/slaves/JNLPLauncherTest.java +++ b/test/src/test/java/hudson/slaves/JNLPLauncherTest.java @@ -40,9 +40,9 @@ import hudson.model.Node; import hudson.model.Node.Mode; import hudson.model.Slave; +import hudson.remoting.Launcher; import hudson.remoting.Which; import hudson.util.ArgumentListBuilder; -import java.awt.GraphicsEnvironment; import java.io.File; import java.util.ArrayList; import java.util.List; @@ -50,8 +50,6 @@ import java.util.logging.Level; import jenkins.security.SlaveToMasterCallable; import jenkins.slaves.RemotingWorkDirSettings; -import netx.jnlp.runtime.JNLPRuntime; -import org.junit.Assume; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -60,7 +58,6 @@ import org.jvnet.hudson.test.JenkinsRule; import org.jvnet.hudson.test.LoggerRule; import org.jvnet.hudson.test.SmokeTest; -import org.jvnet.hudson.test.TestExtension; import org.jvnet.hudson.test.recipes.LocalData; /** @@ -80,8 +77,6 @@ public class JNLPLauncherTest { */ @Test public void testLaunch() throws Exception { - Assume.assumeFalse("Skipping JNLPLauncherTest.testLaunch because we are running headless", GraphicsEnvironment.isHeadless()); - Computer c = addTestAgent(false); launchJnlpAndVerify(c, buildJnlpArgs(c)); } @@ -92,7 +87,6 @@ public void testLaunch() throws Exception { @Test @Issue("JENKINS-39370") public void testLaunchWithWorkDir() throws Exception { - Assume.assumeFalse("Skipping JNLPLauncherTest.testLaunch because we are running headless", GraphicsEnvironment.isHeadless()); File workDir = tmpDir.newFolder("workDir"); Computer c = addTestAgent(false); @@ -100,39 +94,6 @@ public void testLaunchWithWorkDir() throws Exception { assertTrue("Remoting work dir should have been created", new File(workDir, "remoting").exists()); } - /** - * Tests the '-headless' option. - * (Although this test doesn't really assert that the agent really is running in a headless mode.) - */ - @Test - public void testHeadlessLaunch() throws Exception { - Computer c = addTestAgent(false); - launchJnlpAndVerify(c, buildJnlpArgs(c).add("-arg", "-headless")); - // make sure that onOffline gets called just the right number of times - assertEquals(1, ComputerListener.all().get(ListenerImpl.class).offlined); - } - - @Test - @Issue("JENKINS-44112") - public void testHeadlessLaunchWithWorkDir() throws Exception { - Assume.assumeFalse("Skipping JNLPLauncherTest.testLaunch because we are running headless", GraphicsEnvironment.isHeadless()); - - Computer c = addTestAgent(true); - launchJnlpAndVerify(c, buildJnlpArgs(c).add("-arg", "-headless")); - assertEquals(1, ComputerListener.all().get(ListenerImpl.class).offlined); - } - - @Test - @Issue("JENKINS-39370") - public void testHeadlessLaunchWithCustomWorkDir() throws Exception { - Assume.assumeFalse("Skipping JNLPLauncherTest.testLaunch because we are running headless", GraphicsEnvironment.isHeadless()); - File workDir = tmpDir.newFolder("workDir"); - - Computer c = addTestAgent(false); - launchJnlpAndVerify(c, buildJnlpArgs(c).add("-arg", "-headless", "-workDir", workDir.getAbsolutePath())); - assertEquals(1, ComputerListener.all().get(ListenerImpl.class).offlined); - } - @Test @LocalData @Issue("JENKINS-44112") @@ -160,7 +121,6 @@ public void testDefaults() { @Test @Issue("JENKINS-47056") public void testDelegatingComputerLauncher() throws Exception { - Assume.assumeFalse("Skipping JNLPLauncherTest.testDelegatingComputerLauncher because we are running headless", GraphicsEnvironment.isHeadless()); File workDir = tmpDir.newFolder("workDir"); ComputerLauncher launcher = new JNLPLauncher("", "", new RemotingWorkDirSettings(false, workDir.getAbsolutePath(), "internalDir", false)); @@ -173,7 +133,6 @@ public void testDelegatingComputerLauncher() throws Exception { @Test @Issue("JENKINS-47056") public void testComputerLauncherFilter() throws Exception { - Assume.assumeFalse("Skipping JNLPLauncherTest.testComputerLauncherFilter because we are running headless", GraphicsEnvironment.isHeadless()); File workDir = tmpDir.newFolder("workDir"); ComputerLauncher launcher = new JNLPLauncher("", "", new RemotingWorkDirSettings(false, workDir.getAbsolutePath(), "internalDir", false)); @@ -183,17 +142,6 @@ public void testComputerLauncherFilter() throws Exception { assertTrue("Remoting work dir should have been created", new File(workDir, "internalDir").exists()); } - @TestExtension("testHeadlessLaunch") - public static class ListenerImpl extends ComputerListener { - int offlined = 0; - - @Override - public void onOffline(Computer c) { - offlined++; - assertTrue(c.isOffline()); - } - } - private static class DelegatingComputerLauncherImpl extends DelegatingComputerLauncher { DelegatingComputerLauncherImpl(ComputerLauncher launcher) { super(launcher); @@ -209,10 +157,8 @@ private static class ComputerLauncherFilterImpl extends ComputerLauncherFilter { private ArgumentListBuilder buildJnlpArgs(Computer c) throws Exception { ArgumentListBuilder args = new ArgumentListBuilder(); args.add(new File(new File(System.getProperty("java.home")), "bin/java").getPath(), "-jar"); - args.add(Which.jarFile(JNLPRuntime.class).getAbsolutePath()); - args.add("-headless", "-basedir"); - args.add(j.createTmpDir()); - args.add("-nosecurity", "-jnlp", j.getURL() + "computer/" + c.getName() + "/jenkins-agent.jnlp"); + args.add(Which.jarFile(Launcher.class).getAbsolutePath()); + args.add("-jnlpUrl", j.getURL() + "computer/" + c.getName() + "/jenkins-agent.jnlp"); if (c instanceof SlaveComputer) { SlaveComputer sc = (SlaveComputer) c; @@ -288,14 +234,14 @@ public String call() { @Test public void testConfigRoundtrip() throws Exception { DumbSlave s = j.createSlave(); - JNLPLauncher original = new JNLPLauncher("a", "b"); + JNLPLauncher original = new JNLPLauncher("a"); s.setLauncher(original); j.assertEqualDataBoundBeans(((JNLPLauncher) s.getLauncher()).getWorkDirSettings(), RemotingWorkDirSettings.getEnabledDefaults()); RemotingWorkDirSettings custom = new RemotingWorkDirSettings(false, null, "custom", false); ((JNLPLauncher) s.getLauncher()).setWorkDirSettings(custom); HtmlPage p = j.createWebClient().getPage(s, "configure"); j.submit(p.getFormByName("config")); - j.assertEqualBeans(original, s.getLauncher(), "tunnel,vmargs"); + j.assertEqualBeans(original, s.getLauncher(), "tunnel"); j.assertEqualDataBoundBeans(((JNLPLauncher) s.getLauncher()).getWorkDirSettings(), custom); } diff --git a/test/src/test/java/jenkins/agents/WebSocketAgentsTest.java b/test/src/test/java/jenkins/agents/WebSocketAgentsTest.java index d26883f5a28a..7d786c8bebac 100644 --- a/test/src/test/java/jenkins/agents/WebSocketAgentsTest.java +++ b/test/src/test/java/jenkins/agents/WebSocketAgentsTest.java @@ -80,8 +80,7 @@ public class WebSocketAgentsTest { * Verify basic functionality of an agent in {@code -webSocket} mode. * Requires {@code remoting} to have been {@code mvn install}ed. * Does not show {@code FINE} or lower agent logs ({@link JenkinsRule#showAgentLogs(Slave, LoggerRule)} cannot be used here). - * Unlike {@link hudson.slaves.JNLPLauncherTest} this does not use {@code javaws}; - * closer to {@link hudson.bugs.JnlpAccessWithSecuredHudsonTest}. + * Related to {@link hudson.slaves.JNLPLauncherTest} (also see closer to {@link hudson.bugs.JnlpAccessWithSecuredHudsonTest}). * @see hudson.remoting.Launcher */ @SuppressWarnings("ResultOfMethodCallIgnored") diff --git a/war/pom.xml b/war/pom.xml index bf000697debd..33247ac395ba 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -100,26 +100,6 @@ THE SOFTWARE. org.jenkins-ci.modules instance-identity - - org.jenkins-ci.modules - launchd-slave-installer - - - org.jenkins-ci.modules - slave-installer - - - org.jenkins-ci.modules - systemd-slave-installer - - - org.jenkins-ci.modules - upstart-slave-installer - - - org.jenkins-ci.modules - windows-slave-installer -