Class GerritRestCheckout

java.lang.Object
hudson.model.AbstractDescribableImpl<hudson.plugins.git.extensions.GitSCMExtension>
hudson.plugins.git.extensions.GitSCMExtension
io.jenkins.plugins.gerritlightweight.GerritRestCheckout
All Implemented Interfaces:
Describable<hudson.plugins.git.extensions.GitSCMExtension>

public class GerritRestCheckout extends hudson.plugins.git.extensions.GitSCMExtension
Explicitly opts a Git SCM into REST-based Pipeline script retrieval.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Registers the Git behavior and supplies its configuration UI.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GerritRestCheckout(String serverUrl, String project, String credentialsId)
    Creates the Git behavior from job configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the HTTP credential ID, independently of the Git remote credentials.
    Returns the project name used by the Gerrit REST endpoints.
    Returns the configured Gerrit base URL.

    Methods inherited from class hudson.plugins.git.extensions.GitSCMExtension

    beforeCheckout, beforeCheckout, decorate, decorateCheckoutCommand, decorateCheckoutCommand, decorateCloneCommand, decorateCloneCommand, decorateFetchCommand, decorateFetchCommand, decorateMergeCommand, decorateMergeCommand, decorateRevisionToBuild, decorateRevisionToBuild, determineSupportForJGit, enableMultipleRevisionDetection, getDescriptor, getRequiredClient, getWorkingDirectory, getWorkingDirectory, isRevExcluded, onCheckoutCompleted, onCheckoutCompleted, onClean, populateEnvironmentVariables, requiresWorkspaceForPolling

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GerritRestCheckout

      @DataBoundConstructor public GerritRestCheckout(String serverUrl, String project, String credentialsId)
      Creates the Git behavior from job configuration.
      Parameters:
      serverUrl - Gerrit HTTP(S) base URL, including any context path but excluding /a
      project - unencoded Gerrit project name, which must match the configured Git remote
      credentialsId - optional username/password credential ID; blank selects anonymous access
  • Method Details

    • getServerUrl

      public String getServerUrl()
      Returns the configured Gerrit base URL.
      Returns:
      trimmed URL, or null if not configured
    • getProject

      public String getProject()
      Returns the project name used by the Gerrit REST endpoints.
      Returns:
      unencoded project name, or null if not configured
    • getCredentialsId

      public String getCredentialsId()
      Returns the HTTP credential ID, independently of the Git remote credentials.
      Returns:
      credential ID, or null for anonymous REST requests