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 class
Optional job config block for advanced settings.static final class
Optional config block for CORS settings.static final class
static final class
Deprecated.static final class
Optional job config block for issues.static final class
Optional job config block for Robot Framework support.static final class
Optional job config block for TAP support.static final class
Optional job config block for ruleset settings.static final class
Optional job config block for on-premise settings.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
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 boolean
doPerform
(Run<?, ?> build, FilePath workspace, TaskListener listener) Execute our logic.Declares the scope of the synchronization monitor thisBuildStep
expects from outside.static boolean
boolean
Return true if thisPublisher
needs to run after the build result is fully finalized.boolean
perform
(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) void
protected Object
void
setAdvancedSettings
(TestlabNotifier.AdvancedSettings advancedSettings) void
setAutomationSource
(String automationSource) void
setDescription
(String description) void
setParameters
(String parameters) void
setPublishRobot
(TestlabNotifier.PublishRobot publishRobot) void
setPublishTap
(TestlabNotifier.PublishTap publishTap) void
setRuleset
(String ruleset) void
setRulesetSettings
(TestlabNotifier.RulesetSettings rulesetSettings) toString()
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuild
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, prebuild
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, prebuild
Methods 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 thisPublisher
needs to run after the build result is fully finalized. The execution of normalPublisher
s 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. WhenPublisher
behaves this way, note that they can no longer change the build status anymore.- Overrides:
needsToRunAfterFinalized
in classPublisher
- Since:
- 1.153
-
getRequiredMonitorService
Declares the scope of the synchronization monitor thisBuildStep
expects from outside.- Specified by:
getRequiredMonitorService
in 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:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
perform
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
- Throws:
InterruptedException
IOException
-
doPerform
protected boolean doPerform(Run<?, ?> build, FilePath workspace, TaskListener listener) throws IOException, InterruptedExceptionExecute our logic. Should throw AbortException for graceful and polite errors.- Throws:
IOException
InterruptedException
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<Publisher>
- Overrides:
getDescriptor
in classNotifier
-
isBlank
- Returns:
- true if trimmed String is empty
-
toString
-