public class PerforceScm
extends hudson.scm.SCM
Modifier and Type | Class and Description |
---|---|
static class |
PerforceScm.DescriptorImpl
The relationship of Descriptor and SCM (the describable) is akin to class
and object.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CHANGE_LIMIT |
static int |
DEFAULT_FILE_LIMIT |
static long |
DEFAULT_HEAD_LIMIT |
Constructor and Description |
---|
PerforceScm(AbstractP4ScmSource source,
P4Path path,
P4Ref revision)
MultiBranch constructor for building jobs.
|
PerforceScm(String credential,
Workspace workspace,
List<Filter> filter,
Populate populate,
P4Browser browser)
Create a constructor that takes non-transient fields, and add the
annotation @DataBoundConstructor to it.
|
PerforceScm(String credential,
Workspace workspace,
Populate populate)
Internal constructor for functional tests.
|
Modifier and Type | Method and Description |
---|---|
void |
buildEnvironment(hudson.model.Run<?,?> run,
Map<String,String> env) |
hudson.scm.SCMRevisionState |
calcRevisionsFromBuild(hudson.model.Run<?,?> run,
hudson.FilePath buildWorkspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
Calculate the state of the workspace of the given build.
|
void |
checkout(hudson.model.Run<?,?> run,
hudson.Launcher launcher,
hudson.FilePath buildWorkspace,
hudson.model.TaskListener listener,
File changelogFile,
hudson.scm.SCMRevisionState baseline)
The checkout method is expected to check out modified files into the
project workspace.
|
hudson.scm.PollingResult |
compareRemoteRevisionWith(hudson.model.Job<?,?> job,
hudson.Launcher launcher,
hudson.FilePath buildWorkspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState baseline)
This method does the actual polling and returns a PollingResult.
|
static PerforceScm |
convertToPerforceScm(hudson.scm.SCM scm)
Helper function for converting an SCM object into a
PerforceScm object when appropriate.
|
hudson.scm.ChangeLogParser |
createChangeLogParser()
The checkout method should, besides checking out the modified files,
write a changelog.xml file that contains the changes for a certain build.
|
static P4Browser |
findBrowser(String scmCredential) |
P4Browser |
getBrowser() |
String |
getCredential() |
PerforceScm.DescriptorImpl |
getDescriptor() |
List<Filter> |
getFilter() |
String |
getKey() |
Populate |
getPopulate() |
P4Review |
getReview() |
String |
getScriptPath(hudson.model.Item item) |
Workspace |
getWorkspace() |
boolean |
processWorkspaceBeforeDeletion(hudson.model.Job<?,?> job,
hudson.FilePath buildWorkspace,
hudson.model.Node node)
Called before a workspace is deleted on the given node, to provide SCM an
opportunity to perform clean up.
|
boolean |
requiresWorkspaceForPolling()
This method should return true if the SCM requires a workspace for
polling.
|
void |
setReview(P4Review review) |
boolean |
supportsPolling()
This methods determines if the SCM plugin can be used for polling
|
_calcRevisionsFromBuild, _for, _for, all, buildEnvVars, calcRevisionsFromBuild, checkout, compareRemoteRevisionWith, createEmptyChangeLog, createEmptyChangeLog, getApi, getEffectiveBrowser, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, guessBrowser, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion
public static final int DEFAULT_FILE_LIMIT
public static final int DEFAULT_CHANGE_LIMIT
public static final long DEFAULT_HEAD_LIMIT
@DataBoundConstructor public PerforceScm(String credential, Workspace workspace, List<Filter> filter, Populate populate, P4Browser browser)
credential
- Credential IDworkspace
- Workspace connection detailsfilter
- Polling filterspopulate
- Populate optionsbrowser
- Browser optionspublic PerforceScm(AbstractP4ScmSource source, P4Path path, P4Ref revision)
source
- ScmSourcepath
- Perforce project path and mappingsrevision
- Perforce revisionpublic String getCredential()
public Workspace getWorkspace()
public Populate getPopulate()
public P4Browser getBrowser()
getBrowser
in class hudson.scm.SCM
public P4Review getReview()
public void setReview(P4Review review)
public static PerforceScm convertToPerforceScm(hudson.scm.SCM scm)
scm
- the SCM objectpublic String getKey()
getKey
in class hudson.scm.SCM
public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.Run<?,?> run, hudson.FilePath buildWorkspace, hudson.Launcher launcher, hudson.model.TaskListener listener) throws IOException, InterruptedException
calcRevisionsFromBuild
in class hudson.scm.SCM
IOException
InterruptedException
public hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.Job<?,?> job, hudson.Launcher launcher, hudson.FilePath buildWorkspace, hudson.model.TaskListener listener, hudson.scm.SCMRevisionState baseline) throws IOException, InterruptedException
compareRemoteRevisionWith
in class hudson.scm.SCM
IOException
InterruptedException
public void checkout(hudson.model.Run<?,?> run, hudson.Launcher launcher, hudson.FilePath buildWorkspace, hudson.model.TaskListener listener, File changelogFile, hudson.scm.SCMRevisionState baseline) throws IOException, InterruptedException
checkout
in class hudson.scm.SCM
IOException
InterruptedException
public String getScriptPath(hudson.model.Item item)
public void buildEnvironment(hudson.model.Run<?,?> run, Map<String,String> env)
buildEnvironment
in class hudson.scm.SCM
public hudson.scm.ChangeLogParser createChangeLogParser()
createChangeLogParser
in class hudson.scm.SCM
public boolean processWorkspaceBeforeDeletion(hudson.model.Job<?,?> job, hudson.FilePath buildWorkspace, hudson.model.Node node) throws IOException, InterruptedException
processWorkspaceBeforeDeletion
in class hudson.scm.SCM
IOException
InterruptedException
public PerforceScm.DescriptorImpl getDescriptor()
getDescriptor
in interface hudson.model.Describable<hudson.scm.SCM>
getDescriptor
in class hudson.scm.SCM
public boolean supportsPolling()
supportsPolling
in class hudson.scm.SCM
public boolean requiresWorkspaceForPolling()
requiresWorkspaceForPolling
in class hudson.scm.SCM
Copyright © 2016–2022. All rights reserved.