Class InfluxDbNotifierConfig
java.lang.Object
org.jenkinsci.plugins.githubautostatus.config.AbstractNotifierConfig
org.jenkinsci.plugins.githubautostatus.config.InfluxDbNotifierConfig
Encapsulates the logic of determining InfluxDB configuration for a build.
- Author:
- Jeff Pearce (GitHub jeffpearce)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InfluxDbNotifierConfigfromGlobalConfig(String repoOwner, String repoName, String branchName) Creates an InfluxDB notification config based on the global settings.Gets the branch name.com.cloudbees.plugins.credentials.common.UsernamePasswordCredentialsReturns the credentials for calling InfluxDB if they are configured.org.apache.http.impl.client.CloseableHttpClientGets an HTTP client that can be used to make requests.booleanGets whether to ignore sending test coverage to InfluxDB.booleanGets whether to ignore sending test results to InfluxDB.Gets the InfluxDB database to write to.Gets the optional retention policy.Gets the InfluxDB URL.Gets the repo name.Gets the repo owner.Determines if InfluxDB is reachable.Methods inherited from class org.jenkinsci.plugins.githubautostatus.config.AbstractNotifierConfig
getHttpClient
-
Constructor Details
-
InfluxDbNotifierConfig
public InfluxDbNotifierConfig()
-
-
Method Details
-
getRepoOwner
Gets the repo owner.- Returns:
- the repo owner
-
getRepoName
Gets the repo name.- Returns:
- the repo name
-
getBranchName
Gets the branch name.- Returns:
- the branch name
-
getInfluxDbUrlString
Gets the InfluxDB URL.- Returns:
- the InfluxDB URL
-
getDbVersion
-
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
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
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 ownerrepoName- repo namebranchName- branch name- Returns:
- config
-