Class GerritNotifier
java.lang.Object
com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier
Start position that notifies Gerrit of events.
- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>
-
Constructor Summary
ConstructorsConstructorDescriptionGerritNotifier(IGerritHudsonTriggerConfig config, com.sonymobile.tools.gerrit.gerritevents.GerritCmdRunner cmdRunner) Constructor.GerritNotifier(IGerritHudsonTriggerConfig config, com.sonymobile.tools.gerrit.gerritevents.GerritCmdRunner cmdRunner, Jenkins jenkins) Constructor for testing. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildCompleted(BuildMemory.MemoryImprint memoryImprint, TaskListener listener) Generates the build-completed command based on configured templates and build-values and sends it to Gerrit.voidbuildStarted(Run build, TaskListener taskListener, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, BuildsStartedStats stats) Generates the build-started command based on configured templates and build-values and sends it to Gerrit.
-
Constructor Details
-
GerritNotifier
public GerritNotifier(IGerritHudsonTriggerConfig config, com.sonymobile.tools.gerrit.gerritevents.GerritCmdRunner cmdRunner) Constructor.- Parameters:
config- the config.cmdRunner- the command-runner.
-
GerritNotifier
public GerritNotifier(IGerritHudsonTriggerConfig config, com.sonymobile.tools.gerrit.gerritevents.GerritCmdRunner cmdRunner, Jenkins jenkins) Constructor for testing.- Parameters:
config- the config.cmdRunner- the command-runner.jenkins- the Jenkins instance.
-
-
Method Details
-
buildStarted
public void buildStarted(Run build, TaskListener taskListener, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, BuildsStartedStats stats) Generates the build-started command based on configured templates and build-values and sends it to Gerrit.- Parameters:
build- the build.taskListener- the taskListener.event- the event.stats- the stats.
-
buildCompleted
Generates the build-completed command based on configured templates and build-values and sends it to Gerrit.- Parameters:
memoryImprint- the memory of all the builds for an event.listener- the taskListener.
-