com.base2services.jenkins
Class SqsBuildTrigger

java.lang.Object
  extended by hudson.triggers.Trigger<hudson.model.AbstractProject>
      extended by com.base2services.jenkins.SqsBuildTrigger
All Implemented Interfaces:
com.cloudbees.jenkins.GitHubTrigger, hudson.ExtensionPoint, hudson.model.Describable<hudson.triggers.Trigger<?>>, Runnable

public class SqsBuildTrigger
extends hudson.triggers.Trigger<hudson.model.AbstractProject>
implements com.cloudbees.jenkins.GitHubTrigger, Runnable

Triggers a build when we receive a message from SQS.

Author:
aaronwalker

Nested Class Summary
static class SqsBuildTrigger.DescriptorImpl
           
 class SqsBuildTrigger.SqsBuildTriggerPollingAction
           
 
Nested classes/interfaces inherited from class hudson.triggers.Trigger
hudson.triggers.Trigger.Cron
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.triggers.Trigger
HASH, job, spec, tabs, timer
 
Constructor Summary
SqsBuildTrigger()
           
 
Method Summary
protected  void addRepositories(Set<com.cloudbees.jenkins.GitHubRepositoryName> r, hudson.scm.SCM scm)
           
 SqsBuildTrigger.DescriptorImpl getDescriptor()
           
 Set<com.cloudbees.jenkins.GitHubRepositoryName> getGitHubRepositories()
          Does this project read from a repository of the given user name and the given repository name?
 File getLogFile()
          Returns the file that records the last/current polling activity.
 Collection<? extends hudson.model.Action> getProjectActions()
           
 void onPost()
          Called when a POST is made.
 void onPost(String username)
           
 void run()
           
 void start(hudson.model.AbstractProject project, boolean newInstance)
           
 void stop()
           
 
Methods inherited from class hudson.triggers.Trigger
all, checkTriggers, for_, getProjectAction, getSpec, init, readResolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqsBuildTrigger

@DataBoundConstructor
public SqsBuildTrigger()
Method Detail

onPost

public void onPost()
Called when a POST is made.

Specified by:
onPost in interface com.cloudbees.jenkins.GitHubTrigger

onPost

public void onPost(String username)

getLogFile

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


run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class hudson.triggers.Trigger<hudson.model.AbstractProject>

getDescriptor

public SqsBuildTrigger.DescriptorImpl getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.triggers.Trigger<?>>
Overrides:
getDescriptor in class hudson.triggers.Trigger<hudson.model.AbstractProject>

getGitHubRepositories

public Set<com.cloudbees.jenkins.GitHubRepositoryName> getGitHubRepositories()
Does this project read from a repository of the given user name and the given repository name?

Specified by:
getGitHubRepositories in interface com.cloudbees.jenkins.GitHubTrigger

addRepositories

protected void addRepositories(Set<com.cloudbees.jenkins.GitHubRepositoryName> r,
                               hudson.scm.SCM scm)
Since:
1.1

start

public void start(hudson.model.AbstractProject project,
                  boolean newInstance)
Overrides:
start in class hudson.triggers.Trigger<hudson.model.AbstractProject>

stop

public void stop()
Overrides:
stop in class hudson.triggers.Trigger<hudson.model.AbstractProject>

getProjectActions

public Collection<? extends hudson.model.Action> getProjectActions()
Overrides:
getProjectActions in class hudson.triggers.Trigger<hudson.model.AbstractProject>


Copyright © 2004-2012. All Rights Reserved.