Class AbstractToolPublisher
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- de.tracetronic.jenkins.plugins.ecutest.report.AbstractReportPublisher
-
- de.tracetronic.jenkins.plugins.ecutest.report.AbstractToolPublisher
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
,SimpleBuildStep
- Direct Known Subclasses:
JUnitPublisher
,ReportGeneratorPublisher
,TMSPublisher
,TraceAnalysisPublisher
public abstract class AbstractToolPublisher extends AbstractReportPublisher
Common base class all report publishers which are using ecu.test as tool.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description AbstractToolPublisher(String toolName)
Instantiates a newAbstractToolPublisher
.AbstractToolPublisher(String toolName, boolean allowMissing, boolean runOnFailed, boolean archiving, boolean keepAll)
Instantiates a newAbstractToolPublisher
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ETInstallation
configureToolInstallation(Computer computer, TaskListener listener, EnvVars envVars)
Configures the tool installation for functioning in the node and the environment.ETInstallation
getInstallation()
protected ETClient
getToolClient(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener)
Configures an ecu.test client with given workspace settings.String
getToolName()
boolean
isInstallationVerified(EnvVars envVars)
Verify the installation object and updates properties if needed.void
setInstallation(ETInstallation installation)
Sets the ecu.test installation and the derived name.-
Methods inherited from class de.tracetronic.jenkins.plugins.ecutest.report.AbstractReportPublisher
canContinue, configureToolInstallation, getArchiveTarget, getArchiving, getDescriptor, getDirectorySize, getFileSize, getFirstReportFile, getKeepAll, getLogger, getProjectReportFiles, getReportDir, getReportDirs, getReportFiles, getReportFiles, getRequiredMonitorService, getSettingsDir, getToolClient, getToolDescriptor, getToolInstallation, getUrlName, getWorkspace, getWorkspaceDir, isAllowMissing, isArchiving, isDownstream, isETRunning, isKeepAll, isRunOnFailed, isSkipped, perform, performReport, randomId, removePreviousReports, setAllowMissing, setArchiving, setDownstream, setKeepAll, setReportDir, setRunOnFailed, setWorkspace
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Constructor Detail
-
AbstractToolPublisher
public AbstractToolPublisher(@Nonnull String toolName)
Instantiates a newAbstractToolPublisher
.- Parameters:
toolName
- the tool name
-
AbstractToolPublisher
public AbstractToolPublisher(@Nonnull String toolName, boolean allowMissing, boolean runOnFailed, boolean archiving, boolean keepAll)
Instantiates a newAbstractToolPublisher
.- Parameters:
toolName
- the tool nameallowMissing
- specifies whether missing reports are allowedrunOnFailed
- specifies whether this publisher even runs on a failed buildarchiving
- specifies whether archiving artifacts is enabledkeepAll
- specifies whether artifacts are archived for all successful builds, otherwise only the most recent
-
-
Method Detail
-
getInstallation
public ETInstallation getInstallation()
-
setInstallation
@DataBoundSetter public void setInstallation(ETInstallation installation)
Sets the ecu.test installation and the derived name.- Parameters:
installation
- the ecu.test installation
-
getToolClient
protected ETClient getToolClient(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException, ETPluginException
Configures an ecu.test client with given workspace settings. Re-registers the according ecu.test COM server if option is enabled.- Parameters:
run
- the runworkspace
- the workspacelauncher
- the launcherlistener
- the listener- Returns:
- the ecu.test client
- Throws:
IOException
- signals that an I/O exception has occurredInterruptedException
- the interrupted exceptionETPluginException
- in case of a COM exception
-
configureToolInstallation
protected ETInstallation configureToolInstallation(Computer computer, TaskListener listener, EnvVars envVars) throws IOException, InterruptedException, ETPluginException
Configures the tool installation for functioning in the node and the environment.- Parameters:
computer
- the computerlistener
- the listenerenvVars
- the environment variables- Returns:
- the tool installation
- Throws:
IOException
- signals that an I/O exception has occurredInterruptedException
- if the build gets interruptedETPluginException
- if the selected tool installation is not configured
-
isInstallationVerified
public boolean isInstallationVerified(EnvVars envVars)
Verify the installation object and updates properties if needed.- Parameters:
envVars
- the environment variables of the run- Returns:
true
if installation for given tool name exists,false
otherwise
-
-