(comments inline) Am Sonntag, 22. Januar 2017 03:05:45 UTC+1 schrieb Jesse Glick: > > On Fri, Jan 20, 2017 at 11:48 AM, Adakar <[email protected] <javascript:>> > wrote: > > how to get current Stage name inside the > > SimpleBuildStep.perform(Run<?,?> run, FilePath workspace, Launcher > launcher, > > TaskListener listener)method? > > You cannot. > > If you switched from `SimpleBuildStep` to a full-fledged `Step`, you > could get your `FlowNode` from the `StepContext` and use > `FlowScanningUtils.fetchEnclosingBlocks` to look for `LabelAction`, > which will match `stage(…) {…}` as well as some other steps that > define labels in block scope. > > (But do you *really* need this information?) >
This sounds interessing. I also have a use case for that (the gerrit-verify-status-reporter-plugin) <https://github.com/jenkinsci/gerrit-verify-status-reporter-plugin> It should report back the status and timing of parts of a job in a pipeline run, possibly setting a link to the relevant part of the log as well. There I would either need the predecessor node or an enclosing block, if I am not mistaken. So this then needs to be a full step. How to handle non-pipeline jobs then? Do I need a separate implementation then? Björn -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f80d535a-11a6-49cc-8601-13f4f43b5c3c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
