public class SCMTrigger extends Trigger<Item>
Trigger
that checks for SCM updates periodically.
You can add UI elements under the SCM section by creating a
config.jelly or config.groovy in the resources area for
your class that inherits from SCMTrigger and has the
Extension
annotation. The UI should
be wrapped in an f:section element to denote it.Modifier and Type | Class and Description |
---|---|
static class |
SCMTrigger.AdministrativeMonitorImpl |
static class |
SCMTrigger.BuildAction
Associated with
Run to show the polling log
that triggered that build. |
static class |
SCMTrigger.DescriptorImpl |
class |
SCMTrigger.Runner
Runnable that actually performs polling. |
class |
SCMTrigger.SCMAction
Action object for job.
|
static class |
SCMTrigger.SCMTriggerCause |
Trigger.Cron
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static long |
STARVATION_THRESHOLD
How long is too long for a polling activity to be in the queue?
|
Constructor and Description |
---|
SCMTrigger(String scmpoll_spec) |
SCMTrigger(String scmpoll_spec,
boolean ignorePostCommitHooks)
Deprecated.
since 2.21
|
Modifier and Type | Method and Description |
---|---|
SCMTrigger.DescriptorImpl |
getDescriptor()
Gets the descriptor for this instance.
|
File |
getLogFile()
Returns the file that records the last/current polling activity.
|
Collection<? extends Action> |
getProjectActions()
Action s to be displayed in the job page. |
String |
getScmpoll_spec() |
boolean |
isIgnorePostCommitHooks()
This trigger wants to ignore post-commit hooks.
|
void |
run()
Executes the triggered task.
|
void |
run(Action[] additionalActions)
Run the SCM trigger with additional build actions.
|
void |
setIgnorePostCommitHooks(boolean ignorePostCommitHooks)
Data-bound setter for ignoring post commit hooks.
|
all, checkTriggers, for_, getProjectAction, getSpec, readResolve, start, stop
public static long STARVATION_THRESHOLD
@DataBoundConstructor public SCMTrigger(String scmpoll_spec) throws antlr.ANTLRException
antlr.ANTLRException
@Deprecated public SCMTrigger(String scmpoll_spec, boolean ignorePostCommitHooks) throws antlr.ANTLRException
scmpoll_spec
- The spec to poll with.ignorePostCommitHooks
- Whether to ignore post commit hooks.antlr.ANTLRException
public boolean isIgnorePostCommitHooks()
SCM plugins must respect this and not run this trigger for post-commit notifications.
@DataBoundSetter public void setIgnorePostCommitHooks(boolean ignorePostCommitHooks)
ignorePostCommitHooks
- True if we should ignore post commit hooks, false otherwise.public String getScmpoll_spec()
public void run()
Trigger
Trigger(String)
is used
to create an instance, and the crontab matches the current time.
Maybe run even before Trigger.start(hudson.model.Item, boolean)
, prepare for it.
public void run(Action[] additionalActions)
additionalActions
- public SCMTrigger.DescriptorImpl getDescriptor()
Describable
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass() == b.getClass()
then by default
a.getDescriptor() == b.getDescriptor()
as well.
(In rare cases a single implementation class may be used for instances with distinct descriptors.)
getDescriptor
in interface Describable<Trigger<?>>
getDescriptor
in class Trigger<Item>
public Collection<? extends Action> getProjectActions()
Trigger
Action
s to be displayed in the job page.getProjectActions
in class Trigger<Item>
public File getLogFile()
Copyright © 2004–2021. All rights reserved.