Thanks for answer! I need it for some logging purposes. Let's sey that each step call genetares a report and I need this information to distinguish which report was generated for which stage. If you have any suggestion how to handle this different way, I would be grateful.
; W dniu niedziela, 22 stycznia 2017 03:05:45 UTC+1 użytkownik Jesse Glick napisał: > > 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?) > -- 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/7bc61c2e-95f9-4804-a9bc-41b3b685d9e9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
