Any equivalent to Scm.buildEnvVars(AbstractBuild<?,?> build, Map<String, String> env), I wan to inspect scm info (GIT_COMMIT GIT_BRANCH GIT_URL) in RunListener
On Thursday, October 27, 2016 at 7:18:44 AM UTC+8, Jesse Glick wrote: > > On Wed, Oct 26, 2016 at 6:54 PM, Stephen Connolly > <[email protected] <javascript:>> wrote: > > That's the one you want (it does the lookups for you) > > Do not call that directly. Use > `SCMTriggerItem.asSCMTriggerItem(job).getSCMs()` plus a null check. > > > Anyway for the stated use case > > > Compute the warnings in a build and map these warnings to corresponding > SCM changes > > `getScm()` was not what you wanted to begin with. You want > > Run<?, ?> run = …; > @SuppressWarnings("unchecked") List<ChangeLogSet<? extends > ChangeLogSet.Entry>> changeSets = > run.getClass().getMethod("getChangeSets").invoke(run); > > which will work equally well on `AbstractBuild` or `WorkflowRun`. A > core interface to abstract the two is pending. > -- 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/1c7d988f-b456-45c3-b0bb-fcb998e0081f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
