Inject environment variable from custom plugin

Hello!

We use a self-written plugin to standardize Gradle builds. If necessary, small modifications are made to settings.gradle during runtime. This happens in the SCMListener by extending it.

Now we are also looking for a solution how to inject credentials as environment variable.
Using this doc (Build (Jenkins core 2.404 API)) we have already tried to solve this in the BuildWrapper via ProcessBuilder, so far no success…

Is there any solution for that?

Thanks
Marco

Hello @mohanisch and welcome back :wave:

Have you thought of using Credentials Binding ?