Class InfluxDbNotifier

java.lang.Object
org.jenkinsci.plugins.githubautostatus.notifiers.BuildNotifier
org.jenkinsci.plugins.githubautostatus.notifiers.InfluxDbNotifier
All Implemented Interfaces:
ExtensionPoint

public class InfluxDbNotifier extends BuildNotifier
Writes job and stage measurements to an InfluxDB REST API.
Author:
Jeff Pearce (GitHub jeffpearce)
  • Field Details

    • repoOwner

      protected String repoOwner
    • repoName

      protected String repoName
    • branchName

      protected String branchName
    • influxDbUrlString

      protected String influxDbUrlString
    • config

      protected InfluxDbNotifierConfig config
    • authorization

      protected transient String authorization
  • Constructor Details

    • InfluxDbNotifier

      public InfluxDbNotifier(InfluxDbNotifierConfig config)
      Constructor
      Parameters:
      config - InfluxDB configuration info
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Determines whether this notifier is enabled.
      Specified by:
      isEnabled in class BuildNotifier
      Returns:
      true if enabled; false otherwise
    • wantsOutOfStageErrors

      public boolean wantsOutOfStageErrors()
      Get whether the notifier wants to know about errors that happen outside of a stage.
      Overrides:
      wantsOutOfStageErrors in class BuildNotifier
      Returns:
      true; since this notifier reports these errors.
    • notifyBuildStageStatus

      public void notifyBuildStageStatus(String jobName, BuildStage stageItem)
      Sends a state change to InfluxDB.
      Specified by:
      notifyBuildStageStatus in class BuildNotifier
      Parameters:
      jobName - the name of the job
      stageItem - stage item describing the new state
    • notifyFinalBuildStatus

      public void notifyFinalBuildStatus(BuildStage.State buildState, Map<String,Object> parameters)
      Sends the final build status to InfluxDB.
      Specified by:
      notifyFinalBuildStatus in class BuildNotifier
      Parameters:
      buildState - the new state
      parameters - build parameters