com.cloudbees.jenkins.plugins.customtools
Class CustomToolInstallWrapper

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.tasks.BuildWrapper>
      extended by hudson.tasks.BuildWrapper
          extended by com.cloudbees.jenkins.plugins.customtools.CustomToolInstallWrapper
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.BuildWrapper>

public class CustomToolInstallWrapper
extends hudson.tasks.BuildWrapper

Installs tools selected by the user. Exports configured paths and a home variable for each tool.

Author:
rcampbell

Nested Class Summary
static class CustomToolInstallWrapper.DescriptorImpl
           
static class CustomToolInstallWrapper.SelectedTool
          Ceremony needed to satisfy NoStaplerConstructionException: "There's no @DataBoundConstructor on any constructor of class java.lang.String"
 
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
static CustomToolInstallWrapper.DescriptorImpl DESCRIPTOR
           
 
Constructor Summary
CustomToolInstallWrapper(CustomToolInstallWrapper.SelectedTool[] selectedTools)
           
 
Method Summary
 hudson.Launcher decorateLauncher(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
          The heart of the beast.
 hudson.model.Descriptor<hudson.tasks.BuildWrapper> getDescriptor()
           
 CustomToolInstallWrapper.SelectedTool[] getSelectedTools()
           
 hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 
Methods inherited from class hudson.tasks.BuildWrapper
all, decorateLogger, getProjectAction, getProjectActions, makeBuildVariables, makeSensitiveBuildVariables, preCheckout, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTOR

@Extension
public static final CustomToolInstallWrapper.DescriptorImpl DESCRIPTOR
Constructor Detail

CustomToolInstallWrapper

@DataBoundConstructor
public CustomToolInstallWrapper(CustomToolInstallWrapper.SelectedTool[] selectedTools)
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
Overrides:
setUp in class hudson.tasks.BuildWrapper
Throws:
java.io.IOException
java.lang.InterruptedException

getSelectedTools

public CustomToolInstallWrapper.SelectedTool[] getSelectedTools()

decorateLauncher

public hudson.Launcher decorateLauncher(hudson.model.AbstractBuild build,
                                        hudson.Launcher launcher,
                                        hudson.model.BuildListener listener)
                                 throws java.io.IOException,
                                        java.lang.InterruptedException,
                                        hudson.model.Run.RunnerAbortedException
The heart of the beast. Installs selected tools and exports their paths to the PATH and their HOMEs as environment variables.

Overrides:
decorateLauncher in class hudson.tasks.BuildWrapper
Throws:
java.io.IOException
java.lang.InterruptedException
hudson.model.Run.RunnerAbortedException

getDescriptor

public hudson.model.Descriptor<hudson.tasks.BuildWrapper> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.BuildWrapper>
Overrides:
getDescriptor in class hudson.model.AbstractDescribableImpl<hudson.tasks.BuildWrapper>


Copyright © 2004-2012. All Rights Reserved.