Class SonargraphReportBuilder
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- com.hello2morrow.sonargraph.integration.jenkins.controller.AbstractSonargraphRecorder
-
- com.hello2morrow.sonargraph.integration.jenkins.controller.SonargraphReportBuilder
-
- All Implemented Interfaces:
IReportPathProvider
,hudson.ExtensionPoint
,hudson.model.Action
,hudson.model.Describable<hudson.tasks.Publisher>
,hudson.model.ModelObject
,hudson.tasks.BuildStep
,Serializable
,jenkins.model.RunAction2
,jenkins.tasks.SimpleBuildStep
,jenkins.tasks.SimpleBuildStep.LastBuildAction
@Symbol("SonargraphReport") public final class SonargraphReportBuilder extends AbstractSonargraphRecorder implements IReportPathProvider, jenkins.tasks.SimpleBuildStep, jenkins.tasks.SimpleBuildStep.LastBuildAction, jenkins.model.RunAction2, Serializable
This class contains all the functionality of the build step.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SonargraphReportBuilder.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
-
-
Field Summary
Fields Modifier and Type Field Description static String
DO_NOT_SPLIT
static int
MAX_PORT_NUMBER
-
Constructor Summary
Constructors Constructor Description SonargraphReportBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
diffReportCreated()
String
getActivationCode()
String
getBaselineReportPath()
String
getChartConfiguration()
SonargraphReportBuilder.DescriptorImpl
getDescriptor()
String
getDisplayName()
String
getIconFileName()
boolean
getLanguageCPlusPlus()
boolean
getLanguageCSharp()
boolean
getLanguageJava()
boolean
getLanguagePython()
protected static String
getLanguages(boolean languageJava, boolean languageCPlusPlus, boolean languageCSharp, boolean languagePython)
Returns comma separated list of languages in 'Sonargraph historical' order.String
getLicenseFile()
String
getLogFile()
String
getLogLevel()
String
getMetaDataFile()
List<Metric>
getMetrics()
Collection<? extends hudson.model.Action>
getProjectActions()
Collection<hudson.model.Action>
getProjectActions(hudson.model.AbstractProject<?,?> project)
We override the getProjectAction method to define our custom action that will show the charts for sonargraph's metrics.String
getQualityModelFile()
String
getReportDirectory()
String
getReportGeneration()
String
getReportPath()
String
getSnapshotDirectory()
String
getSnapshotFileName()
String
getSonargraphBuildJDK()
String
getSonargraphBuildVersion()
String
getSystemDirectory()
String
getUrlName()
String
getVirtualModel()
String
getWorkspaceProfile()
boolean
isAllCharts()
boolean
isCplusplusCharts()
boolean
isCsharpCharts()
boolean
isGeneratedBySonargraphBuild()
boolean
isJavaCharts()
boolean
isPreGenerated()
boolean
isPythonCharts()
boolean
isSelectedCharts()
boolean
isSkip()
boolean
isUseHttpProxy()
void
onAttached(hudson.model.Run<?,?> run)
void
onLoad(hudson.model.Run<?,?> run)
void
perform(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener)
void
setActivationCode(String activationCode)
void
setBaselineReportPath(String baselineReportPath)
void
setChartConfiguration(String chartConfiguration)
void
setLanguageCPlusPlus(boolean languageCPlusPlus)
void
setLanguageCSharp(boolean languageCSharp)
void
setLanguageJava(boolean languageJava)
void
setLanguagePython(boolean languagePython)
void
setLicenseFile(String licenseFile)
void
setLogFile(String logFile)
void
setLogLevel(String logLevel)
void
setMetaDataFile(String metaDataFile)
void
setMetrics(List<Metric> metrics)
void
setQualityModelFile(String qualityModelFile)
void
setReportGeneration(String reportGeneration)
void
setReportPath(String reportPath)
void
setSkip(boolean skip)
void
setSnapshotDirectory(String snapshotDirectory)
void
setSnapshotFileName(String snapshotFileName)
void
setSonargraphBuildJDK(String sonargraphBuildJDK)
void
setSonargraphBuildVersion(String sonargraphBuildVersion)
void
setSystemDirectory(String systemDirectory)
void
setUseHttpProxy(boolean useHttpProxy)
void
setVirtualModel(String virtualModel)
void
setWorkspaceProfile(String workspaceProfile)
static boolean
validateNotNullAndRegexp(String value, String pattern)
-
Methods inherited from class com.hello2morrow.sonargraph.integration.jenkins.controller.AbstractSonargraphRecorder
getArchitectureViolationsAction, getArchitectureWarningsAction, getCyclicElementsAction, getEmptyWorkspaceAction, getQualityGateAction, getRequiredMonitorService, getThresholdViolationsAction, getUnassignedTypesAction, getWorkItemsAction, getWorkspaceWarningsAction, logExecutionStart, logExecutionStart, processSonargraphReport, setArchitectureViolationsAction, setArchitectureWarningsAction, setCyclicElementsAction, setEmptyWorkspaceAction, setQualityGateAction, setThresholdViolationsAction, setUnassignedTypesAction, setWorkItemsAction, setWorkspaceWarningsAction
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, perform, perform, prebuild
-
-
-
-
Field Detail
-
MAX_PORT_NUMBER
public static final int MAX_PORT_NUMBER
- See Also:
- Constant Field Values
-
DO_NOT_SPLIT
public static final String DO_NOT_SPLIT
- See Also:
- Constant Field Values
-
-
Method Detail
-
setSkip
@DataBoundSetter public void setSkip(boolean skip)
-
setUseHttpProxy
@DataBoundSetter public void setUseHttpProxy(boolean useHttpProxy)
-
setSystemDirectory
@DataBoundSetter public void setSystemDirectory(String systemDirectory)
-
setQualityModelFile
@DataBoundSetter public void setQualityModelFile(String qualityModelFile)
-
setVirtualModel
@DataBoundSetter public void setVirtualModel(String virtualModel)
-
setReportPath
@DataBoundSetter public void setReportPath(String reportPath)
-
setBaselineReportPath
@DataBoundSetter public void setBaselineReportPath(String baselineReportPath)
-
setReportGeneration
@DataBoundSetter public void setReportGeneration(String reportGeneration)
-
setChartConfiguration
@DataBoundSetter public void setChartConfiguration(String chartConfiguration)
-
setMetaDataFile
@DataBoundSetter public void setMetaDataFile(String metaDataFile)
-
setLanguageJava
@DataBoundSetter public void setLanguageJava(boolean languageJava)
-
setLanguageCSharp
@DataBoundSetter public void setLanguageCSharp(boolean languageCSharp)
-
setLanguageCPlusPlus
@DataBoundSetter public void setLanguageCPlusPlus(boolean languageCPlusPlus)
-
setLanguagePython
@DataBoundSetter public void setLanguagePython(boolean languagePython)
-
setSonargraphBuildJDK
@DataBoundSetter public void setSonargraphBuildJDK(String sonargraphBuildJDK)
-
setSonargraphBuildVersion
@DataBoundSetter public void setSonargraphBuildVersion(String sonargraphBuildVersion)
-
setActivationCode
@DataBoundSetter public void setActivationCode(String activationCode)
-
setLicenseFile
@DataBoundSetter public void setLicenseFile(String licenseFile)
-
setWorkspaceProfile
@DataBoundSetter public void setWorkspaceProfile(String workspaceProfile)
-
setSnapshotDirectory
@DataBoundSetter public void setSnapshotDirectory(String snapshotDirectory)
-
setSnapshotFileName
@DataBoundSetter public void setSnapshotFileName(String snapshotFileName)
-
setLogLevel
@DataBoundSetter public void setLogLevel(String logLevel)
-
setLogFile
@DataBoundSetter public void setLogFile(String logFile)
-
getProjectActions
public Collection<hudson.model.Action> getProjectActions(hudson.model.AbstractProject<?,?> project)
We override the getProjectAction method to define our custom action that will show the charts for sonargraph's metrics.- Specified by:
getProjectActions
in interfacehudson.tasks.BuildStep
- Overrides:
getProjectActions
in classhudson.tasks.BuildStepCompatibilityLayer
-
perform
public void perform(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener) throws InterruptedException, IOException
- Specified by:
perform
in interfacejenkins.tasks.SimpleBuildStep
- Throws:
InterruptedException
IOException
-
getReportPath
public String getReportPath()
- Specified by:
getReportPath
in interfaceIReportPathProvider
-
getBaselineReportPath
public String getBaselineReportPath()
-
diffReportCreated
public boolean diffReportCreated()
-
getMetaDataFile
public String getMetaDataFile()
-
getLanguageJava
public boolean getLanguageJava()
-
getLanguageCSharp
public boolean getLanguageCSharp()
-
getLanguageCPlusPlus
public boolean getLanguageCPlusPlus()
-
getLanguagePython
public boolean getLanguagePython()
-
getLanguages
protected static String getLanguages(boolean languageJava, boolean languageCPlusPlus, boolean languageCSharp, boolean languagePython)
Returns comma separated list of languages in 'Sonargraph historical' order.- Returns:
-
getSonargraphBuildJDK
public String getSonargraphBuildJDK()
-
getSonargraphBuildVersion
public String getSonargraphBuildVersion()
-
getActivationCode
public String getActivationCode()
-
getLicenseFile
public String getLicenseFile()
-
getWorkspaceProfile
public String getWorkspaceProfile()
-
getSnapshotDirectory
public String getSnapshotDirectory()
-
getSnapshotFileName
public String getSnapshotFileName()
-
getLogLevel
public String getLogLevel()
- Returns:
- the logLevel
-
getLogFile
public String getLogFile()
-
getReportDirectory
public String getReportDirectory()
- Specified by:
getReportDirectory
in interfaceIReportPathProvider
-
getSystemDirectory
public String getSystemDirectory()
-
getReportGeneration
public String getReportGeneration()
-
getChartConfiguration
public String getChartConfiguration()
-
getQualityModelFile
public String getQualityModelFile()
-
getVirtualModel
public String getVirtualModel()
-
isGeneratedBySonargraphBuild
public boolean isGeneratedBySonargraphBuild()
-
isPreGenerated
public boolean isPreGenerated()
-
isAllCharts
public boolean isAllCharts()
-
isJavaCharts
public boolean isJavaCharts()
-
isCplusplusCharts
public boolean isCplusplusCharts()
-
isCsharpCharts
public boolean isCsharpCharts()
-
isPythonCharts
public boolean isPythonCharts()
-
isSelectedCharts
public boolean isSelectedCharts()
-
isSkip
public boolean isSkip()
-
isUseHttpProxy
public boolean isUseHttpProxy()
-
getDescriptor
public SonargraphReportBuilder.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfacehudson.model.Describable<hudson.tasks.Publisher>
- Overrides:
getDescriptor
in classhudson.tasks.Recorder
-
validateNotNullAndRegexp
public static boolean validateNotNullAndRegexp(String value, String pattern)
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileName
in interfacehudson.model.Action
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfacehudson.model.Action
- Specified by:
getDisplayName
in interfacehudson.model.ModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interfacehudson.model.Action
-
getProjectActions
public Collection<? extends hudson.model.Action> getProjectActions()
- Specified by:
getProjectActions
in interfacejenkins.tasks.SimpleBuildStep.LastBuildAction
-
onAttached
public void onAttached(hudson.model.Run<?,?> run)
- Specified by:
onAttached
in interfacejenkins.model.RunAction2
-
onLoad
public void onLoad(hudson.model.Run<?,?> run)
- Specified by:
onLoad
in interfacejenkins.model.RunAction2
-
-