Class PreSCMBuildStepsWrapper
java.lang.Object
hudson.model.AbstractDescribableImpl<BuildWrapper>
hudson.tasks.BuildWrapper
org.jenkinsci.plugins.preSCMbuildstep.PreSCMBuildStepsWrapper
- All Implemented Interfaces:
ExtensionPoint
,Describable<BuildWrapper>
Class to allow any build step to be performed before the SCM checkout occurs.
- Author:
- Chris Johnson
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class hudson.tasks.BuildWrapper
BuildWrapper.Environment
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
FieldsModifier and TypeFieldDescriptionStored build steps to run before the scm checkout is calledfinal boolean
-
Constructor Summary
ConstructorsConstructorDescriptionPreSCMBuildStepsWrapper
(ArrayList<BuildStep> buildstep, boolean failOnError) Constructor taking a list of buildsteps to use. -
Method Summary
Modifier and TypeMethodDescriptionvoid
preCheckout
(AbstractBuild build, Launcher launcher, BuildListener listener) Overridden precheckout step, this is where wedo all the work.setUp
(AbstractBuild build, Launcher launcher, BuildListener listener) Overridden setup returns a noop class as we don't want to add anything here.Methods inherited from class hudson.tasks.BuildWrapper
all, decorateLauncher, decorateLogger, getProjectAction, getProjectActions, makeBuildVariables, makeSensitiveBuildVariables, setUp
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
buildSteps
Stored build steps to run before the scm checkout is called -
failOnError
public final boolean failOnError
-
-
Constructor Details
-
Method Details
-
setUp
public BuildWrapper.Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException Overridden setup returns a noop class as we don't want to add anything here.- Overrides:
setUp
in classBuildWrapper
- Parameters:
build
- the running buildlauncher
- available launcher to run steps in the buildlistener
- destination that will receive information about steps as they progress- Returns:
- noop Environment class
- Throws:
IOException
InterruptedException
-
preCheckout
public void preCheckout(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException Overridden precheckout step, this is where wedo all the work.Checks to make sure we have some buildsteps set, and then calls the prebuild and perform on all of them. TODO: handle build steps failure in some sort of reasonable way
- Overrides:
preCheckout
in classBuildWrapper
- Parameters:
build
- the running buildlauncher
- available launcher to run steps in the buildlistener
- destination that will receive information about steps as they progress- Throws:
IOException
InterruptedException
-