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>
public class RelativeTargetDirectory extends 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 Modifier and Type Class Description static class
RelativeTargetDirectory.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description RelativeTargetDirectory(String relativeTargetDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getRelativeTargetDir()
FilePath
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, beforeCheckout, decorate, decorateCheckoutCommand, decorateCheckoutCommand, decorateCloneCommand, decorateCloneCommand, decorateFetchCommand, decorateFetchCommand, decorateMergeCommand, decorateMergeCommand, decorateRevisionToBuild, decorateRevisionToBuild, determineSupportForJGit, enableMultipleRevisionDetection, getDescriptor, getRequiredClient, getWorkingDirectory, isRevExcluded, onCheckoutCompleted, onCheckoutCompleted, onClean, populateEnvironmentVariables, requiresWorkspaceForPolling
-
-
-
-
Constructor Detail
-
RelativeTargetDirectory
@DataBoundConstructor public RelativeTargetDirectory(String relativeTargetDir)
-
-
Method Detail
-
getRelativeTargetDir
public String getRelativeTargetDir()
-
getWorkingDirectory
public FilePath getWorkingDirectory(GitSCM scm, Job<?,?> context, FilePath workspace, EnvVars environment, TaskListener listener) throws IOException, InterruptedException, hudson.plugins.git.GitException
Description copied from class:GitSCMExtension
Given the workspace root directory, gets the working directory, which is where the repository will be checked out.- Overrides:
getWorkingDirectory
in 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
GitSCMExtension
control it. - Throws:
IOException
- on input or output errorInterruptedException
- when interruptedhudson.plugins.git.GitException
- on git error
-
-