hudson.triggers
Class SCMTrigger

java.lang.Object
  extended by hudson.triggers.Trigger<SCMedItem>
      extended by hudson.triggers.SCMTrigger
All Implemented Interfaces:
ExtensionPoint, Describable<Trigger<?>>

public class SCMTrigger
extends Trigger<SCMedItem>

Trigger that checks for SCM updates periodically.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class SCMTrigger.AdministrativeMonitorImpl
           
static class SCMTrigger.BuildAction
          Associated with AbstractBuild 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 Project.
static class SCMTrigger.SCMTriggerCause
           
 
Nested classes/interfaces inherited from class hudson.triggers.Trigger
Trigger.Cron
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static long STARVATION_THRESHOLD
          How long is too long for a polling activity to be in the queue?
 
Fields inherited from class hudson.triggers.Trigger
job, spec, tabs, timer
 
Constructor Summary
SCMTrigger(String scmpoll_spec)
           
SCMTrigger(String scmpoll_spec, boolean ignorePostCommitHooks)
           
 
Method Summary
 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()
          Actions to be displayed in the job page.
 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.
 
Methods inherited from class hudson.triggers.Trigger
all, checkTriggers, for_, getProjectAction, getSpec, init, readResolve, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARVATION_THRESHOLD

public static long STARVATION_THRESHOLD
How long is too long for a polling activity to be in the queue?

Constructor Detail

SCMTrigger

public SCMTrigger(String scmpoll_spec)
           throws antlr.ANTLRException
Throws:
antlr.ANTLRException

SCMTrigger

@DataBoundConstructor
public SCMTrigger(String scmpoll_spec,
                                       boolean ignorePostCommitHooks)
           throws antlr.ANTLRException
Throws:
antlr.ANTLRException
Method Detail

isIgnorePostCommitHooks

public boolean isIgnorePostCommitHooks()
This trigger wants to ignore post-commit hooks.

SCM plugins must respect this and not run this trigger for post-commit notifications.

Since:
1.493

run

public void run()
Description copied from class: Trigger
Executes the triggered task. This method is invoked when Trigger.Trigger(String) is used to create an instance, and the crontab matches the current time.

Overrides:
run in class Trigger<SCMedItem>

run

public void run(Action[] additionalActions)
Run the SCM trigger with additional build actions. Used by SubversionRepositoryStatus to trigger a build at a specific revisionn number.

Parameters:
additionalActions -
Since:
1.375

getDescriptor

public SCMTrigger.DescriptorImpl getDescriptor()
Description copied from interface: Describable
Gets the descriptor for this instance.

Descriptor is a singleton for every concrete Describable implementation, so if a.getClass()==b.getClass() then a.getDescriptor()==b.getDescriptor() must hold.

Specified by:
getDescriptor in interface Describable<Trigger<?>>
Overrides:
getDescriptor in class Trigger<SCMedItem>

getProjectActions

public Collection<? extends Action> getProjectActions()
Description copied from class: Trigger
Actions to be displayed in the job page.

Overrides:
getProjectActions in class Trigger<SCMedItem>
Returns:
can be empty but never null

getLogFile

public File getLogFile()
Returns the file that records the last/current polling activity.



Copyright © 2004-2013. All Rights Reserved.