Jenkins setup: 2.462 LTS running in Kubernetes with Declarative pipelines. All plugins are under 3 weeks old.
We have a custom jenkins library where we have custom steps. One of the steps is intended to always run after the steps:
stage {
agent { ... }
steps { ... }
post { always { postSteps() } }
}
The postSteps.groovy is roughly:
def call(Map args = [:]) {
if (!args.label) {
args.label = "clumioPostSteps(${args ? args.inspect() : ''})"
}
if (fileExists('build/peak-ram.log')) {
args.label += ' - peak ram'
}
args.script = libraryResource('com/jenkinslib/shell/post-steps.sh')
sh(args)
archiveArtifacts(artifacts: 'build/pod-metrics.tgz', fingerprint: false, )
}
My issue is that fileExists()
and libraryResource()
which are implementation details of postSteps()
are shown as sequential steps of the stage to the users of the pipeline. I would like to have them masked as it is mostly noise as far as the pipeline business logic is concerned.
These ‘sub-steps’ are explicitly showed in both BlueOcean and the newer PipelineOverview views.
In this screenshot what I would like to see is the first 2 steps to be masked, the other 2 being meaningful to the end user: