Class DiversionSCMFileSystem
java.lang.Object
jenkins.scm.api.SCMFileSystem
io.superstudios.plugins.diversion.DiversionSCMFileSystem
- All Implemented Interfaces:
Closeable,AutoCloseable
public class DiversionSCMFileSystem
extends jenkins.scm.api.SCMFileSystem
File system implementation for accessing Diversion repository files.
Used by Jenkins to load library files from Diversion.
-
Nested Class Summary
Nested classes/interfaces inherited from class jenkins.scm.api.SCMFileSystem
jenkins.scm.api.SCMFileSystem.Builder -
Constructor Summary
ConstructorsConstructorDescriptionDiversionSCMFileSystem(String repositoryId, String branchId, String credentialsId, String libraryPath, jenkins.scm.api.SCMRevision revision) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()jenkins.scm.api.SCMFilegetRoot()voidInvalidate the cached last modified time.longresolveScriptPath(String requestedPath) Resolve the actual script path for a requested path.voidsetConfiguredScriptPath(String configuredScriptPath) Set the explicitly configured script path.voidsetJobName(String jobName) Set the job name for auto-detecting script path.Methods inherited from class jenkins.scm.api.SCMFileSystem
changesSince, child, getRevision, isFixedRevision, of, of, of, of, of, supports, supports, supports, supports
-
Constructor Details
-
DiversionSCMFileSystem
public DiversionSCMFileSystem(String repositoryId, String branchId, String credentialsId, String libraryPath, jenkins.scm.api.SCMRevision revision) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
-
Method Details
-
getRoot
@NonNull public jenkins.scm.api.SCMFile getRoot()- Specified by:
getRootin classjenkins.scm.api.SCMFileSystem
-
lastModified
- Specified by:
lastModifiedin classjenkins.scm.api.SCMFileSystem- Throws:
IOExceptionInterruptedException
-
invalidateCache
public void invalidateCache()Invalidate the cached last modified time. Call this when we want to force a refresh on the next lastModified() call. -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classjenkins.scm.api.SCMFileSystem- Throws:
IOException
-
getRepositoryId
-
getBranchId
-
getCredentialsId
-
getLibraryPath
-
getApiClient
-
setJobName
Set the job name for auto-detecting script path. When Jenkins asks for "Jenkinsfile" but it doesn't exist, we'll look for {jobName}.groovy instead. -
getJobName
-
setConfiguredScriptPath
Set the explicitly configured script path. This takes precedence over job name auto-detection. -
getConfiguredScriptPath
-
resolveScriptPath
Resolve the actual script path for a requested path. If the requested path is a default like "Jenkinsfile" and doesn't exist, try to find the configured or auto-detected script path.- Parameters:
requestedPath- The path Jenkins is asking for (e.g., "Jenkinsfile")- Returns:
- The actual path to use, or null to use the original
-