On Fri, May 4, 2018 at 3:22 AM, Thomas Weißschuh
<[email protected]> wrote:
>> I suppose we could also amend `DefaultStepContext.get` to include a
>> special variable bound to the current `FlowNode.id`;
>
> This is actually currently implemented in `CpsStepContext`,
> and exposed via the generic `StepContext.get`.
> It includes the complete FlowNode.

By “variable” here I mean “environment variable”: to include the value
of the node ID in `context.get(EnvVars.class)`.

>> introduce an `ExtensionPoint` similar to
>> `EnvironmentExpander` but accepting a `StepContext` argument (to be
>> called from a new overload of `getEffectiveEnvironment`), so you could
>> bind such a variable yourself. The latter would be an Enhancement with
>> `api` label in `workflow-step-api-plugin` + `workflow-support-plugin`.
>
> I assume it should be similar to `EnvironmentContributor`, right?

Roughly, yes, but with a finer-grained context: an
`EnvironmentContributor` only knows which build is running, nothing
Pipeline-specific.

> If this feature has a chance of being merged

@svanoort & @abayer could speak to that.

> I would like to take a stab at
> implementing it.
> Should I open a proper ticket to discuss the details or are concrete 
> prototypes
> preferred?

Both.

-- 
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/CANfRfr1wOA4kpxfqF-KCXo7CrW5gN5bCKLkNfoZS75utXUMRVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to