Package fi.meliora.testlab.ext.jenkins
Class TestlabNotifier
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Notifier
fi.meliora.testlab.ext.jenkins.TestlabNotifier
- All Implemented Interfaces:
ExtensionPoint,Describable<Publisher>,BuildStep,SimpleBuildStep
A post build action to publish test results to Meliora Testlab.
- Author:
- Meliora Ltd
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOptional job config block for advanced settings.static final classOptional config block for CORS settings.static final classstatic final classDeprecated.static final classOptional job config block for issues.static final classOptional job config block for Robot Framework support.static final classOptional job config block for TAP support.static final classOptional job config block for ruleset settings.static final classOptional job config block for on-premise settings.Nested 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
ConstructorsConstructorDescriptionTestlabNotifier(String projectKey, String ruleset, TestlabNotifier.RulesetSettings rulesetSettings, String description, String parameters, TestlabNotifier.PublishRobot publishRobot, TestlabNotifier.PublishTap publishTap, TestlabNotifier.AdvancedSettings advancedSettings) This annotation tells Hudson to call this constructor, with values from the configuration form page with matching parameter names. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleandoPerform(Run<?, ?> build, FilePath workspace, TaskListener listener) Execute our logic.Declares the scope of the synchronization monitor thisBuildStepexpects from outside.static booleanbooleanReturn true if thisPublisherneeds to run after the build result is fully finalized.booleanperform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) voidprotected ObjectvoidsetAdvancedSettings(TestlabNotifier.AdvancedSettings advancedSettings) voidsetAutomationSource(String automationSource) voidsetDescription(String description) voidsetParameters(String parameters) voidsetPublishRobot(TestlabNotifier.PublishRobot publishRobot) voidsetPublishTap(TestlabNotifier.PublishTap publishTap) voidsetRuleset(String ruleset) voidsetRulesetSettings(TestlabNotifier.RulesetSettings rulesetSettings) toString()Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, prebuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, prebuildMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Field Details
-
DEFAULT_DESCRIPTION_TEMPLATE
- See Also:
-
DEFAULT_AUTOMATIONSOURCE
- See Also:
-
-
Constructor Details
-
TestlabNotifier
@DataBoundConstructor public TestlabNotifier(String projectKey, String ruleset, TestlabNotifier.RulesetSettings rulesetSettings, String description, String parameters, TestlabNotifier.PublishRobot publishRobot, TestlabNotifier.PublishTap publishTap, TestlabNotifier.AdvancedSettings advancedSettings) This annotation tells Hudson to call this constructor, with values from the configuration form page with matching parameter names.
-
-
Method Details
-
getProjectKey
-
getRuleset
-
setRuleset
-
getRulesetSettings
-
setRulesetSettings
-
getAutomationSource
-
setAutomationSource
-
getDescription
-
setDescription
-
getParameters
-
setParameters
-
getPublishRobot
-
setPublishRobot
-
getPublishTap
-
setPublishTap
-
getAdvancedSettings
-
setAdvancedSettings
-
readResolve
-
needsToRunAfterFinalized
public boolean needsToRunAfterFinalized()Return true if thisPublisherneeds to run after the build result is fully finalized. The execution of normalPublishers are considered within a part of the build. This allows publishers to mark the build as a failure, or to include their execution time in the total build time. So normally, that is the preferrable behavior, but in a few cases this is problematic. One of such cases is when a publisher needs to trigger other builds, which in turn need to see this build as a completed build. Those plugins that need to do this can return true from this method, so that theperform(hudson.model.AbstractBuild, hudson.Launcher, hudson.model.BuildListener)method is called after the build is marked as completed. WhenPublisherbehaves this way, note that they can no longer change the build status anymore.- Overrides:
needsToRunAfterFinalizedin classPublisher- Since:
- 1.153
-
getRequiredMonitorService
Declares the scope of the synchronization monitor thisBuildStepexpects from outside.- Specified by:
getRequiredMonitorServicein interfaceBuildStep- Since:
- 1.319
-
perform
public void perform(@NonNull Run<?, ?> run, @NonNull FilePath workspace, @NonNull EnvVars env, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException- Specified by:
performin interfaceSimpleBuildStep- Throws:
InterruptedExceptionIOException
-
perform
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException- Specified by:
performin interfaceBuildStep- Overrides:
performin classBuildStepCompatibilityLayer- Throws:
InterruptedExceptionIOException
-
doPerform
protected boolean doPerform(Run<?, ?> build, FilePath workspace, TaskListener listener) throws IOException, InterruptedExceptionExecute our logic. Should throw AbortException for graceful and polite errors.- Throws:
IOExceptionInterruptedException
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<Publisher>- Overrides:
getDescriptorin classNotifier
-
isBlank
- Returns:
- true if trimmed String is empty
-
toString
-