-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JEP-230] [JENKINS-55582] Convert instance-identity
to a detached plugin
#6585
Changes from 11 commits
d5cdafe
cf4d77c
70f6bf2
1ed16c0
a3cd19a
ab04b07
5eb2e05
f6af760
d96d64b
da0fd2d
3b263bc
a8c46f1
fb2908c
83fbe36
4205138
14c075b
ecd8400
6192c7e
46d571a
1b55251
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,10 @@ jaxb 2.163 2.3.0 | |
trilead-api 2.184 1.0.4 | ||
|
||
# JENKINS-64107 | ||
sshd 2.281 3.0.1 | ||
sshd 2.281 3.236.ved5e1b_cb_50b_2 | ||
|
||
javax-activation-api 2.330 1.2.0-2 | ||
javax-mail-api 2.330 1.6.2-5 | ||
|
||
# JENKINS-55582 | ||
instance-identity 2.348 3.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: split point may need to be updated just before merge. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (have been trying to keep this up to date when merging in |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright 2022 CloudBees, Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
package hudson.slaves; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.is; | ||
|
||
import hudson.ExtensionList; | ||
import hudson.PluginWrapper; | ||
import hudson.model.FreeStyleBuild; | ||
import hudson.model.FreeStyleProject; | ||
import hudson.model.Slave; | ||
import hudson.util.FormValidation; | ||
import jenkins.slaves.JnlpSlaveAgentProtocol4; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.Description; | ||
import org.junit.runners.model.Statement; | ||
import org.jvnet.hudson.test.For; | ||
import org.jvnet.hudson.test.InboundAgentRule; | ||
import org.jvnet.hudson.test.Issue; | ||
import org.jvnet.hudson.test.JenkinsRule; | ||
import org.jvnet.hudson.test.RealJenkinsRule; | ||
|
||
@For({JNLPLauncher.class, JnlpSlaveAgentProtocol4.class}) | ||
public class JNLPLauncherRealTest { | ||
|
||
@Rule public RealJenkinsRule rr = new RealJenkinsRule().includeTestClasspathPlugins(false); | ||
|
||
@Issue("JEP-230") | ||
@Test public void smokes() throws Throwable { | ||
/* Since RealJenkinsRuleInit.jpi will load detached plugins, to reproduce a failure use: | ||
FileUtils.touch(new File(rr.getHome(), "plugins/instance-identity.jpi.disabled")); | ||
*/ | ||
rr.then(JNLPLauncherRealTest::_smokes); | ||
} | ||
|
||
private static void _smokes(JenkinsRule r) throws Throwable { | ||
InboundAgentRule inboundAgents = new InboundAgentRule(); // cannot use @Rule since it would not be accessible from the controller JVM | ||
inboundAgents.apply(new Statement() { | ||
@Override public void evaluate() throws Throwable { | ||
for (PluginWrapper plugin : r.jenkins.pluginManager.getPlugins()) { | ||
System.err.println(plugin + " active=" + plugin.isActive() + " enabled=" + plugin.isEnabled()); | ||
} | ||
assertThat(ExtensionList.lookupSingleton(JNLPLauncher.DescriptorImpl.class).doCheckWebSocket(false, null).kind, is(FormValidation.Kind.OK)); | ||
Slave agent = inboundAgents.createAgent(r, "static"); | ||
FreeStyleProject p = r.createFreeStyleProject(); | ||
p.setAssignedNode(agent); | ||
FreeStyleBuild b = r.buildAndAssertSuccess(p); | ||
System.err.println(JenkinsRule.getLog(b)); | ||
} | ||
}, Description.EMPTY).evaluate(); | ||
|
||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,10 +96,6 @@ THE SOFTWARE. | |
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.modules</groupId> | ||
<artifactId>instance-identity</artifactId> | ||
</dependency> | ||
<dependency> | ||
<!-- | ||
We bundle slf4j binding since we got some components (sshd for example) | ||
|
@@ -399,7 +395,7 @@ THE SOFTWARE. | |
<artifactItem> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>bouncycastle-api</artifactId> | ||
<version>2.25</version> | ||
<version>2.26</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dep of current |
||
<type>hpi</type> | ||
</artifactItem> | ||
<artifactItem> | ||
|
@@ -423,7 +419,7 @@ THE SOFTWARE. | |
<artifactItem> | ||
<groupId>org.jenkins-ci.modules</groupId> | ||
<artifactId>sshd</artifactId> | ||
<version>3.0.3</version> | ||
<version>3.236.ved5e1b_cb_50b_2</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<type>hpi</type> | ||
</artifactItem> | ||
<artifactItem> | ||
|
@@ -444,6 +440,12 @@ THE SOFTWARE. | |
<version>1.6.2-5</version> | ||
<type>hpi</type> | ||
</artifactItem> | ||
<artifactItem> | ||
<groupId>org.jenkins-ci.modules</groupId> | ||
<artifactId>instance-identity</artifactId> | ||
<version>3.1</version> | ||
<type>hpi</type> | ||
</artifactItem> | ||
</artifactItems> | ||
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/detached-plugins</outputDirectory> | ||
<stripVersion>true</stripVersion> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this is released,
bom-weekly
can get it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though if I understand correctly from jenkinsci/bom#671 jenkinsci/bom#570 (comment) jenkinsci/bom#681, it cannot be added until this PR is in the oldest supported line, so that will be a while. In the meantime the handful of plugins using this dep can specify 3.1.