org.jenkinsci.plugins.preSCMbuildstep
Class PreSCMBuildStepsWrapper

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.tasks.BuildWrapper>
      extended by hudson.tasks.BuildWrapper
          extended by org.jenkinsci.plugins.preSCMbuildstep.PreSCMBuildStepsWrapper
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.BuildWrapper>

public class PreSCMBuildStepsWrapper
extends hudson.tasks.BuildWrapper

Class to allow any build step to be performed before the SCM checkout occurs.

Author:
Chris Johnson

Nested Class Summary
static class PreSCMBuildStepsWrapper.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.tasks.BuildWrapper
hudson.tasks.BuildWrapper.Environment
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 java.util.ArrayList<hudson.tasks.BuildStep> buildSteps
          Stored build steps to run before the scm checkout is called
 
Constructor Summary
PreSCMBuildStepsWrapper(java.util.ArrayList<hudson.tasks.BuildStep> buildstep)
          Constructor taking a list of buildsteps to use.
 
Method Summary
 void preCheckout(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
          Overridden precheckout step, this is where wedo all the work.
 hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
          Overridden setup returns a noop class as we don't want to add annything here.
 
Methods inherited from class hudson.tasks.BuildWrapper
all, decorateLauncher, decorateLogger, getProjectAction, getProjectActions, makeBuildVariables, makeSensitiveBuildVariables, setUp
 
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buildSteps

public final java.util.ArrayList<hudson.tasks.BuildStep> buildSteps
Stored build steps to run before the scm checkout is called

Constructor Detail

PreSCMBuildStepsWrapper

@DataBoundConstructor
public PreSCMBuildStepsWrapper(java.util.ArrayList<hudson.tasks.BuildStep> buildstep)
Constructor taking a list of buildsteps to use.

Parameters:
buildstep - list of but steps configured in the UI
Method Detail

setUp

public hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build,
                                                   hudson.Launcher launcher,
                                                   hudson.model.BuildListener listener)
                                            throws java.io.IOException,
                                                   java.lang.InterruptedException
Overridden setup returns a noop class as we don't want to add annything here.

Overrides:
setUp in class hudson.tasks.BuildWrapper
Parameters:
build -
launcher -
listener -
Returns:
noop Environment class
Throws:
java.io.IOException
java.lang.InterruptedException

preCheckout

public void preCheckout(hudson.model.AbstractBuild build,
                        hudson.Launcher launcher,
                        hudson.model.BuildListener listener)
                 throws java.io.IOException,
                        java.lang.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.

Overrides:
preCheckout in class hudson.tasks.BuildWrapper
Parameters:
build -
launcher -
listener -
Throws:
java.io.IOException
java.lang.InterruptedException


Copyright © 2004-2011. All Rights Reserved.