diff --git a/changelog.html b/changelog.html index 5b3bb3bde1a995d893173a7ce4ee2d9902a6211d..a8f6ed04e20172c6f3f121ec78314de9f3c007a2 100644 --- a/changelog.html +++ b/changelog.html @@ -61,6 +61,9 @@ Upcoming changes
  • Support the range notation for pagination in API (issue 23228) +
  • + API changes allowing new job types to use SCM plugins. + (issue 23365)
  • API changes allowing to create nested launchers (DecoratedLauncher) (issue 19454) diff --git a/core/src/main/java/hudson/model/Cause.java b/core/src/main/java/hudson/model/Cause.java index 0e2113247b53bc6fe61934b6743ce6624abe72e8..e07b4107c70bd856577cc297d41c318df8a6a57f 100644 --- a/core/src/main/java/hudson/model/Cause.java +++ b/core/src/main/java/hudson/model/Cause.java @@ -71,7 +71,7 @@ public abstract class Cause { /** * Called when the cause is registered. - * @since TODO + * @since 1.568 */ public void onAddedTo(@Nonnull Run build) { if (build instanceof AbstractBuild) { @@ -90,7 +90,7 @@ public abstract class Cause { * Called when a build is loaded from disk. * Useful in case the cause needs to keep a build reference; * this ought to be {@code transient}. - * @since TODO + * @since 1.568 */ public void onLoad(@Nonnull Run build) { if (build instanceof AbstractBuild) { diff --git a/core/src/main/java/hudson/model/listeners/SCMListener.java b/core/src/main/java/hudson/model/listeners/SCMListener.java index b2f56a8f411b4228ad7e7d58cbe5b5908c28ad54..e9c9713c04b6cb48adefc66d3ce1eb028922b8ab 100644 --- a/core/src/main/java/hudson/model/listeners/SCMListener.java +++ b/core/src/main/java/hudson/model/listeners/SCMListener.java @@ -63,7 +63,7 @@ public abstract class SCMListener implements ExtensionPoint { * Should be called immediately after {@link SCM#checkout(Run, Launcher, FilePath, TaskListener, File)} is called. * @param pollingBaseline information about what actually was checked out, if that is available, and this checkout is intended to be included in the build’s polling (if it does any at all) * @throws Exception if the checkout should be considered failed - * @since TODO + * @since 1.568 */ public void onCheckout(Run build, SCM scm, FilePath workspace, TaskListener listener, @CheckForNull File changelogFile, @CheckForNull SCMRevisionState pollingBaseline) throws Exception {} @@ -106,6 +106,7 @@ public abstract class SCMListener implements ExtensionPoint { * @throws Exception * If any exception is thrown from this method, it will be recorded * and causes the build to fail. + * @since 1.568 */ public void onChangeLogParsed(Run build, SCM scm, TaskListener listener, ChangeLogSet changelog) throws Exception { if (build instanceof AbstractBuild && listener instanceof BuildListener && Util.isOverridden(SCMListener.class, getClass(), "onChangeLogParsed", AbstractBuild.class, BuildListener.class, ChangeLogSet.class)) { @@ -118,6 +119,9 @@ public abstract class SCMListener implements ExtensionPoint { onChangeLogParsed((Run) build, build.getProject().getScm(), listener, changelog); } + /** + * @since 1.568 + */ @SuppressWarnings("deprecation") public static Collection all() { Jenkins j = Jenkins.getInstance(); diff --git a/core/src/main/java/hudson/scm/AbstractScmTagAction.java b/core/src/main/java/hudson/scm/AbstractScmTagAction.java index 076824b4368236c66fdc83a5b244be9dccbdc251..c098427ac6de87bf52cdef32b23ab18010a6e8fe 100644 --- a/core/src/main/java/hudson/scm/AbstractScmTagAction.java +++ b/core/src/main/java/hudson/scm/AbstractScmTagAction.java @@ -52,6 +52,9 @@ public abstract class AbstractScmTagAction extends TaskAction implements BuildBa @Deprecated protected transient /*final*/ AbstractBuild build; + /** + * @since 1.568 + */ protected AbstractScmTagAction(Run run) { this.run = run; this.build = run instanceof AbstractBuild ? (AbstractBuild) run : null; @@ -74,6 +77,9 @@ public abstract class AbstractScmTagAction extends TaskAction implements BuildBa return SCM.TAG; } + /** + * @since 1.568 + */ public Run getRun() { return run; } diff --git a/core/src/main/java/hudson/scm/ChangeLogAnnotator.java b/core/src/main/java/hudson/scm/ChangeLogAnnotator.java index 80a40d4b946c540fd23c28ffe29d17f355ed4851..3a28a37977716c6593a41c406789b692c4a5d2b0 100644 --- a/core/src/main/java/hudson/scm/ChangeLogAnnotator.java +++ b/core/src/main/java/hudson/scm/ChangeLogAnnotator.java @@ -76,6 +76,7 @@ public abstract class ChangeLogAnnotator implements ExtensionPoint { * are registered, the object may already contain some markups when this * method is invoked. Never null. {@link MarkupText#getText()} on this instance * will return the same string as {@link Entry#getMsgEscaped()}. + * @since 1.568 */ public void annotate(Run build, Entry change, MarkupText text) { if (build instanceof AbstractBuild && Util.isOverridden(ChangeLogAnnotator.class, getClass(), "annotate", AbstractBuild.class, Entry.class, MarkupText.class)) { diff --git a/core/src/main/java/hudson/scm/ChangeLogParser.java b/core/src/main/java/hudson/scm/ChangeLogParser.java index 52c2fbeb38d8faf01211b48194dddf301f997e2f..32a61769ad5e383f80abcc854f6ab1cf23e5072c 100644 --- a/core/src/main/java/hudson/scm/ChangeLogParser.java +++ b/core/src/main/java/hudson/scm/ChangeLogParser.java @@ -41,6 +41,9 @@ import org.xml.sax.SAXException; */ public abstract class ChangeLogParser { + /** + * @since 1.568 + */ public ChangeLogSet parse(Run build, RepositoryBrowser browser, File changelogFile) throws IOException, SAXException { if (build instanceof AbstractBuild && Util.isOverridden(ChangeLogParser.class, getClass(), "parse", AbstractBuild.class, File.class)) { return parse((AbstractBuild) build, changelogFile); diff --git a/core/src/main/java/hudson/scm/ChangeLogSet.java b/core/src/main/java/hudson/scm/ChangeLogSet.java index d611941df2682476670c6a7cc008a3ce156bada6..472e1eaa942b6e827fb3db894267bd20e1a3e2f2 100644 --- a/core/src/main/java/hudson/scm/ChangeLogSet.java +++ b/core/src/main/java/hudson/scm/ChangeLogSet.java @@ -62,6 +62,9 @@ public abstract class ChangeLogSet implements Iter public final AbstractBuild build; private final RepositoryBrowser browser; + /** + * @since 1.568 + */ protected ChangeLogSet(Run run, RepositoryBrowser browser) { this.run = run; build = run instanceof AbstractBuild ? (AbstractBuild) run : null; @@ -79,10 +82,16 @@ public abstract class ChangeLogSet implements Iter return build.getParent().getScm().getEffectiveBrowser(); } + /** + * @since 1.568 + */ public Run getRun() { return run; } + /** + * @since 1.568 + */ public RepositoryBrowser getBrowser() { return browser; } @@ -116,6 +125,7 @@ public abstract class ChangeLogSet implements Iter /** * Constant instance that represents no changes. + * @since 1.568 */ public static ChangeLogSet createEmpty(Run build) { return new EmptyChangeLogSet(build); diff --git a/core/src/main/java/hudson/scm/SCM.java b/core/src/main/java/hudson/scm/SCM.java index 28ac27b1ba1ea626f67d6a0e100aae64372433c3..446df45a689b6d9964c59ef2023bbc89aabae5a1 100644 --- a/core/src/main/java/hudson/scm/SCM.java +++ b/core/src/main/java/hudson/scm/SCM.java @@ -209,7 +209,7 @@ public abstract class SCM implements Describable, ExtensionPoint { * true if {@link SCM} is OK to let Hudson proceed with deleting the workspace. * False to veto the workspace deletion. * - * @since 1.246 + * @since 1.568 */ public boolean processWorkspaceBeforeDeletion(Job project, FilePath workspace, Node node) throws IOException, InterruptedException { if (project instanceof AbstractProject) { @@ -308,6 +308,7 @@ public abstract class SCM implements Describable, ExtensionPoint { * @throws InterruptedException * interruption is usually caused by the user aborting the computation. * this exception should be simply propagated all the way up. + * @since 1.568 */ public SCMRevisionState calcRevisionsFromBuild(Run build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { if (build instanceof AbstractBuild && Util.isOverridden(SCM.class, getClass(), "calcRevisionsFromBuild", AbstractBuild.class, Launcher.class, TaskListener.class)) { @@ -370,6 +371,7 @@ public abstract class SCM implements Describable, ExtensionPoint { * @throws InterruptedException * interruption is usually caused by the user aborting the computation. * this exception should be simply propagated all the way up. + * @since 1.568 */ public PollingResult compareRemoteRevisionWith(Job project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException { if (project instanceof AbstractProject && Util.isOverridden(SCM.class, getClass(), "compareRemoteRevisionWith", AbstractProject.class, Launcher.class, FilePath.class, TaskListener.class, SCMRevisionState.class)) { @@ -445,6 +447,7 @@ public abstract class SCM implements Describable, ExtensionPoint { * interruption is usually caused by the user aborting the build. * this exception will cause the build to be aborted. * @throws AbortException in case of a routine failure + * @since 1.568 */ public void checkout(Run build, Launcher launcher, FilePath workspace, TaskListener listener, @CheckForNull File changelogFile) throws IOException, InterruptedException { if (build instanceof AbstractBuild && listener instanceof BuildListener && Util.isOverridden(SCM.class, getClass(), "checkout", AbstractBuild.class, Launcher.class, FilePath.class, BuildListener.class, File.class)) { @@ -475,7 +478,7 @@ public abstract class SCM implements Describable, ExtensionPoint { /** * Get a chance to do operations after the workspace i checked out and the changelog is written. - * @since 1.534, 1.532.1 + * @since 1.568 */ public void postCheckout(Run build, Launcher launcher, FilePath workspace, TaskListener listener) throws IOException, InterruptedException { if (build instanceof AbstractBuild && listener instanceof BuildListener) { @@ -653,6 +656,9 @@ public abstract class SCM implements Describable, ExtensionPoint { } } + /** + * @since 1.568 + */ protected final void createEmptyChangeLog(File changelogFile, TaskListener listener, String rootTag) throws IOException { FileWriter w = null; try { @@ -686,6 +692,7 @@ public abstract class SCM implements Describable, ExtensionPoint { /** * Returns the list of {@link SCMDescriptor}s that are applicable to the given project. + * @since 1.568 */ public static List> _for(final Job project) { if(project==null) return all(); @@ -715,7 +722,7 @@ public abstract class SCM implements Describable, ExtensionPoint { * Try to guess how a repository browser should be configured, based on URLs and the like. * Used when {@link #getBrowser} has not been explicitly configured. * @return a reasonable default value for {@link #getEffectiveBrowser}, or null - * @since TODO + * @since 1.568 */ public @CheckForNull RepositoryBrowser guessBrowser() { return null; diff --git a/core/src/main/java/hudson/scm/SCMDescriptor.java b/core/src/main/java/hudson/scm/SCMDescriptor.java index df5090c34800dcbce1f4ec31379575796468b9ff..242ad88c6d518ca9f43919b39e47c47dad9e6aa2 100644 --- a/core/src/main/java/hudson/scm/SCMDescriptor.java +++ b/core/src/main/java/hudson/scm/SCMDescriptor.java @@ -114,7 +114,7 @@ public abstract class SCMDescriptor extends Descriptor { * When this method returns false, this {@link SCM} will not appear in the configuration screen * for the given project. The default is true for {@link AbstractProject} but false for {@link Job}. * - * @since 1.294 + * @since 1.568 */ public boolean isApplicable(Job project) { if (project instanceof AbstractProject) { diff --git a/core/src/main/java/hudson/triggers/SCMTrigger.java b/core/src/main/java/hudson/triggers/SCMTrigger.java index 585aa142d08a6c5477defc5e0f391adeea345acf..e4b069f8555c11e7502877748f7a0f235916df74 100644 --- a/core/src/main/java/hudson/triggers/SCMTrigger.java +++ b/core/src/main/java/hudson/triggers/SCMTrigger.java @@ -321,6 +321,9 @@ public class SCMTrigger extends Trigger { @Deprecated public transient /*final*/ AbstractBuild build; + /** + * @since 1.568 + */ public BuildAction(Run run) { this.run = run; build = run instanceof AbstractBuild ? (AbstractBuild) run : null; @@ -331,6 +334,9 @@ public class SCMTrigger extends Trigger { this((Run) build); } + /** + * @since 1.568 + */ public Run getRun() { return run; } @@ -399,6 +405,9 @@ public class SCMTrigger extends Trigger { return item instanceof AbstractProject ? ((AbstractProject) item) : null; } + /** + * @since 1.568 + */ public Item getItem() { return job().asItem(); } @@ -467,6 +476,7 @@ public class SCMTrigger extends Trigger { /** * For which {@link Item} are we polling? + * @since 1.568 */ public SCMTriggerItem getTarget() { return job(); diff --git a/core/src/main/java/jenkins/triggers/SCMTriggerItem.java b/core/src/main/java/jenkins/triggers/SCMTriggerItem.java index 287fe8c0eeb25777d6c94f468ab47d6102a2f933..1c916edf52cc6a9f5a1404427215c40d1e71ba69 100644 --- a/core/src/main/java/jenkins/triggers/SCMTriggerItem.java +++ b/core/src/main/java/jenkins/triggers/SCMTriggerItem.java @@ -43,7 +43,7 @@ import jenkins.model.ParameterizedJobMixIn; /** * The item type accepted by {@link SCMTrigger}. - * @since TODO + * @since 1.568 */ public interface SCMTriggerItem { @@ -86,7 +86,6 @@ public interface SCMTriggerItem { * See whether an item can be coerced to {@link SCMTriggerItem}. * @param item any item * @return itself, if a {@link SCMTriggerItem}, or an adapter, if an {@link hudson.model.SCMedItem}, else null - * @since TODO */ @SuppressWarnings("deprecation") public static @CheckForNull SCMTriggerItem asSCMTriggerItem(Item item) {