public class GitSCM extends hudson.scm.SCM implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
GitSCM.DescriptorImpl |
| Modifier and Type | Field and Description |
|---|---|
static String |
GIT_BRANCH |
static String |
GIT_COMMIT |
static boolean |
VERBOSE
Set to true to enable more logging to build's
TaskListener. |
| Constructor and Description |
|---|
GitSCM(List<org.eclipse.jgit.transport.RemoteConfig> repositories,
List<BranchSpec> branches,
PreBuildMergeOptions mergeOptions,
boolean doGenerateSubmoduleConfigurations,
Collection<SubmoduleConfig> submoduleCfg,
boolean clean,
boolean wipeOutWorkspace,
BuildChooser buildChooser,
GitRepositoryBrowser browser,
String gitTool,
boolean authorOrCommitter,
String excludedRegions,
String excludedUsers,
String localBranch,
boolean recursiveSubmodules,
boolean pruneBranches,
boolean remotePoll,
String gitConfigName,
String gitConfigEmail,
boolean skipTag)
Deprecated.
|
GitSCM(List<org.eclipse.jgit.transport.RemoteConfig> repositories,
List<BranchSpec> branches,
PreBuildMergeOptions mergeOptions,
boolean doGenerateSubmoduleConfigurations,
Collection<SubmoduleConfig> submoduleCfg,
boolean clean,
boolean wipeOutWorkspace,
BuildChooser buildChooser,
GitRepositoryBrowser browser,
String gitTool,
boolean authorOrCommitter,
String excludedRegions,
String excludedUsers,
String localBranch,
boolean recursiveSubmodules,
boolean pruneBranches,
boolean remotePoll,
String gitConfigName,
String gitConfigEmail,
boolean skipTag,
String includedRegions)
Deprecated.
|
GitSCM(List<org.eclipse.jgit.transport.RemoteConfig> repositories,
List<BranchSpec> branches,
PreBuildMergeOptions mergeOptions,
boolean doGenerateSubmoduleConfigurations,
Collection<SubmoduleConfig> submoduleCfg,
boolean clean,
boolean wipeOutWorkspace,
BuildChooser buildChooser,
GitRepositoryBrowser browser,
String gitTool,
boolean authorOrCommitter,
String excludedRegions,
String excludedUsers,
String localBranch,
boolean recursiveSubmodules,
boolean pruneBranches,
boolean remotePoll,
String gitConfigName,
String gitConfigEmail,
boolean skipTag,
String includedRegions,
boolean ignoreNotifyCommit) |
GitSCM(List<org.eclipse.jgit.transport.RemoteConfig> repositories,
List<BranchSpec> branches,
PreBuildMergeOptions mergeOptions,
boolean doGenerateSubmoduleConfigurations,
Collection<SubmoduleConfig> submoduleCfg,
boolean clean,
boolean wipeOutWorkspace,
BuildChooser buildChooser,
GitRepositoryBrowser browser,
String gitTool,
boolean authorOrCommitter,
String relativeTargetDir,
String excludedRegions,
String excludedUsers,
String localBranch,
boolean recursiveSubmodules,
boolean pruneBranches,
boolean remotePoll,
String gitConfigName,
String gitConfigEmail,
boolean skipTag)
Deprecated.
|
GitSCM(String repositoryUrl)
A convenience constructor that sets everything to default.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addExcludedCommit(String sha1) |
void |
buildEnvVars(hudson.model.AbstractBuild<?,?> build,
Map<String,String> env) |
hudson.scm.SCMRevisionState |
calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> abstractBuild,
hudson.Launcher launcher,
hudson.model.TaskListener taskListener) |
boolean |
checkout(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.BuildListener listener,
File changelogFile) |
protected hudson.scm.PollingResult |
compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState baseline) |
hudson.scm.ChangeLogParser |
createChangeLogParser() |
boolean |
equals(Object o) |
boolean |
getAuthorOrCommitter()
Use either author or committer.
|
List<BranchSpec> |
getBranches() |
GitRepositoryBrowser |
getBrowser() |
BuildChooser |
getBuildChooser() |
BuildData |
getBuildData(hudson.model.Run build,
boolean clone)
Look back as far as needed to find a valid BuildData.
|
boolean |
getClean() |
boolean |
getDoGenerate() |
Set<String> |
getExcludedCommits() |
String |
getExcludedRegions() |
String[] |
getExcludedRegionsNormalized() |
String |
getExcludedUsers() |
Set<String> |
getExcludedUsersNormalized() |
String |
getGitConfigEmail() |
String |
getGitConfigEmailToUse() |
String |
getGitConfigName() |
String |
getGitConfigNameToUse() |
String |
getGitExe(hudson.model.Node builtOn,
hudson.model.TaskListener listener)
Exposing so that we can get this from GitPublisher.
|
String |
getGitTool() |
String |
getIncludedRegions() |
String[] |
getIncludedRegionsNormalized() |
String |
getLocalBranch() |
PreBuildMergeOptions |
getMergeOptions() |
List<org.eclipse.jgit.transport.RemoteConfig> |
getParamExpandedRepos(hudson.model.AbstractBuild<?,?> build)
Expand parameters in
remoteRepositories with the parameter values provided in the given build
and return them. |
String |
getParamLocalBranch(hudson.model.AbstractBuild<?,?> build) |
boolean |
getPruneBranches() |
boolean |
getRecursiveSubmodules() |
String |
getRelativeTargetDir()
Deprecated.
|
boolean |
getRemotePoll() |
List<org.eclipse.jgit.transport.RemoteConfig> |
getRepositories() |
org.eclipse.jgit.transport.RemoteConfig |
getRepositoryByName(String repoName) |
boolean |
getSkipTag() |
Collection<SubmoduleConfig> |
getSubmoduleCfg() |
org.eclipse.jgit.transport.RemoteConfig |
getSubmoduleRepository(IGitAPI parentGit,
org.eclipse.jgit.transport.RemoteConfig orig,
String name) |
boolean |
getUseCgitClone() |
boolean |
getWipeOutWorkspace() |
int |
hashCode() |
boolean |
isCreateAccountBaseOnCommitterEmail()
Returns true if Hudson should create new accounts base on Git commiter's email instead of full name.
|
boolean |
isIgnoreNotifyCommit() |
boolean |
isPollSlaves() |
Object |
readResolve() |
boolean |
requiresWorkspaceForPolling() |
void |
setSubmoduleCfg(Collection<SubmoduleConfig> submoduleCfg) |
void |
setUseCgitClone(boolean useCgitClone) |
protected hudson.FilePath |
workingDirectory(hudson.FilePath workspace)
Given the workspace, gets the working directory, which will be the workspace
if no relative target dir is specified.
|
public static final String GIT_BRANCH
public static final String GIT_COMMIT
public static boolean VERBOSE
TaskListener.
Used by various classes in this package.public GitSCM(String repositoryUrl) throws IOException, hudson.model.Descriptor.FormException
repositoryUrl - Repository URL to clone from.IOException - exception.hudson.model.Descriptor.FormException@Deprecated public GitSCM(List<org.eclipse.jgit.transport.RemoteConfig> repositories, List<BranchSpec> branches, PreBuildMergeOptions mergeOptions, boolean doGenerateSubmoduleConfigurations, Collection<SubmoduleConfig> submoduleCfg, boolean clean, boolean wipeOutWorkspace, BuildChooser buildChooser, GitRepositoryBrowser browser, String gitTool, boolean authorOrCommitter, String relativeTargetDir, String excludedRegions, String excludedUsers, String localBranch, boolean recursiveSubmodules, boolean pruneBranches, boolean remotePoll, String gitConfigName, String gitConfigEmail, boolean skipTag)
@Deprecated public GitSCM(List<org.eclipse.jgit.transport.RemoteConfig> repositories, List<BranchSpec> branches, PreBuildMergeOptions mergeOptions, boolean doGenerateSubmoduleConfigurations, Collection<SubmoduleConfig> submoduleCfg, boolean clean, boolean wipeOutWorkspace, BuildChooser buildChooser, GitRepositoryBrowser browser, String gitTool, boolean authorOrCommitter, String excludedRegions, String excludedUsers, String localBranch, boolean recursiveSubmodules, boolean pruneBranches, boolean remotePoll, String gitConfigName, String gitConfigEmail, boolean skipTag)
@Deprecated public GitSCM(List<org.eclipse.jgit.transport.RemoteConfig> repositories, List<BranchSpec> branches, PreBuildMergeOptions mergeOptions, boolean doGenerateSubmoduleConfigurations, Collection<SubmoduleConfig> submoduleCfg, boolean clean, boolean wipeOutWorkspace, BuildChooser buildChooser, GitRepositoryBrowser browser, String gitTool, boolean authorOrCommitter, String excludedRegions, String excludedUsers, String localBranch, boolean recursiveSubmodules, boolean pruneBranches, boolean remotePoll, String gitConfigName, String gitConfigEmail, boolean skipTag, String includedRegions)
@DataBoundConstructor public GitSCM(List<org.eclipse.jgit.transport.RemoteConfig> repositories, List<BranchSpec> branches, PreBuildMergeOptions mergeOptions, boolean doGenerateSubmoduleConfigurations, Collection<SubmoduleConfig> submoduleCfg, boolean clean, boolean wipeOutWorkspace, BuildChooser buildChooser, GitRepositoryBrowser browser, String gitTool, boolean authorOrCommitter, String excludedRegions, String excludedUsers, String localBranch, boolean recursiveSubmodules, boolean pruneBranches, boolean remotePoll, String gitConfigName, String gitConfigEmail, boolean skipTag, String includedRegions, boolean ignoreNotifyCommit)
public Collection<SubmoduleConfig> getSubmoduleCfg()
public void setSubmoduleCfg(Collection<SubmoduleConfig> submoduleCfg)
public void setUseCgitClone(boolean useCgitClone)
public boolean getUseCgitClone()
public Object readResolve()
public String getIncludedRegions()
public String[] getIncludedRegionsNormalized()
public String getExcludedRegions()
public boolean addExcludedCommit(String sha1)
public String[] getExcludedRegionsNormalized()
public String getExcludedUsers()
public GitRepositoryBrowser getBrowser()
getBrowser in class hudson.scm.SCMpublic String getGitConfigName()
public String getGitConfigEmail()
public String getGitConfigNameToUse()
public boolean isPollSlaves()
public String getGitConfigEmailToUse()
public boolean isCreateAccountBaseOnCommitterEmail()
public boolean getSkipTag()
public boolean getPruneBranches()
public boolean getRemotePoll()
public boolean getWipeOutWorkspace()
public boolean getClean()
public BuildChooser getBuildChooser()
public boolean isIgnoreNotifyCommit()
public List<org.eclipse.jgit.transport.RemoteConfig> getParamExpandedRepos(hudson.model.AbstractBuild<?,?> build)
remoteRepositories with the parameter values provided in the given build
and return them.public boolean requiresWorkspaceForPolling()
requiresWorkspaceForPolling in class hudson.scm.SCMpublic org.eclipse.jgit.transport.RemoteConfig getRepositoryByName(String repoName)
public List<org.eclipse.jgit.transport.RemoteConfig> getRepositories()
public String getGitTool()
public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> abstractBuild,
hudson.Launcher launcher,
hudson.model.TaskListener taskListener)
throws IOException,
InterruptedException
calcRevisionsFromBuild in class hudson.scm.SCMIOExceptionInterruptedExceptionpublic org.eclipse.jgit.transport.RemoteConfig getSubmoduleRepository(IGitAPI parentGit, org.eclipse.jgit.transport.RemoteConfig orig, String name) throws GitException
GitExceptionpublic String getGitExe(hudson.model.Node builtOn, hudson.model.TaskListener listener)
builtOn - Node.listener - TaskListener.public boolean getAuthorOrCommitter()
public boolean checkout(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.BuildListener listener,
File changelogFile)
throws IOException,
InterruptedException
checkout in class hudson.scm.SCMIOExceptionInterruptedExceptionpublic void buildEnvVars(hudson.model.AbstractBuild<?,?> build,
Map<String,String> env)
buildEnvVars in class hudson.scm.SCMpublic hudson.scm.ChangeLogParser createChangeLogParser()
createChangeLogParser in class hudson.scm.SCMpublic boolean getRecursiveSubmodules()
public boolean getDoGenerate()
public List<BranchSpec> getBranches()
public PreBuildMergeOptions getMergeOptions()
public BuildData getBuildData(hudson.model.Run build, boolean clone)
build - build.clone - is clone.public String getLocalBranch()
public String getParamLocalBranch(hudson.model.AbstractBuild<?,?> build)
@Deprecated public String getRelativeTargetDir()
protected hudson.FilePath workingDirectory(hudson.FilePath workspace)
workspace - protected hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState baseline)
throws IOException,
InterruptedException
compareRemoteRevisionWith in class hudson.scm.SCMIOExceptionInterruptedExceptionCopyright © 2004-2015 Hudson. All Rights Reserved.