jenkinsci / jenkinsci/workflow-aggregator-plugin
[JENKINS-37849] access and display 'step' informations such as duration
- Dominant language
- No language data
- Stars
- 225
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
In my pipelines I'm using parallel steps, for which I would like to know how long each step lasted.
With serial steps I can cut in stages, that's fine.
With parallel steps it's impossible.
Having access to the whole build information is possible using currentBuild object
It would be very useful to access the same way to current step, and then simply println the required information. (duration, status, whatever).
For now, the only way to know what parallel step was the slower is to brows through each console output, with the step wrapped in timestamper. ... not something acceptable.
I could also try to compute the duration myself (using java Date, and compute difference between start and end) but there are two major flaws here :
- would require 'script approval' on any master I work on (and yeah, I work on a lot)
- completely blurs the functional code of the pipeline with useless code
---
Originally reported by
squalou, imported from: access and display 'step' informations such as duration
jglick
Raw content of original issue
In my pipelines I'm using parallel steps, for which I would like to know how long each step lasted.
With serial steps I can cut in stages, that's fine.
With parallel steps it's impossible.
Having access to the whole build information is possible using currentBuild object
It would be very useful to access the same way to current step, and then simply println the required information. (duration, status, whatever).
For now, the only way to know what parallel step was the slower is to brows through each console output, with the step wrapped in timestamper. ... not something acceptable.
I could also try to compute the duration myself (using java Date, and compute difference between start and end) but there are two major flaws here :
- would require 'script approval' on any master I work on (and yeah, I work on a lot)
- completely blurs the functional code of the pipeline with useless code
Contributor guide
Research direction
Start with workflow-support-plugin's src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java and compare its currentBuild access with the requested current step access for parallel pipeline steps. Done means pipeline users can retrieve step information such as duration and status without manually wrapping steps in timestamper or computing dates in script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100