|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.listeners.RunListener<hudson.model.AbstractBuild>
com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ToGerritRunListener
@Extension public class ToGerritRunListener
The Big RunListener in charge of coordinating build results and reporting back to Gerrit.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
Field Summary |
---|
Fields inherited from class hudson.model.listeners.RunListener |
---|
LISTENERS, targetType |
Constructor Summary | |
---|---|
ToGerritRunListener()
Default Constructor. |
Method Summary | |
---|---|
protected void |
cleanUpGerritCauses(GerritCause firstFound,
hudson.model.AbstractBuild build)
Workaround for builds that are triggered by the same Gerrit cause but multiple times in the same quiet period. |
static ToGerritRunListener |
getInstance()
Returns the registered instance of this class from the list of all listeners. |
boolean |
isBuilding(hudson.model.AbstractProject project,
PatchsetCreated event)
Checks the memory if the project is currently building the event. |
boolean |
isBuilding(PatchsetCreated event)
Checks the memory if the event is building. |
void |
onCompleted(hudson.model.AbstractBuild r,
hudson.model.TaskListener listener)
|
void |
onRetriggered(hudson.model.AbstractProject project,
PatchsetCreated event,
List<hudson.model.AbstractBuild> otherBuilds)
Called just before a build is scheduled by the user to retrigger. |
void |
onStarted(hudson.model.AbstractBuild r,
hudson.model.TaskListener listener)
|
void |
onTriggered(hudson.model.AbstractProject project,
PatchsetCreated event)
Called just before a build is scheduled by the trigger. |
protected void |
setThisBuild(hudson.model.AbstractBuild r)
Updates all GerritCause s
TriggerContext.thisBuild
in the build. |
protected void |
updateTriggerContexts(hudson.model.AbstractBuild r,
BuildMemory.PatchSetKey key)
Updates the TriggerContext s for all the
GerritCause s in the build. |
Methods inherited from class hudson.model.listeners.RunListener |
---|
all, fireCompleted, fireDeleted, fireFinalized, fireStarted, onDeleted, onFinalized, register, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToGerritRunListener()
Method Detail |
---|
public static ToGerritRunListener getInstance()
public void onCompleted(hudson.model.AbstractBuild r, hudson.model.TaskListener listener)
onCompleted
in class hudson.model.listeners.RunListener<hudson.model.AbstractBuild>
public void onStarted(hudson.model.AbstractBuild r, hudson.model.TaskListener listener)
onStarted
in class hudson.model.listeners.RunListener<hudson.model.AbstractBuild>
protected void updateTriggerContexts(hudson.model.AbstractBuild r, BuildMemory.PatchSetKey key)
TriggerContext
s for all the
GerritCause
s in the build.
r
- the build.key
- the memory key to update.BuildMemory.updateTriggerContext(
com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.model.BuildMemory.PatchSetKey,
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritCause, hudson.model.AbstractBuild)
protected void setThisBuild(hudson.model.AbstractBuild r)
GerritCause
s
TriggerContext.thisBuild
in the build.
r
- the build to update.protected void cleanUpGerritCauses(GerritCause firstFound, hudson.model.AbstractBuild build)
firstFound
- the cause first returned by Run.getCause(Class)
.build
- the build to clean up.public void onTriggered(hudson.model.AbstractProject project, PatchsetCreated event)
project
- the project that will be built.event
- the event that caused the build to be scheduled.public void onRetriggered(hudson.model.AbstractProject project, PatchsetCreated event, List<hudson.model.AbstractBuild> otherBuilds)
project
- the project.event
- the event.otherBuilds
- the list of other builds in the previous context.public boolean isBuilding(hudson.model.AbstractProject project, PatchsetCreated event)
project
- the project.event
- the event.
BuildMemory.isBuilding(PatchsetCreated, hudson.model.AbstractProject)
public boolean isBuilding(PatchsetCreated event)
event
- the event.
BuildMemory.isBuilding(com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.PatchsetCreated)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |