Hello
I implemented a plugin that works as a build step for freestyle jobs and as
a pipeline step in groovy by implementing SimpleBuildStep.
Now, I need to pass credentials via environment variables to the plugin. I
found out that this is not possible with *SimpleBuildStep *
(https://issues.jenkins-ci.org/browse/JENKINS-29144).
Searching further, I found advices to extend *Step *instead. I finally got
it working for the pipeline by using the following classes.
public class MyPlugin extends Step implements Serializable {
@Extension
@Symbol("myPlugin")
public static final class DescriptorImpl extends StepDescriptor {
public class MyPluginStepExecution extends
SynchronousNonBlockingStepExecution<Void> {
However, 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?
I tried to use *SimpleBuildWrapper, BuildWrapperDescriptor, and
StepExecution* but now I only get "java.lang.IllegalStateException: There
is no body to invoke"
--
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/64e4f6d7-8bb9-4996-8f86-99df8c8337b0%40googlegroups.com.