Class PreSCMBuildStepsWrapper
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<BuildWrapper>
-
- hudson.tasks.BuildWrapper
-
- org.jenkinsci.plugins.preSCMbuildstep.PreSCMBuildStepsWrapper
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<BuildWrapper>
public class PreSCMBuildStepsWrapper extends BuildWrapper
Class to allow any build step to be performed before the SCM checkout occurs.- Author:
- Chris Johnson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PreSCMBuildStepsWrapper.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.tasks.BuildWrapper
BuildWrapper.Environment
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description ArrayList<BuildStep>
buildSteps
Stored build steps to run before the scm checkout is calledboolean
failOnError
-
Constructor Summary
Constructors Constructor Description PreSCMBuildStepsWrapper(ArrayList<BuildStep> buildstep, boolean failOnError)
Constructor taking a list of buildsteps to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
preCheckout(AbstractBuild build, Launcher launcher, BuildListener listener)
Overridden precheckout step, this is where wedo all the work.BuildWrapper.Environment
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
-
-
-
-
Method Detail
-
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
-
-