With Jenkins 2 Pipeline plugin, there\'s a useful feature allowing a quick overview of the pipeline stages and status of steps, including logging output.
However, if
Try this, a good workaround
import org.jenkinsci.plugins.workflow.cps.CpsThread import org.jenkinsci.plugins.workflow.actions.LabelAction def test() { def xyz = "Prints PWD" try { sh script: 'pwd' } finally { CpsThread.current().head.get().addAction(new LabelAction("Shell script ${xyz} ")) } }