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,ExtensionPoint,Action,Describable<Publisher>,ModelObject,BuildStep,Serializable,RunAction2,SimpleBuildStep,SimpleBuildStep.LastBuildAction
@Symbol("SonargraphReport")
public final class SonargraphReportBuilder
extends AbstractSonargraphRecorder
implements IReportPathProvider, SimpleBuildStep, SimpleBuildStep.LastBuildAction, RunAction2, Serializable
This class contains all the functionality of the build step.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImplNested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory -
Field Summary
FieldsFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanbooleanprotected static StringgetLanguages(boolean languageJava, boolean languageCPlusPlus, boolean languageCSharp, boolean languagePython) Returns comma separated list of languages in 'Sonargraph historical' order.Collection<? extends Action>getProjectActions(AbstractProject<?, ?> project) We override the getProjectAction method to define our custom action that will show the charts for sonargraph's metrics.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisSkip()booleanvoidonAttached(Run<?, ?> run) voidvoidperform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) voidsetActivationCode(String activationCode) voidsetBaselineReportPath(String baselineReportPath) voidsetChartConfiguration(String chartConfiguration) voidsetLanguageCPlusPlus(boolean languageCPlusPlus) voidsetLanguageCSharp(boolean languageCSharp) voidsetLanguageJava(boolean languageJava) voidsetLanguagePython(boolean languagePython) voidsetLicenseFile(String licenseFile) voidsetLogFile(String logFile) voidsetLogLevel(String logLevel) voidsetMetaDataFile(String metaDataFile) voidsetMetrics(List<Metric> metrics) voidsetQualityModelFile(String qualityModelFile) voidsetReportGeneration(String reportGeneration) voidsetReportPath(String reportPath) voidsetSkip(boolean skip) voidsetSnapshotDirectory(String snapshotDirectory) voidsetSnapshotFileName(String snapshotFileName) voidsetSonargraphBuildJDK(String sonargraphBuildJDK) voidsetSonargraphBuildVersion(String sonargraphBuildVersion) voidsetSystemDirectory(String systemDirectory) voidsetUseHttpProxy(boolean useHttpProxy) voidsetVirtualModel(String virtualModel) voidsetWorkspaceProfile(String workspaceProfile) static booleanvalidateNotNullAndRegexp(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, setWorkspaceWarningsActionMethods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, perform, perform, prebuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.tasks.BuildStep
getProjectAction, getRequiredMonitorService, perform, prebuildMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Field Details
-
MAX_PORT_NUMBER
public static final int MAX_PORT_NUMBER- See Also:
-
DO_NOT_SPLIT
- See Also:
-
-
Constructor Details
-
SonargraphReportBuilder
@DataBoundConstructor public SonargraphReportBuilder()
-
-
Method Details
-
setSkip
@DataBoundSetter public void setSkip(boolean skip) -
setUseHttpProxy
@DataBoundSetter public void setUseHttpProxy(boolean useHttpProxy) -
setSystemDirectory
-
setQualityModelFile
-
setVirtualModel
-
setReportPath
-
setBaselineReportPath
-
setReportGeneration
-
setChartConfiguration
-
setMetrics
-
setMetaDataFile
-
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
-
setSonargraphBuildVersion
-
setActivationCode
-
setLicenseFile
-
setWorkspaceProfile
-
setSnapshotDirectory
-
setSnapshotFileName
-
setLogLevel
-
setLogFile
-
getProjectActions
We override the getProjectAction method to define our custom action that will show the charts for sonargraph's metrics.- Specified by:
getProjectActionsin interfaceBuildStep- Overrides:
getProjectActionsin classBuildStepCompatibilityLayer
-
perform
public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException- Specified by:
performin interfaceSimpleBuildStep- Throws:
InterruptedExceptionIOException
-
getReportPath
- Specified by:
getReportPathin interfaceIReportPathProvider
-
getBaselineReportPath
-
diffReportCreated
public boolean diffReportCreated() -
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
-
getSonargraphBuildVersion
-
getActivationCode
-
getLicenseFile
-
getWorkspaceProfile
-
getSnapshotDirectory
-
getSnapshotFileName
-
getLogLevel
- Returns:
- the logLevel
-
getLogFile
-
getReportDirectory
- Specified by:
getReportDirectoryin interfaceIReportPathProvider
-
getSystemDirectory
-
getReportGeneration
-
getChartConfiguration
-
getQualityModelFile
-
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() -
getMetrics
-
isSkip
public boolean isSkip() -
isUseHttpProxy
public boolean isUseHttpProxy() -
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<Publisher>- Overrides:
getDescriptorin classRecorder
-
validateNotNullAndRegexp
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getProjectActions
- Specified by:
getProjectActionsin interfaceSimpleBuildStep.LastBuildAction
-
onAttached
- Specified by:
onAttachedin interfaceRunAction2
-
onLoad
- Specified by:
onLoadin interfaceRunAction2
-