public abstract class AbstractP4ScmSource
extends jenkins.scm.api.SCMSource
Modifier and Type | Field and Description |
---|---|
protected String |
credential |
Constructor and Description |
---|
AbstractP4ScmSource(String credential) |
Modifier and Type | Method and Description |
---|---|
PerforceScm |
build(jenkins.scm.api.SCMHead head,
jenkins.scm.api.SCMRevision revision) |
protected jenkins.scm.api.SCMProbe |
createProbe(jenkins.scm.api.SCMHead head,
jenkins.scm.api.SCMRevision revision) |
protected boolean |
findInclude(String path) |
abstract P4Browser |
getBrowser() |
String |
getCharset() |
String |
getCredential() |
List<Filter> |
getFilter() |
String |
getFormat() |
abstract List<P4SCMHead> |
getHeads(hudson.model.TaskListener listener) |
List<String> |
getIncludePaths() |
String |
getIncludes() |
Populate |
getPopulate() |
protected String |
getProperty(net.sf.json.JSONObject payload,
ReviewProp property) |
P4SCMRevision |
getRevision(net.sf.json.JSONObject payload)
A specific revision based on the Event Payload.
|
P4SCMRevision |
getRevision(P4SCMHead head,
hudson.model.TaskListener listener)
Get the Latest change for the path specified in P4SCMHead.
|
protected P4BranchScanner |
getScanner(P4Ref ref)
Scans for a Jenkinsfile given a submitted change.
|
String |
getScriptPathOrDefault() |
abstract List<P4SCMHead> |
getTags(hudson.model.TaskListener listener) |
List<jenkins.scm.api.trait.SCMSourceTrait> |
getTraits() |
abstract Workspace |
getWorkspace(P4Path path) |
protected boolean |
isCategoryEnabled(jenkins.scm.api.SCMHeadCategory category)
Enable specific SCMHeadCategory categories.
|
protected void |
retrieve(jenkins.scm.api.SCMSourceCriteria criteria,
jenkins.scm.api.SCMHeadObserver observer,
jenkins.scm.api.SCMHeadEvent<?> event,
hudson.model.TaskListener listener) |
protected List<hudson.model.Action> |
retrieveActions(jenkins.scm.api.SCMHead head,
jenkins.scm.api.SCMHeadEvent event,
hudson.model.TaskListener listener)
SCMHead level action.
|
protected List<hudson.model.Action> |
retrieveActions(jenkins.scm.api.SCMRevision revision,
jenkins.scm.api.SCMHeadEvent event,
hudson.model.TaskListener listener)
SCMRevision level action.
|
protected List<hudson.model.Action> |
retrieveActions(jenkins.scm.api.SCMSourceEvent event,
hudson.model.TaskListener listener)
SCMSource level action.
|
void |
setCharset(String charset) |
void |
setFilter(List<Filter> filter) |
void |
setFormat(String format) |
void |
setIncludes(String includes) |
void |
setPopulate(Populate populate) |
void |
setTraits(List<jenkins.scm.api.trait.SCMSourceTrait> traits) |
protected List<String> |
toLines(String value) |
afterSave, build, canProbe, checkInterrupt, defaultListener, equals, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchActions, fetchActions, fetchActions, fetchRevisions, fromSCMFileSystem, getCategories, getCriteria, getDescriptor, getId, getOwner, getPronoun, getTrustedRevision, hashCode, hasId, newProbe, parentHeads, parentRevisions, retrieve, retrieve, retrieve, retrieve, retrieve, retrieve, retrieveRevisions, setId, setOwner, toString, withId
protected final String credential
public AbstractP4ScmSource(String credential)
@DataBoundSetter public void setFormat(String format)
@DataBoundSetter public void setPopulate(Populate populate)
@DataBoundSetter public void setIncludes(String includes)
@DataBoundSetter public void setCharset(String charset)
@DataBoundSetter public void setTraits(@CheckForNull List<jenkins.scm.api.trait.SCMSourceTrait> traits)
public String getCredential()
public List<jenkins.scm.api.trait.SCMSourceTrait> getTraits()
public String getIncludes()
public String getCharset()
public String getFormat()
public Populate getPopulate()
public abstract P4Browser getBrowser()
public abstract List<P4SCMHead> getHeads(@NonNull hudson.model.TaskListener listener) throws Exception
Exception
public abstract List<P4SCMHead> getTags(@NonNull hudson.model.TaskListener listener) throws Exception
Exception
public String getScriptPathOrDefault()
protected void retrieve(@CheckForNull jenkins.scm.api.SCMSourceCriteria criteria, @NonNull jenkins.scm.api.SCMHeadObserver observer, @CheckForNull jenkins.scm.api.SCMHeadEvent<?> event, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
retrieve
in class jenkins.scm.api.SCMSource
IOException
InterruptedException
protected jenkins.scm.api.SCMProbe createProbe(@NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision) throws IOException
createProbe
in class jenkins.scm.api.SCMSource
IOException
public PerforceScm build(@NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision)
build
in class jenkins.scm.api.SCMSource
protected List<hudson.model.Action> retrieveActions(@CheckForNull jenkins.scm.api.SCMSourceEvent event, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
retrieveActions
in class jenkins.scm.api.SCMSource
event
- Optional event (might be null) use payload to help filter calls.listener
- the listener to report progress on.Action
instances to persist.IOException
- if an error occurs while performing the operation.InterruptedException
- if any thread has interrupted the current thread.protected List<hudson.model.Action> retrieveActions(@NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMHeadEvent event, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
retrieveActions
in class jenkins.scm.api.SCMSource
head
- Changes on a branchevent
- Optional event (might be null) use payload to help filter calls.listener
- the listener to report progress on.Action
instances to persist.IOException
- if an error occurs while performing the operation.InterruptedException
- if any thread has interrupted the current thread.protected List<hudson.model.Action> retrieveActions(@NonNull jenkins.scm.api.SCMRevision revision, @CheckForNull jenkins.scm.api.SCMHeadEvent event, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
retrieveActions
in class jenkins.scm.api.SCMSource
revision
- the SCMRevision
event
- Optional event (might be null) use payload to help filter calls.listener
- the listener to report progress on.Action
instances to persist.IOException
- if an error occurs while performing the operation.InterruptedException
- if any thread has interrupted the current thread.protected boolean isCategoryEnabled(@NonNull jenkins.scm.api.SCMHeadCategory category)
TagSCMHeadCategory: Branches, Streams, Swarm and Graph ChangeRequestSCMHeadCategory: Swarm and Graph
isCategoryEnabled
in class jenkins.scm.api.SCMSource
category
- the Categorytrue
if the supplied category is enabled for this SCMSource
instance.public P4SCMRevision getRevision(P4SCMHead head, hudson.model.TaskListener listener) throws Exception
head
- SCMHeadlistener
- for loggingException
- pushed up stackpublic P4SCMRevision getRevision(net.sf.json.JSONObject payload)
payload
- JSON payload from an external Eventprotected P4BranchScanner getScanner(P4Ref ref)
Looks a the first submitted file and walks up the path looking for a Jenkinsfile.
ref
- A Perforce Change or Labelprotected boolean findInclude(String path)
protected String getProperty(net.sf.json.JSONObject payload, ReviewProp property)
Copyright © 2016–2019. All rights reserved.