-
-
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
[JENKINS-64746] public API hudson.model.UpdateCenter.HudsonUpgradeJob constructor signature change #5216
[JENKINS-64746] public API hudson.model.UpdateCenter.HudsonUpgradeJob constructor signature change #5216
Changes from 4 commits
f08a336
6db0fd1
5626cbd
e869e3c
a015546
5293a6f
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 | ||||
---|---|---|---|---|---|---|
|
@@ -2111,6 +2111,14 @@ public InstallationJob(Plugin plugin, UpdateSite site, Authentication auth) { | |||||
this(plugin,site,auth,false); | ||||||
} | ||||||
|
||||||
/** | ||||||
* @deprecated use {@link InstallationJob(Plugin, UpdateSite, Authentication, boolean)} | ||||||
*/ | ||||||
@Deprecated | ||||||
public InstallationJob(Plugin plugin, UpdateSite site, org.acegisecurity.Authentication auth, boolean dynamicLoad) { | ||||||
this(plugin, site, auth.toSpring(), dynamicLoad); | ||||||
} | ||||||
|
||||||
public InstallationJob(Plugin plugin, UpdateSite site, Authentication auth, boolean dynamicLoad) { | ||||||
super(site, auth); | ||||||
this.plugin = plugin; | ||||||
|
@@ -2326,6 +2334,15 @@ public final class PluginDowngradeJob extends DownloadJob { | |||||
|
||||||
private final PluginManager pm = Jenkins.get().getPluginManager(); | ||||||
|
||||||
/** | ||||||
* @deprecated use {@link PluginDowngradeJob(Plugin, UpdateSite, Authentication)} | ||||||
*/ | ||||||
@Deprecated | ||||||
public PluginDowngradeJob(Plugin plugin, UpdateSite site, org.acegisecurity.Authentication auth) { | ||||||
this(plugin, site, auth.toSpring()); | ||||||
} | ||||||
|
||||||
|
||||||
public PluginDowngradeJob(Plugin plugin, UpdateSite site, Authentication auth) { | ||||||
super(site, auth); | ||||||
this.plugin = plugin; | ||||||
|
@@ -2410,6 +2427,15 @@ public String toString() { | |||||
* Represents the state of the upgrade activity of Jenkins core. | ||||||
*/ | ||||||
public final class HudsonUpgradeJob extends DownloadJob { | ||||||
|
||||||
/** | ||||||
* @deprecated use {@link HudsonUpgradeJob(UpdateSite site, Authentication auth)} | ||||||
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.
Suggested change
How is this not a build failure? Hmm… |
||||||
*/ | ||||||
@Deprecated | ||||||
jglick marked this conversation as resolved.
Show resolved
Hide resolved
jglick marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
public HudsonUpgradeJob(UpdateSite site, org.acegisecurity.Authentication auth) { | ||||||
super(site, auth.toSpring()); | ||||||
} | ||||||
|
||||||
public HudsonUpgradeJob(UpdateSite site, Authentication auth) { | ||||||
super(site, auth); | ||||||
} | ||||||
|
@@ -2444,6 +2470,15 @@ protected void replace(File dst, File src) throws IOException { | |||||
} | ||||||
|
||||||
public final class HudsonDowngradeJob extends DownloadJob { | ||||||
|
||||||
/** | ||||||
* @deprecated use {@link HudsonDowngradeJob(UpdateSite site, Authentication auth)} | ||||||
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.
Suggested change
|
||||||
*/ | ||||||
@Deprecated | ||||||
public HudsonDowngradeJob(UpdateSite site, org.acegisecurity.Authentication auth) { | ||||||
super(site, auth.toSpring()); | ||||||
} | ||||||
|
||||||
public HudsonDowngradeJob(UpdateSite site, Authentication auth) { | ||||||
super(site, auth); | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -30,6 +30,7 @@ | |||
import java.util.Map; | ||||
import java.util.UUID; | ||||
|
||||
import hudson.security.ACL; | ||||
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.
Suggested change
|
||||
import org.junit.After; | ||||
import org.junit.Assert; | ||||
import org.junit.Before; | ||||
|
@@ -180,7 +181,7 @@ else if("Installing".equals(statusType)) { | |||
json.put("dependencies", new JSONArray()); | ||||
Plugin p = new Plugin(getId(), json); | ||||
|
||||
InstallationJob job = new InstallationJob(p, null, null, false); | ||||
InstallationJob job = new InstallationJob(p, null, ACL.SYSTEM2, false); | ||||
escoem marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
job.status = status; | ||||
job.setCorrelationId(UUID.randomUUID()); // this indicates the plugin was 'directly selected' | ||||
updates.add(job); | ||||
|
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.
Would also be polite to add
@since 2.266
for the Spring overloads.