Class BuildStatusConfig
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
org.jenkinsci.plugins.githubautostatus.BuildStatusConfig
- All Implemented Interfaces:
ExtensionPoint,Describable<GlobalConfiguration>,Saveable,Loadable,OnMaster
Provides configuration options for this plugin.
- Author:
- Jeff Pearce (GitHub jeffpearce)
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds compatibility aliases to prevent "old data" warnings.booleanconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) Invoked when the global configuration page is submitteddoCheckCredentialsId(Item item, String value) Validates the credentials id.doCheckHttpCredentialsId(Item item, String value) Validates the HTTP credentials id.doCheckHttpEndpoint(Item item, String value) doFillCredentialsIdItems(String credentialsId) Fills the list box in the settings page with valid credentials.Fills the list box in the settings page with valid database versions.doFillHttpCredentialsIdItems(String credentialsId) Fills the list box in the settings page with valid HTTP credentials.static BuildStatusConfigget()Convenience method to get the configuration objectstatic <T extends com.cloudbees.plugins.credentials.Credentials>
TgetCredentials(Class<T> type, String credentialsId) Gets the credentials id.Gets the InfluxDB database version.Gets human readable name.booleanGets whether sending status to GitHub is enabled.booleanGets whether sending status to HTTP endpoint is enabled.booleanGets whether writing to InfluxDB is enabled.booleanGets whether writing to StatsD is enabled.Gets the HTTP credentials id.Gets the HTTP endpoint URL.booleanGets whether SSL verify is enabled.booleanGets whether to ignore sending test coverage.booleanGets whether to ignore sending test results.Gets the InfluxDB database.Gets the InfluxDB retention policy.Gets the InfluxDB URL.Gets the StatsD bucket.Gets the StatsD host.Gets the StatsD maximum packet size.Gets the StatsD port.voidload()voidsetCredentialsId(String credentialsId) Sets the credentials id.voidsetDbVersion(Integer dbVersion) voidsetDbVersion(String dbVersion) Sets the InfluxDB database version.voidsetEnableGithub(boolean enableGithub) Sets whether sending status to GitHub is enabled.voidsetEnableHttp(boolean enableHttp) Sets whether sending status to HTTP endpoint is enabled.voidsetEnableInfluxDb(boolean enableInfluxDb) Sets whether writing to InfluxDB is enabled.voidsetEnableStatsd(boolean enableStatsd) Sets whether writing to StatsD is enabled.voidsetHttpCredentialsId(String httpCredentialsId) Sets the HTTP credentials id.voidsetHttpEndpoint(String httpEndpoint) Sets the HTTP endpoint URL.voidsetHttpVerifySSL(boolean httpVerifySSL) Sets whether SSL verify is enabled.voidsetIgnoreSendingTestCoverageToInflux(boolean ignoreSendingTestCoverageToInflux) Sets whether to ignore sending test results.voidsetIgnoreSendingTestResultsToInflux(boolean ignoreSendingTestResultsToInflux) 2ets whether to ignore sending test results.voidsetInfluxDbDatabase(String influxDbDatabase) Sets the InfluxDB database.voidsetInfluxDbRetentionPolicy(String influxDbRetentionPolicy) Sets the InfluxDB retention policy.voidsetInfluxDbUrl(String influxDbUrl) Sets the InfluxDB URL.voidsetStatsdBucket(String statsdBucket) Sets the StatsD bucket.voidsetStatsdHost(String statsdHost) Sets the StatsD host.voidsetStatsdMaxSize(String statsdMaxSize) Sets the StatsD maximum packet size.voidsetStatsdPort(String statsdPort) Sets the StatsD port.Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
BuildStatusConfig
public BuildStatusConfig()
-
-
Method Details
-
addCompatibilityAliases
Adds compatibility aliases to prevent "old data" warnings. -
get
Convenience method to get the configuration object- Returns:
- the configuration object
-
load
public void load()- Specified by:
loadin interfaceLoadable- Overrides:
loadin classDescriptor<GlobalConfiguration>
-
getDisplayName
Gets human readable name.- Overrides:
getDisplayNamein classDescriptor<GlobalConfiguration>- Returns:
- human readable name
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException Invoked when the global configuration page is submitted- Overrides:
configurein classGlobalConfiguration- Parameters:
req- Request that represents the form submissionjson- The JSON object that captures the configuration data- Returns:
- always returns true (allow config page to be closed)
- Throws:
Descriptor.FormException- exception if a form field is invalid
-
getEnableGithub
public boolean getEnableGithub()Gets whether sending status to GitHub is enabled. For compatibility reasons the flag is stored as the inverse (disableGithub) so that GitHub is enabled by default for users who upgrade from a version prior to the flag.- Returns:
- true if writing to GitHub is enabled
-
setEnableGithub
@DataBoundSetter public void setEnableGithub(boolean enableGithub) Sets whether sending status to GitHub is enabled.- Parameters:
enableGithub- true to enable sending status to GitHub
-
getEnableHttp
public boolean getEnableHttp()Gets whether sending status to HTTP endpoint is enabled.- Returns:
- true if writing to HTTP is enabled
-
setEnableHttp
@DataBoundSetter public void setEnableHttp(boolean enableHttp) Sets whether sending status to HTTP endpoint is enabled.- Parameters:
enableHttp- true to enable sending status to HTTP endpoint
-
getHttpVerifySSL
public boolean getHttpVerifySSL()Gets whether SSL verify is enabled.- Returns:
- true if verify SSL is enabled
-
setHttpVerifySSL
@DataBoundSetter public void setHttpVerifySSL(boolean httpVerifySSL) Sets whether SSL verify is enabled.- Parameters:
httpVerifySSL- true to verify SSL
-
getCredentialsId
Gets the credentials id.- Returns:
- the credentials id
-
setCredentialsId
Sets the credentials id.- Parameters:
credentialsId- the credentials id
-
getHttpCredentialsId
Gets the HTTP credentials id.- Returns:
- the credentials id
-
setHttpCredentialsId
Sets the HTTP credentials id.- Parameters:
httpCredentialsId- the credentials id
-
getHttpEndpoint
Gets the HTTP endpoint URL.- Returns:
- the endpoint URL
-
setHttpEndpoint
Sets the HTTP endpoint URL.- Parameters:
httpEndpoint- the endpoint URL
-
getEnableInfluxDb
public boolean getEnableInfluxDb()Gets whether writing to InfluxDB is enabled.- Returns:
- true if writing to InfluxDB is enabled
-
setEnableInfluxDb
@DataBoundSetter public void setEnableInfluxDb(boolean enableInfluxDb) Sets whether writing to InfluxDB is enabled.- Parameters:
enableInfluxDb- true to enable writing to InfluxDB
-
getInfluxDbUrl
Gets the InfluxDB URL.- Returns:
- the URL
-
setInfluxDbUrl
Sets the InfluxDB URL.- Parameters:
influxDbUrl- the URL
-
getInfluxDbDatabase
Gets the InfluxDB database.- Returns:
- the database
-
setInfluxDbDatabase
Sets the InfluxDB database.- Parameters:
influxDbDatabase- the database
-
getIgnoreSendingTestResultsToInflux
public boolean getIgnoreSendingTestResultsToInflux()Gets whether to ignore sending test results.- Returns:
- whether to ignore sending test results
-
setIgnoreSendingTestResultsToInflux
@DataBoundSetter public void setIgnoreSendingTestResultsToInflux(boolean ignoreSendingTestResultsToInflux) 2ets whether to ignore sending test results.- Parameters:
ignoreSendingTestResultsToInflux- whether to ignore sending test results
-
getIgnoreSendingTestCoverageToInflux
public boolean getIgnoreSendingTestCoverageToInflux()Gets whether to ignore sending test coverage.- Returns:
- whether to ignore sending test coverage
-
setIgnoreSendingTestCoverageToInflux
@DataBoundSetter public void setIgnoreSendingTestCoverageToInflux(boolean ignoreSendingTestCoverageToInflux) Sets whether to ignore sending test results.- Parameters:
ignoreSendingTestCoverageToInflux- whether to ignore sending test results
-
getInfluxDbRetentionPolicy
Gets the InfluxDB retention policy.- Returns:
- the retention policy
-
setInfluxDbRetentionPolicy
Sets the InfluxDB retention policy.- Parameters:
influxDbRetentionPolicy- the retention policy
-
getDbVersion
Gets the InfluxDB database version.- Returns:
- the database version
-
setDbVersion
Sets the InfluxDB database version.- Parameters:
dbVersion- the database version
-
setDbVersion
-
doFillDbVersionItems
Fills the list box in the settings page with valid database versions. -
getEnableStatsd
public boolean getEnableStatsd()Gets whether writing to StatsD is enabled.- Returns:
- true if writing to StatsD is enabled
-
setEnableStatsd
@DataBoundSetter public void setEnableStatsd(boolean enableStatsd) Sets whether writing to StatsD is enabled.- Parameters:
enableStatsd- true to enable writing to StatsD
-
getStatsdHost
Gets the StatsD host.- Returns:
- the host
-
setStatsdHost
Sets the StatsD host.- Parameters:
statsdHost- the host
-
getStatsdPort
Gets the StatsD port.- Returns:
- the port
-
setStatsdPort
Sets the StatsD port.- Parameters:
statsdPort- the port
-
getStatsdBucket
Gets the StatsD bucket.- Returns:
- the bucket
-
setStatsdBucket
Sets the StatsD bucket.- Parameters:
statsdBucket- the bucket
-
getStatsdMaxSize
Gets the StatsD maximum packet size.- Returns:
- the maximum packet size
-
setStatsdMaxSize
Sets the StatsD maximum packet size.- Parameters:
statsdMaxSize- the maximum packet size
-
doFillCredentialsIdItems
Fills the list box in the settings page with valid credentials.- Parameters:
credentialsId- the current credentials id- Returns:
- ListBoxModel containing credentials to show
-
doFillHttpCredentialsIdItems
Fills the list box in the settings page with valid HTTP credentials.- Parameters:
credentialsId- the current credentials id- Returns:
- ListBoxModel containing credentials to show
-
doCheckCredentialsId
Validates the credentials id.- Parameters:
item- context for validationvalue- to validate- Returns:
- FormValidation
-
doCheckHttpCredentialsId
public FormValidation doCheckHttpCredentialsId(@AncestorInPath Item item, @QueryParameter String value) Validates the HTTP credentials id.- Parameters:
item- context for validationvalue- to validate- Returns:
- FormValidation
-
doCheckHttpEndpoint
-
getCredentials
-