com.cloudbees.jenkins.plugins.okidocki
Class DockerBuildWrapper

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

public class DockerBuildWrapper
extends hudson.tasks.BuildWrapper

Decorate Launcher so that every command executed by a build step is actually ran inside docker container. TODO run docker container during setup, then use docker-enter to attach command to existing container

Author:
Nicolas De Loof

Nested Class Summary
static class DockerBuildWrapper.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
 DockerImageSelector selector
           
 
Constructor Summary
DockerBuildWrapper(DockerImageSelector selector)
           
 
Method Summary
 hudson.Launcher decorateLauncher(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 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 hudson.model.AbstractDescribableImpl
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selector

public DockerImageSelector selector
Constructor Detail

DockerBuildWrapper

@DataBoundConstructor
public DockerBuildWrapper(DockerImageSelector selector)
Method Detail

setUp

public hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build,
                                                   hudson.Launcher launcher,
                                                   hudson.model.BuildListener listener)
                                            throws IOException,
                                                   InterruptedException
Overrides:
setUp in class hudson.tasks.BuildWrapper
Throws:
IOException
InterruptedException

decorateLauncher

public hudson.Launcher decorateLauncher(hudson.model.AbstractBuild build,
                                        hudson.Launcher launcher,
                                        hudson.model.BuildListener listener)
                                 throws IOException,
                                        InterruptedException,
                                        hudson.model.Run.RunnerAbortedException
Overrides:
decorateLauncher in class hudson.tasks.BuildWrapper
Throws:
IOException
InterruptedException
hudson.model.Run.RunnerAbortedException


Copyright © 2004-2014. All Rights Reserved.