public interface SimpleBuildStep extends BuildStep
Publisher) which may be called at an arbitrary time during a build (or multiple times), run, and be done.
Such a build step would typically be written according to some guidelines that ensure it makes few assumptions about how it is being used:
BuildStep.prebuild(hudson.model.AbstractBuild<?, ?>, hudson.model.BuildListener), since this presupposes a particular execution order.
BuildStep.getProjectActions(hudson.model.AbstractProject<?, ?>), since this might never be called if the step is not part of the static configuration of a project; instead, add a
SimpleBuildStep.LastBuildActionto a build when run.
BuildStepMonitor.NONE, since this facility only makes sense for a step called exactly once per build.
DependencyDeclarersince this would be limited to use in
BuildStepDescriptor.isApplicable(java.lang.Class<? extends hudson.model.AbstractProject>)(there is currently no filtering for other
Executor.currentExecutor()to be non-null, and by extension do not use
BuildStepCompatibilityLayer.perform(AbstractBuild, Launcher, BuildListener)
|Modifier and Type||Interface and Description|
|Modifier and Type||Method and Description|
Run this step.
void perform(@Nonnull Run<?,?> run, @Nonnull FilePath workspace, @Nonnull Launcher launcher, @Nonnull TaskListener listener) throws InterruptedException, IOException
run- a build this is running as a part of
workspace- a workspace to use for any file operations
launcher- a way to start processes
listener- a place to send output
InterruptedException- if the step is interrupted
IOException- if something goes wrong; use
AbortExceptionfor a polite error
Copyright © 2004–2017. All rights reserved.