StepResult

1 minute readReferenceExtensibilityDeveloper productivity

This class provides methods to provide various output results of a step in different runtime contexts.

setJobStepOutcome(String jobStepOutcome)

Sets a job step outcome. Could be warning, success or an error.

Parameters

(Required)(String) desired procedure/task outcome. Could be one of

warning, success, error.

Returns

Nothing

Usage

stepResult.setJobStepOutcome('warning')

setPipelineSummary(String pipelineSummaryName, String pipelineSummaryText)

Sets the summary of the current pipeline task.

Parameters

  • (Required)(String) Pipeline Summary Property Text

  • (Required)(String) Pipeline Summary Value.

Returns

Nothing

Usage

stepResult.setPipelineSummary('Procedure Execution Result:', 'All tests are ok')

setJobStepSummary(String jobStepSummary)

Sets the summary of the current job step.

Parameters

(Required)(String) Job Step Summary

Returns

Nothing

Usage

stepResult.setJobStepSummary('All tests are ok in this step.')

setJobSummary(String jobSummary)

Sets the summary of the current job.

Parameters

(Required)(String) Job Summary

Returns

Nothing

Usage

stepResult.setJobSummary('All tests are ok')

setOutcomeProperty(String propertyPath, String propertyValue)

Sets the outcome property.

Parameters

  • (Required)(String) Property Path

  • (Required)(String) Value of property to be set

Returns

Nothing

stepResult.setOutcomeProperty('/myJob/buildNumber', '42')

setOutputParameter(String parameterName, String parameterValue)

Sets an output parameter for a job.

Parameters

  • (Required)(String) Output parameter name

  • (Required)(String) Output parameter value

Returns

Nothing

stepResult.setOutputParameter('Last Build Number', '42')

setReportUrl(String reportName, String reportUrl)

Sets a report name and its URL for the job. If it is being invoked in pipeline runs, it also sets a property which is in turn used to show the link in pipeline summary.

Parameters

  • (Required)(String) Report name

  • (Required)(String) Report URL

Returns

Nothing

stepResult.setReportUrl('Build Link #42', 'http://localhost:8080/job/HelloWorld/42')

apply()

Applies scheduled changes without schedule cleanup in queue order: first scheduled, first executed.

Parameters

None

Returns

Nothing

Usage

stepResult.apply()

flush()

Flushes scheduled actions.

Parameters

None

Returns

Nothing

Usage

stepResult.flush()

applyAndFlush()

Executes the schedule queue and flushes it then.

Parameters

None

Returns

Nothing

Usage

stepResult.applyAndFlush()