On Mon, Oct 7, 2019 at 10:07 AM Matthias <[email protected]> wrote: > Now, I need to pass credentials via environment variables to the plugin. I > found out that this is not possible with SimpleBuildStep (JENKINS-29144).
You mean from an enclosing `withCredentials` step? Indeed that is a scoped environment variable, rather than build-wide, so not currently available from this API. > I found advices to extend Step instead. I finally got it working for the > pipeline Looking up `getContext().get(EnvVars.class)` I guess. > my problem is now that the plugin is not anymore selectable from the "add > build step" dropdown in freestyle jobs. Do I have to use another interface > for this? Yes, `Step` is for Pipeline only. If you want a freestyle-only build step, use `Builder` or `Publisher` without implementing `SimpleBuildStep`. Basically `SimpleBuildStep` just offers the convenience of writing a single extension which can be used for any kind of project. -- 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/CANfRfr16bXTWAV5Zw-d9oiWQJmym-Of9_boXaYmWa5d9zyK1xQ%40mail.gmail.com.
