Class RelativeTargetDirectory
java.lang.Object
hudson.model.AbstractDescribableImpl<GitSCMExtension>
hudson.plugins.git.extensions.GitSCMExtension
hudson.plugins.git.extensions.impl.RelativeTargetDirectory
- All Implemented Interfaces:
Describable<GitSCMExtension>
Instead of checking out to the top of the workspace, check out somewhere else.
- Author:
- Marc Guenther, Andrew Bayer, Kohsuke Kawaguchi
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeCheckout(GitSCM scm, Run<?, ?> build, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener) Called before the checkout activity (including fetch and checkout) starts.getWorkingDirectory(GitSCM scm, Job<?, ?> context, FilePath workspace, EnvVars environment, TaskListener listener) Given the workspace root directory, gets the working directory, which is where the repository will be checked out.Methods inherited from class hudson.plugins.git.extensions.GitSCMExtension
beforeCheckout, decorate, decorateCheckoutCommand, decorateCheckoutCommand, decorateCloneCommand, decorateCloneCommand, decorateFetchCommand, decorateFetchCommand, decorateMergeCommand, decorateMergeCommand, decorateRevisionToBuild, decorateRevisionToBuild, determineSupportForJGit, enableMultipleRevisionDetection, getDescriptor, getRequiredClient, getWorkingDirectory, isRevExcluded, onCheckoutCompleted, onCheckoutCompleted, onClean, populateEnvironmentVariables, requiresWorkspaceForPolling
-
Constructor Details
-
RelativeTargetDirectory
-
-
Method Details
-
getRelativeTargetDir
-
beforeCheckout
public void beforeCheckout(GitSCM scm, Run<?, ?> build, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener) throws IOException, InterruptedException, hudson.plugins.git.GitExceptionCalled before the checkout activity (including fetch and checkout) starts.- Overrides:
beforeCheckoutin classGitSCMExtension- Parameters:
scm- GitSCM objectbuild- run contextgit- GitClientlistener- build log- Throws:
IOException- on input or output errorInterruptedException- when interruptedhudson.plugins.git.GitException- on git error
-
getWorkingDirectory
public FilePath getWorkingDirectory(GitSCM scm, Job<?, ?> context, FilePath workspace, EnvVars environment, TaskListener listener) throws IOException, InterruptedException, hudson.plugins.git.GitExceptionDescription copied from class:GitSCMExtensionGiven the workspace root directory, gets the working directory, which is where the repository will be checked out.- Overrides:
getWorkingDirectoryin classGitSCMExtension- Parameters:
scm- GitSCM objectcontext- job context for workspace rootworkspace- starting directory of workspaceenvironment- environment variables used to evallistener- build log- Returns:
- working directory or null to let other
GitSCMExtensioncontrol it. - Throws:
IOException- on input or output errorInterruptedException- when interruptedhudson.plugins.git.GitException- on git error
-