Class DiversionSCM
java.lang.Object
hudson.scm.SCM
io.superstudios.plugins.diversion.DiversionSCM
- All Implemented Interfaces:
ExtensionPoint,Describable<SCM>
Jenkins SCM implementation for Diversion repositories.
This SCM allows Jenkins to checkout files from Diversion repositories
using the Diversion API.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalcRevisionsFromBuild(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) voidcheckout(Run<?, ?> build, Launcher launcher, FilePath workspace, TaskListener listener, File changelogFile, SCMRevisionState baseline) compareRemoteRevisionWith(Job<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) Compare the remote repository state with the last built revision.booleanTell Jenkins we don't need a workspace for polling.voidvoidsetLibraryPath(String libraryPath) voidsetScriptPath(String scriptPath) booleanTell Jenkins we support polling.Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, _for, all, buildEnvironment, buildEnvVars, calcRevisionsFromBuild, checkout, compareRemoteRevisionWith, createEmptyChangeLog, createEmptyChangeLog, getApi, getBrowser, getDescriptor, getEffectiveBrowser, getKey, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, guessBrowser, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion, processWorkspaceBeforeDeletion
-
Constructor Details
-
DiversionSCM
-
-
Method Details
-
setBranch
-
setScriptPath
-
setLibraryPath
-
getRepositoryId
-
getCredentialsId
-
getBranch
-
getScriptPath
-
getLibraryPath
-
checkout
public void checkout(@NonNull Run<?, ?> build, @NonNull Launcher launcher, @NonNull FilePath workspace, @NonNull TaskListener listener, File changelogFile, @CheckForNull SCMRevisionState baseline) throws IOException, InterruptedException- Overrides:
checkoutin classSCM- Throws:
IOExceptionInterruptedException
-
calcRevisionsFromBuild
public SCMRevisionState calcRevisionsFromBuild(@NonNull Run<?, ?> build, @NonNull FilePath workspace, @NonNull Launcher launcher, @NonNull TaskListener listener) throws IOException, InterruptedException- Overrides:
calcRevisionsFromBuildin classSCM- Throws:
IOExceptionInterruptedException
-
compareRemoteRevisionWith
public PollingResult compareRemoteRevisionWith(@NonNull Job<?, ?> project, @CheckForNull Launcher launcher, @CheckForNull FilePath workspace, @NonNull TaskListener listener, @NonNull SCMRevisionState baseline) throws IOException, InterruptedExceptionCompare the remote repository state with the last built revision. This is the core method called during SCM polling to detect changes.- Overrides:
compareRemoteRevisionWithin classSCM- Parameters:
project- The job being polledlauncher- The launcherworkspace- The workspace (may be null for lightweight checkout)listener- For loggingbaseline- The revision state from the last build- Returns:
- PollingResult indicating whether changes were found
- Throws:
IOExceptionInterruptedException
-
supportsPolling
public boolean supportsPolling()Tell Jenkins we support polling.- Overrides:
supportsPollingin classSCM
-
requiresWorkspaceForPolling
public boolean requiresWorkspaceForPolling()Tell Jenkins we don't need a workspace for polling. We only need API access to check for new commits.- Overrides:
requiresWorkspaceForPollingin classSCM
-
createChangeLogParser
- Specified by:
createChangeLogParserin classSCM
-