org.jvnet.hudson.test
Class ExtractResourceSCM

java.lang.Object
  extended by hudson.scm.SCM
      extended by hudson.scm.NullSCM
          extended by org.jvnet.hudson.test.ExtractResourceSCM
All Implemented Interfaces:
ExtensionPoint, Describable<SCM>

public class ExtractResourceSCM
extends NullSCM

SCM useful for testing that extracts the given resource as a zip file.

Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.scm.NullSCM
NullSCM.DescriptorImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
 
Constructor Summary
ExtractResourceSCM(URL zip)
           
ExtractResourceSCM(URL zip, String parentFolder)
          with this constructor your zip can contains a folder more usefull to create a project test zip foo.zip foo
 
Method Summary
 boolean checkout(AbstractBuild<?,?> build, Launcher launcher, FilePath workspace, BuildListener listener, File changeLogFile)
          Obtains a fresh workspace of the module(s) into the specified directory of the specified machine.
 
Methods inherited from class hudson.scm.NullSCM
calcRevisionsFromBuild, compareRemoteRevisionWith, createChangeLogParser
 
Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, all, buildEnvVars, createEmptyChangeLog, getApi, getBrowser, getDescriptor, getEffectiveBrowser, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, nullify, poll, pollChanges, processWorkspaceBeforeDeletion, requiresWorkspaceForPolling, supportsPolling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractResourceSCM

public ExtractResourceSCM(URL zip)
Parameters:
zip -

ExtractResourceSCM

public ExtractResourceSCM(URL zip,
                          String parentFolder)
with this constructor your zip can contains a folder more usefull to create a project test zip foo.zip foo

Parameters:
zip -
parentFolder -
Method Detail

checkout

public boolean checkout(AbstractBuild<?,?> build,
                        Launcher launcher,
                        FilePath workspace,
                        BuildListener listener,
                        File changeLogFile)
                 throws IOException,
                        InterruptedException
Description copied from class: SCM
Obtains a fresh workspace of the module(s) into the specified directory of the specified machine.

The "update" operation can be performed instead of a fresh checkout if feasible.

This operation should also capture the information necessary to tag the workspace later.

Overrides:
checkout in class NullSCM
launcher - Abstracts away the machine that the files will be checked out.
workspace - a directory to check out the source code. May contain left-over from the previous build.
changeLogFile - Upon a successful return, this file should capture the changelog. When there's no change, this file should contain an empty entry. See SCM.createEmptyChangeLog(File, BuildListener, String).
Returns:
false if the operation fails. The error should be reported to the listener. Otherwise return the changes included in this update (if this was an update.)

Using the return value to indicate success/failure should be considered deprecated, and implementations are encouraged to throw AbortException to indicate a failure.

Throws:
InterruptedException - interruption is usually caused by the user aborting the build. this exception will cause the build to be aborted.
IOException


Copyright © 2004-2013. All Rights Reserved.