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 ClassesModifier and TypeClassDescriptionstatic classRegisters the Git behavior and supplies its configuration UI. -
Constructor Summary
ConstructorsConstructorDescriptionGerritRestCheckout(String serverUrl, String project, String credentialsId) Creates the Git behavior from job configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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
-
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/aproject- unencoded Gerrit project name, which must match the configured Git remotecredentialsId- optional username/password credential ID; blank selects anonymous access
-
-
Method Details
-
getServerUrl
Returns the configured Gerrit base URL.- Returns:
- trimmed URL, or
nullif not configured
-
getProject
Returns the project name used by the Gerrit REST endpoints.- Returns:
- unencoded project name, or
nullif not configured
-
getCredentialsId
Returns the HTTP credential ID, independently of the Git remote credentials.- Returns:
- credential ID, or
nullfor anonymous REST requests
-