public class GitSCM extends GitSCMBackwardCompatibility
| 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 String |
GIT_PREVIOUS_COMMIT |
String |
gitTool |
static int |
MAX_CHANGELOG
To avoid pointlessly large changelog, we'll limit the number of changes up to this.
|
static boolean |
VERBOSE
Set to true to enable more logging to build's
TaskListener. |
| Constructor and Description |
|---|
GitSCM(List<UserRemoteConfig> userRemoteConfigs,
List<BranchSpec> branches,
Boolean doGenerateSubmoduleConfigurations,
Collection<SubmoduleConfig> submoduleCfg,
GitRepositoryBrowser browser,
String gitTool,
List<GitSCMExtension> extensions) |
GitSCM(String repositoryUrl)
A convenience constructor that sets everything to default.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
static void |
configureXtream() |
BuildData |
copyBuildData(hudson.model.Run build)
Like
getBuildData(Run), but copy the data into a new object,
which is used as the first step for updating the data for the next build. |
hudson.scm.ChangeLogParser |
createChangeLogParser() |
org.jenkinsci.plugins.gitclient.GitClient |
createClient(hudson.model.BuildListener listener,
hudson.EnvVars environment,
hudson.model.AbstractBuild<?,?> build)
Allows
Builders and Publishers to access a configured GitClient object to
perform additional git operations. |
List<BranchSpec> |
getBranches() |
GitRepositoryBrowser |
getBrowser() |
BuildChooser |
getBuildChooser() |
BuildData |
getBuildData(hudson.model.Run build)
Find the build log (BuildData) recorded with the last build that completed.
|
BuildData |
getBuildData(hudson.model.Run build,
boolean clone)
Deprecated.
|
hudson.model.AbstractBuild<?,?> |
getBySHA1(String sha1)
Web-bound method to let people look up a build by their SHA1 commit.
|
hudson.util.DescribableList<GitSCMExtension,GitSCMExtensionDescriptor> |
getExtensions()
All the configured extensions attached to this
GitSCM. |
String |
getGitExe(hudson.model.Node builtOn,
hudson.EnvVars env,
hudson.model.TaskListener listener)
Exposing so that we can get this from GitPublisher.
|
String |
getGitExe(hudson.model.Node builtOn,
hudson.model.TaskListener listener) |
String |
getGitTool() |
PreBuildMergeOptions |
getMergeOptions()
Deprecated.
|
static String |
getParameterString(String original,
hudson.EnvVars env) |
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)
Gets the parameter-expanded effective value in the context of the current build.
|
List<org.eclipse.jgit.transport.RemoteConfig> |
getRepositories() |
org.eclipse.jgit.transport.RemoteConfig |
getRepositoryByName(String repoName) |
Collection<SubmoduleConfig> |
getSubmoduleCfg() |
List<UserRemoteConfig> |
getUserRemoteConfigs() |
boolean |
isCreateAccountBasedOnEmail() |
boolean |
isDoGenerateSubmoduleConfigurations() |
static void |
onLoaded() |
Object |
readResolve() |
boolean |
requiresWorkspaceForPolling() |
hudson.plugins.git.GitTool |
resolveGitTool(hudson.model.TaskListener listener) |
void |
setBuildChooser(BuildChooser buildChooser) |
void |
setSubmoduleCfg(Collection<SubmoduleConfig> submoduleCfg) |
protected hudson.FilePath |
workingDirectory(hudson.model.AbstractProject<?,?> context,
hudson.FilePath workspace,
hudson.EnvVars environment,
hudson.model.TaskListener listener)
Given the workspace, gets the working directory, which will be the workspace
if no relative target dir is specified.
|
getAuthorOrCommitter, getClean, getDescriptor, getDisableSubmodules, getExcludedRegions, getExcludedRegionsNormalized, getExcludedUsers, getExcludedUsersNormalized, getGitConfigEmail, getGitConfigEmailToUse, getGitConfigName, getGitConfigNameToUse, getIncludedRegions, getIncludedRegionsNormalized, getLocalBranch, getPruneBranches, getRecursiveSubmodules, getReference, getRelativeTargetDir, getRemotePoll, getScmName, getSkipTag, getUserMergeOptions, getUseShallowClone, getWipeOutWorkspace, isIgnoreNotifyCommitpublic String gitTool
public static final String GIT_BRANCH
public static final String GIT_COMMIT
public static final String GIT_PREVIOUS_COMMIT
public static boolean VERBOSE
TaskListener.
Used by various classes in this package.public static final int MAX_CHANGELOG
public GitSCM(String repositoryUrl)
repositoryUrl - Repository URL to clone from.@DataBoundConstructor public GitSCM(List<UserRemoteConfig> userRemoteConfigs, List<BranchSpec> branches, Boolean doGenerateSubmoduleConfigurations, Collection<SubmoduleConfig> submoduleCfg, GitRepositoryBrowser browser, String gitTool, List<GitSCMExtension> extensions)
public Collection<SubmoduleConfig> getSubmoduleCfg()
public void setSubmoduleCfg(Collection<SubmoduleConfig> submoduleCfg)
public hudson.util.DescribableList<GitSCMExtension,GitSCMExtensionDescriptor> getExtensions()
GitSCM.
Going forward this is primarily how we'll support esoteric use cases.public Object readResolve() throws IOException
IOExceptionpublic GitRepositoryBrowser getBrowser()
getBrowser in class hudson.scm.SCMpublic boolean isCreateAccountBasedOnEmail()
public BuildChooser getBuildChooser()
public void setBuildChooser(BuildChooser buildChooser) throws IOException
IOExceptionpublic String getParamLocalBranch(hudson.model.AbstractBuild<?,?> build) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic List<org.eclipse.jgit.transport.RemoteConfig> getParamExpandedRepos(hudson.model.AbstractBuild<?,?> build) throws IOException, InterruptedException
remoteRepositories with the parameter values provided in the given build
and return them.IOExceptionInterruptedExceptionpublic org.eclipse.jgit.transport.RemoteConfig getRepositoryByName(String repoName)
@Exported public List<UserRemoteConfig> getUserRemoteConfigs()
@Exported 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 boolean requiresWorkspaceForPolling()
requiresWorkspaceForPolling in class hudson.scm.SCMprotected 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.SCMIOExceptionInterruptedExceptionpublic org.jenkinsci.plugins.gitclient.GitClient createClient(hudson.model.BuildListener listener,
hudson.EnvVars environment,
hudson.model.AbstractBuild<?,?> build)
throws IOException,
InterruptedException
Builders and Publishers to access a configured GitClient object to
perform additional git operations.IOExceptionInterruptedExceptionpublic hudson.plugins.git.GitTool resolveGitTool(hudson.model.TaskListener listener)
public String getGitExe(hudson.model.Node builtOn, hudson.model.TaskListener listener)
public String getGitExe(hudson.model.Node builtOn, hudson.EnvVars env, hudson.model.TaskListener listener)
public hudson.model.AbstractBuild<?,?> getBySHA1(String sha1)
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 isDoGenerateSubmoduleConfigurations()
@Exported public List<BranchSpec> getBranches()
@Exported @Deprecated public PreBuildMergeOptions getMergeOptions() throws hudson.model.Descriptor.FormException
PreBuildMerge.hudson.model.Descriptor.FormExceptionpublic BuildData getBuildData(hudson.model.Run build, boolean clone)
public BuildData copyBuildData(hudson.model.Run build)
getBuildData(Run), but copy the data into a new object,
which is used as the first step for updating the data for the next build.@CheckForNull public BuildData getBuildData(hudson.model.Run build)
build - protected hudson.FilePath workingDirectory(hudson.model.AbstractProject<?,?> context,
hudson.FilePath workspace,
hudson.EnvVars environment,
hudson.model.TaskListener listener)
throws IOException,
InterruptedException
workspace - IOExceptionInterruptedException@Initializer(after=PLUGINS_STARTED) public static void onLoaded()
@Initializer(before=JOB_LOADED) public static void configureXtream()
Copyright © 2004-2013. All Rights Reserved.