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.
  • Constructor Details

  • Method Details

    • getRoot

      @NonNull public jenkins.scm.api.SCMFile getRoot()
      Specified by:
      getRoot in class jenkins.scm.api.SCMFileSystem
    • lastModified

      public long lastModified() throws IOException, InterruptedException
      Specified by:
      lastModified in class jenkins.scm.api.SCMFileSystem
      Throws:
      IOException
      InterruptedException
    • 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

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class jenkins.scm.api.SCMFileSystem
      Throws:
      IOException
    • getRepositoryId

      public String getRepositoryId()
    • getBranchId

      public String getBranchId()
    • getCredentialsId

      public String getCredentialsId()
    • getLibraryPath

      public String getLibraryPath()
    • getApiClient

      public DiversionApiClient getApiClient()
    • setJobName

      public void setJobName(String jobName)
      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

      public String getJobName()
    • setConfiguredScriptPath

      public void setConfiguredScriptPath(String configuredScriptPath)
      Set the explicitly configured script path. This takes precedence over job name auto-detection.
    • getConfiguredScriptPath

      public String getConfiguredScriptPath()
    • resolveScriptPath

      public String resolveScriptPath(String requestedPath)
      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