Clone Workspace SCM Plugin

This plugin comes is not maintained by its owner for Hudson and is made available under the Install-Tested plugin category as described here. If you have any issues with this plugin please mail the Hudson user list and not the owner

Plugin Information

Plugin ID clone-workspace-scm
Latest Release 0.5-h-1
Latest Release Date Feb 8, 2013
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

This plugin makes it possible to archive the workspace from builds of one project and reuse them as the SCM source for another project.

Note: source for this plugin is not in the Hudson Subversion repository. It can be found at Github.

Requires Hudson 1.350 or later.
This plugin depends on minor modifications to Hudson core, which were introduced in Hudson 1.350. It will not work with earlier versions of Hudson.

Usage

Publisher
  • In the configuration for a project whose workspace you want to clone and re-use in other projects, select "Archive for Clone Workspace SCM" in the list of publishers.
  • If desired, specify the files to include in the archive - by default, this will be "*/". Use Ant-style globs.
  • Specify the criteria a build needs to meet in order to be archived.
  • Run a build. If it meets the criteria, its workspace will be archived, until a new build meeting the criteria has run, at which point the old archive will be deleted.
SCM
  • In the configuration for a project which you wish to have re-use another project's workspace, select "Clone Workspace" from the list of possible SCMs.
  • Choose the parent project whose workspace you wish to re-use from the drop-down list - if no projects have the Clone Workspace Publisher enabled, the drop-down will be empty.
  • Choose the parent build criteria you wish to use.
  • Run a build - assuming the parent project has an archived workspace meeting the criteria in question, it'll be expanded and used as the workspace for this build.
  • Additionally, the changelog from the parent project build that archived workspace came from will be re-used as the changelog for this build.

Changelog

Version 0.2 (also March 14, 2010)
  • Clarifying display name text for CloneWorkspacePublisher
Version 0.1 (March 14, 2010)
  • Initial release.

Labels:

plugin-scm-related plugin-scm-related Delete
tier3-installtest-plugin tier3-installtest-plugin Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Aug 24, 2010

    steven harman says:

    Has this plugin been tested with Master/Slave setups? I ask because my jobs seem...

    Has this plugin been tested with Master/Slave setups? I ask because my jobs seem to work as long as both the upstream (publishing) and downstream (SCM) job run on my master... but the downstream jobs seem to hang while unpacking the archived files:

    Started by upstream project "MyProject-Fast" build number 16
    Building remotely on ci-slave-01
    FATAL: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset
    hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset
    at hudson.remoting.Request.call(Request.java:137)
    at hudson.remoting.Channel.call(Channel.java:557)
    at hudson.FilePath.act(FilePath.java:742)
    at hudson.FilePath.act(FilePath.java:735)
    at hudson.FilePath.unzip(FilePath.java:415)
    at hudson.FileSystemProvisioner$Default$WorkspaceSnapshotImpl.restoreTo(FileSystemProvisioner.java:227)
    at hudson.plugins.cloneworkspace.CloneWorkspaceSCM$Snapshot.restoreTo(CloneWorkspaceSCM.java:344)
    at hudson.plugins.cloneworkspace.CloneWorkspaceSCM.checkout(CloneWorkspaceSCM.java:126)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1054)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
    at hudson.model.Run.run(Run.java:1248)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:129)
    Caused by: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset
    at hudson.remoting.Request.abort(Request.java:257)
    at hudson.remoting.Channel.terminate(Channel.java:608)
    at hudson.remoting.Channel$ReaderThread.run(Channel.java:899)
    Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at hudson.remoting.Channel$ReaderThread.run(Channel.java:875)

    Any ideas?

  2. Aug 30, 2010

    steven harman says:

    UPDATE I have done some more digging and am starting to think it may have somet...

    UPDATE

    I have done some more digging and am starting to think it may have something to do with the size of the files being archived in the workspace - perhaps with how the files are streamed/buffered when being unzipped on the slave? See my additional comments at on the related Issue: http://issues.hudson-ci.org/browse/HUDSON-6817

  3. Nov 08, 2010

    cava says:

    Hello, It seems that this plugin fails when the workspace is too big. I have t...

    Hello,

    It seems that this plugin fails when the workspace is too big.

    I have tested it with a small workspace and it works fine, but in real life my workspace contains more than 20 000 files and I have this error:

    Started by upstream project "split-part01-checkout" build number 8
    FATAL: null
    java.lang.IllegalArgumentException
    at java.util.zip.ZipInputStream.getUTF8String(Unknown Source)
    at java.util.zip.ZipInputStream.readLOC(Unknown Source)
    at java.util.zip.ZipInputStream.getNextEntry(Unknown Source)
    at hudson.FilePath.unzip(FilePath.java:472)
    at hudson.FilePath.access$100(FilePath.java:162)
    at hudson.FilePath$2.invoke(FilePath.java:420)
    at hudson.FilePath$2.invoke(FilePath.java:418)
    at hudson.FilePath.act(FilePath.java:756)
    at hudson.FilePath.act(FilePath.java:738)
    at hudson.FilePath.unzip(FilePath.java:418)
    at hudson.FileSystemProvisioner$Default$WorkspaceSnapshotImpl.restoreTo(FileSystemProvisioner.java:227)
    at hudson.plugins.cloneworkspace.CloneWorkspaceSCM$Snapshot.restoreTo(CloneWorkspaceSCM.java:344)
    at hudson.plugins.cloneworkspace.CloneWorkspaceSCM.checkout(CloneWorkspaceSCM.java:126)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1044)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
    at hudson.model.Run.run(Run.java:1241)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:306)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:122)

  4. Dec 15, 2011

    sebastien says:

    Hello, How can I include .svn dir in the archive ? Cheers

    Hello,

    How can I include .svn dir in the archive ?

    Cheers