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 |
static String |
GIT_PREVIOUS_SUCCESSFUL_COMMIT |
static Pattern |
GIT_REF |
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.Run<?,?> abstractBuild,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener taskListener) |
void |
checkout(hudson.model.Run<?,?> build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
File changelogFile,
hudson.scm.SCMRevisionState baseline) |
hudson.scm.PollingResult |
compareRemoteRevisionWith(hudson.model.Job<?,?> 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.TaskListener listener,
hudson.EnvVars environment,
hudson.model.Run<?,?> build,
hudson.FilePath workspace)
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() |
String |
getKey() |
PreBuildMergeOptions |
getMergeOptions()
Deprecated.
|
static String |
getParameterString(String original,
hudson.EnvVars env) |
org.eclipse.jgit.transport.RemoteConfig |
getParamExpandedRepo(hudson.EnvVars env,
org.eclipse.jgit.transport.RemoteConfig remoteRepository)
Expand Parameters in the supplied remote repository with the parameter values provided in the given environment variables }
|
List<org.eclipse.jgit.transport.RemoteConfig> |
getParamExpandedRepos(hudson.model.Run<?,?> build)
Deprecated.
|
List<org.eclipse.jgit.transport.RemoteConfig> |
getParamExpandedRepos(hudson.model.Run<?,?> build,
hudson.model.TaskListener listener)
Expand parameters in
remoteRepositories with the parameter values provided in the given build
and return them. |
String |
getParamLocalBranch(hudson.model.Run<?,?> build)
Deprecated.
|
String |
getParamLocalBranch(hudson.model.Run<?,?> build,
hudson.model.TaskListener listener)
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() |
hudson.scm.RepositoryBrowser<?> |
guessBrowser() |
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.Job<?,?> 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, getTrackingSubmodules, getUserMergeOptions, getUseShallowClone, getWipeOutWorkspace, isIgnoreNotifyCommit_calcRevisionsFromBuild, _for, _for, all, calcRevisionsFromBuild, checkout, compareRemoteRevisionWith, createEmptyChangeLog, createEmptyChangeLog, getApi, getEffectiveBrowser, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion, processWorkspaceBeforeDeletion, supportsPollingpublic String gitTool
public static final String GIT_BRANCH
public static final String GIT_COMMIT
public static final String GIT_PREVIOUS_COMMIT
public static final String GIT_PREVIOUS_SUCCESSFUL_COMMIT
public static final Pattern GIT_REF
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 hudson.scm.RepositoryBrowser<?> guessBrowser()
guessBrowser in class hudson.scm.SCMpublic boolean isCreateAccountBasedOnEmail()
public BuildChooser getBuildChooser()
public void setBuildChooser(BuildChooser buildChooser) throws IOException
IOException@Deprecated public String getParamLocalBranch(hudson.model.Run<?,?> build) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic String getParamLocalBranch(hudson.model.Run<?,?> build, hudson.model.TaskListener listener) throws IOException, InterruptedException
IOExceptionInterruptedException@Deprecated public List<org.eclipse.jgit.transport.RemoteConfig> getParamExpandedRepos(hudson.model.Run<?,?> build) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic List<org.eclipse.jgit.transport.RemoteConfig> getParamExpandedRepos(hudson.model.Run<?,?> build, hudson.model.TaskListener listener) throws IOException, InterruptedException
remoteRepositories with the parameter values provided in the given build
and return them.IOExceptionInterruptedExceptionpublic org.eclipse.jgit.transport.RemoteConfig getParamExpandedRepo(hudson.EnvVars env,
org.eclipse.jgit.transport.RemoteConfig remoteRepository)
env - Environment variables with parameter valuesremoteRepository - Remote repository with parameterspublic org.eclipse.jgit.transport.RemoteConfig getRepositoryByName(String repoName)
@Exported public List<UserRemoteConfig> getUserRemoteConfigs()
public List<org.eclipse.jgit.transport.RemoteConfig> getRepositories()
public String getGitTool()
public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.Run<?,?> abstractBuild,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener taskListener)
throws IOException,
InterruptedException
calcRevisionsFromBuild in class hudson.scm.SCMIOExceptionInterruptedExceptionpublic boolean requiresWorkspaceForPolling()
requiresWorkspaceForPolling in class hudson.scm.SCMpublic hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.Job<?,?> 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.TaskListener listener,
hudson.EnvVars environment,
hudson.model.Run<?,?> build,
hudson.FilePath workspace)
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 void checkout(hudson.model.Run<?,?> build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
File changelogFile,
hudson.scm.SCMRevisionState baseline)
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()
public String getKey()
getKey in class hudson.scm.SCM@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.Job<?,?> 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-2015. All Rights Reserved.