Class GerritNotifier


  • public class GerritNotifier
    extends Object
    Start position that notifies Gerrit of events.
    Author:
    Robert Sandell <robert.sandell@sonyericsson.com>
    • Constructor Detail

      • 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 Detail

      • 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

        public void buildCompleted​(BuildMemory.MemoryImprint memoryImprint,
                                   TaskListener listener)
        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.