Class InfluxDbNotifierConfig

java.lang.Object
org.jenkinsci.plugins.githubautostatus.config.AbstractNotifierConfig
org.jenkinsci.plugins.githubautostatus.config.InfluxDbNotifierConfig

public class InfluxDbNotifierConfig extends AbstractNotifierConfig
Encapsulates the logic of determining InfluxDB configuration for a build.
Author:
Jeff Pearce (GitHub jeffpearce)
  • Constructor Details

    • InfluxDbNotifierConfig

      public InfluxDbNotifierConfig()
  • Method Details

    • getRepoOwner

      public String getRepoOwner()
      Gets the repo owner.
      Returns:
      the repo owner
    • getRepoName

      public String getRepoName()
      Gets the repo name.
      Returns:
      the repo name
    • getBranchName

      public String getBranchName()
      Gets the branch name.
      Returns:
      the branch name
    • getInfluxDbUrlString

      public String getInfluxDbUrlString()
      Gets the InfluxDB URL.
      Returns:
      the InfluxDB URL
    • getDbVersion

      public Integer getDbVersion()
    • influxDbIsReachable

      public Boolean influxDbIsReachable()
      Determines if InfluxDB is reachable.
      Returns:
      true if URL is reachable; false otherwise
    • getHttpClient

      public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
      Gets an HTTP client that can be used to make requests.
      Returns:
      the HTTP client
    • getInfluxDbDatabase

      public String getInfluxDbDatabase()
      Gets the InfluxDB database to write to.
      Returns:
      the InfluxDB database
    • getCredentials

      @CheckForNull public com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials getCredentials()
      Returns the credentials for calling InfluxDB if they are configured.
      Returns:
      the credentials; null if not provided.
    • getInfluxDbRetentionPolicy

      public String getInfluxDbRetentionPolicy()
      Gets the optional retention policy.
      Returns:
      the retention policy
    • getSchema

    • getIgnoreSendingTestCoverageToInflux

      public boolean getIgnoreSendingTestCoverageToInflux()
      Gets whether to ignore sending test coverage to InfluxDB.
      Returns:
      Whether to ignore sending test coverage to InfluxDB
    • getIgnoreSendingTestResultsToInflux

      public boolean getIgnoreSendingTestResultsToInflux()
      Gets whether to ignore sending test results to InfluxDB.
      Returns:
      whether to ignore sending test results to InfluxDB
    • fromGlobalConfig

      public static InfluxDbNotifierConfig fromGlobalConfig(String repoOwner, String repoName, String branchName)
      Creates an InfluxDB notification config based on the global settings.
      Parameters:
      repoOwner - repo owner
      repoName - repo name
      branchName - branch name
      Returns:
      config