Class DatadogJobProperty<T extends Job<?,?>>
- java.lang.Object
-
- hudson.model.JobProperty<T>
-
- org.datadog.jenkins.plugins.datadog.DatadogJobProperty<T>
-
- All Implemented Interfaces:
ExtensionPoint,Describable<JobProperty<?>>,ReconfigurableDescribable<JobProperty<?>>,BuildStep
public class DatadogJobProperty<T extends Job<?,?>> extends JobProperty<T>
Create a job property for use with Datadog plugin.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDatadogJobProperty.DatadogJobPropertyDescriptor-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.JobProperty
owner
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description DatadogJobProperty()Runs when theDatadogJobPropertyclass is created.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetTagFile()Gets the tagFile set in the job configuration.StringgetTagProperties()Gets a list of tag properties to be submitted with the Build to Datadog.booleanisEmitSCMEvents()booleanisEnableFile()Gets the enableFile set in the job configuration.booleanisEnableProperty()Gets the enableProperty set in the job configuration.StringreadTagFile(Run<?,?> r)Method to read the contents of the specified file in theDatadogJobPropertyvoidsetEmitSCMEvents(boolean emitSCMEvents)Set the checkbox in the UI, used for Jenkins data bindingvoidsetEnableFile(boolean enableFile)Sets the enableFile set in the job configuration.voidsetEnableProperty(boolean enableProperty)Sets the enableProperty set in the job configuration.voidsetTagFile(String tagFile)Sets the tagFile set in the job configuration.voidsetTagProperties(String tagProperties)-
Methods inherited from class hudson.model.JobProperty
getDescriptor, getJobAction, getJobActions, getJobOverrides, getProjectAction, getProjectActions, getRequiredMonitorService, getSubTasks, perform, prebuild, reconfigure, setOwner
-
-
-
-
Constructor Detail
-
DatadogJobProperty
@DataBoundConstructor public DatadogJobProperty()
Runs when theDatadogJobPropertyclass is created.
-
-
Method Detail
-
getTagProperties
public String getTagProperties()
Gets a list of tag properties to be submitted with the Build to Datadog.- Returns:
- a String representing a list of tag properties.
-
setTagProperties
@DataBoundSetter public void setTagProperties(String tagProperties)
- Parameters:
tagProperties- - The configured tag properties. Text area in the job configuration
-
getTagFile
public String getTagFile()
Gets the tagFile set in the job configuration.- Returns:
- a String representing the relative path to a tagFile
-
setTagFile
@DataBoundSetter public void setTagFile(String tagFile)
Sets the tagFile set in the job configuration.- Parameters:
tagFile- - a String representing the relative path to a tagFile
-
isEnableFile
public boolean isEnableFile()
Gets the enableFile set in the job configuration.- Returns:
- a boolean representing the enableFile checkbox
-
setEnableFile
@DataBoundSetter public void setEnableFile(boolean enableFile)
Sets the enableFile set in the job configuration.- Parameters:
enableFile- - a boolean representing the enableFile checkbox
-
isEnableProperty
public boolean isEnableProperty()
Gets the enableProperty set in the job configuration.- Returns:
- a boolean representing the enableProperty checkbox
-
setEnableProperty
@DataBoundSetter public void setEnableProperty(boolean enableProperty)
Sets the enableProperty set in the job configuration.- Parameters:
enableProperty- - a boolean representing the enableProperty checkbox
-
isEmitSCMEvents
public boolean isEmitSCMEvents()
- Returns:
- - A
Booleanindicating if the user has configured Datadog to emit SCM related events.
-
setEmitSCMEvents
@DataBoundSetter public void setEmitSCMEvents(boolean emitSCMEvents)
Set the checkbox in the UI, used for Jenkins data binding- Parameters:
emitSCMEvents- - The checkbox status (checked/unchecked)
-
readTagFile
public String readTagFile(Run<?,?> r)
Method to read the contents of the specified file in theDatadogJobProperty- Parameters:
r- - Current build- Returns:
- - A String containing the contents of the scanned file. Returns null when the file cannot be found.
-
-