Class InteractiveOutputStep

java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
org.jenkinsci.plugins.workflow.steps.Step
io.jenkins.plugins.interactiveinput.step.InteractiveOutputStep
All Implemented Interfaces:
ExtensionPoint, Describable<org.jenkinsci.plugins.workflow.steps.Step>, Serializable

public class InteractiveOutputStep extends org.jenkinsci.plugins.workflow.steps.Step implements Serializable
The interactiveOutput pipeline step: publish per-build statistics (cost, carbon footprint, resource usage, …) as KPI cards + a table on the build page, and feed a per-job trend chart.

 interactiveOutput(reportName: 'Cost report', metrics: [
   [label: 'Total cost',   value: '12.40', unit: 'USD', key: 'cost'],
   [label: 'CPU minutes',  value: '318',    unit: 'min', key: 'cpu'],
   [label: 'Carbon',       value: '0.42',   unit: 'kgCO2e', key: 'carbon']
 ])
 

Metrics whose value is numeric and that carry a key also feed the per-job trend chart (the key identifies the series across builds). The data is stored in the build's InteractiveOutputBuildAction (persisted in build.xml). The step is synchronous and returns the report name.

See Also:
  • Constructor Details

    • InteractiveOutputStep

      @DataBoundConstructor public InteractiveOutputStep(@NonNull String reportName)
  • Method Details

    • getReportName

      @NonNull public String getReportName()
    • getMetrics

      @NonNull public List<Metric> getMetrics()
    • setMetrics

      @DataBoundSetter public void setMetrics(@CheckForNull List<Metric> metrics)
    • isNotify

      public boolean isNotify()
    • setNotify

      @DataBoundSetter public void setNotify(boolean notify)
    • getChartType

      @NonNull public String getChartType()
      Returns:
      the per-job chart type: line (default), bar, pie or timeseries.
    • setChartType

      @DataBoundSetter public void setChartType(@CheckForNull String chartType)
    • start

      public org.jenkinsci.plugins.workflow.steps.StepExecution start(org.jenkinsci.plugins.workflow.steps.StepContext context) throws Exception
      Specified by:
      start in class org.jenkinsci.plugins.workflow.steps.Step
      Throws:
      Exception