SVN Publisher

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID svnpublisher Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
0.1
Jan 10, 2010
1.319
subversion (version:1.8)
Source Code
Issue Tracking
Maintainer(s)
Subversion
Open Issues
Brent Smith (id: brentsmith)
Usage Installations 2013-Apr 1284
2013-May 1320
2013-Jun 1329
2013-Jul 1391
2013-Aug 1372
2013-Sep 1352
2013-Oct 1436
2013-Nov 1412
2013-Dec 1409
2014-Jan 1499
2014-Feb 1494
2014-Mar 1570

This plugin allows you to upload artifacts to a subversion repository. This is done via a delete/import of the items requested.

 This plugin is in its infancy and should be used with caution.


SVN URL

The SVN URL is the location you wish to upload the items to.

Target Path

The target path is the location of the target directory in hudson, if the project is not a maven project this can be the root location for the items to be imported.

Import Items

Each import item consists of 3 parts:

  • Pattern: A java regular expression pattern used to match the item as is exists in the target directory.
  • Name: If name is not left blank the item will be renamed upon import.
  • Path: If the item is to be imported into a directory other then the one given by the SVN URL this field can be used, this should always end with a forwardslash and it is always based off the location given in the SVN URL.

POM Path

The pom path is, if using a maven project, the location of the project's pom.xml. This is required if the following variable are to be used.

_MAJOR_ / _MINOR_ / _PATCH_ Paths

The _MAJOR_, _MINOR_, and _PATCH_ variables all require paths to their values from within the pom.xml's project node.

These paths are given in dot notation with index values available.

<project>
<versionA>1</versionA>
<properties>
<minor>2</minor>
<deep>
<patchBuild>3.456</patchBuild>

</deep>

</properties>

</project>

Using the above example the following paths and their results could be used:

versionA  -> 1

properties.minor  -> 2

properties.deep.patchBuild[0]  -> 3

properties.deep.patchBuild[1] -> 456

Currently only dot separated version numbers can be indexed.

Change Log

Version 0.1 (Jan 10, 2010)
  • Initial release

Labels

plugin-upload plugin-upload Delete
copy copy Delete
svn svn Delete
hudson hudson Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Mar 31, 2009

    Jeff Heckel says:

    Has anyone used this plugin? I am new to Hudson but am wanting to have my artifa...

    Has anyone used this plugin? I am new to Hudson but am wanting to have my artifacts from a Hudson build to be checked into Subversion afterwards. I am unclear if I should try using this plug in or use an ant task to check in to Subversion. Any thoughts or suggestions? I also don't see where this can be downloaded from.

  2. Jul 08, 2009

    Nathan Craddock says:

    You're going to think this is incredibly stupid. Where can I actually download t...

    You're going to think this is incredibly stupid. Where can I actually download this plugin?

    1. Jan 10, 2010

      Alan Harder says:

      Not stupid at all.. looks like no release of this plugin was ever done. I'll rel...

      Not stupid at all.. looks like no release of this plugin was ever done.
      I'll release the "0.1" version now, so you can at least try out the work that was completed. Look for it soon in Manage Hudson / Manage Plugins / Available.

  3. Feb 19, 2010

    Augie C Coder says:

    Sorry if this question has an obvious answer.  How do I go about using the ...

    Sorry if this question has an obvious answer.  How do I go about using the WORKSPACE or other Hudson environment variables in the "Target path" field?  I've tried $WORKSPACE and ${WORKSPACE} and can't get favorable results.

    1. May 10, 2010

      Axel Heider says:

      Yes, this would help much.

      Yes, this would help much.

      1. May 25, 2010

        Tomasz Wszelaki says:

        Exactly, I've even tried to put full path "by hand" and it still returned the sa...

        Exactly, I've even tried to put full path "by hand" and it still returned the same error:"SVN Publisher: Error: target Directory not accessable:"

        1. Sep 07, 2010

          Shadow X says:

          I got the same error - SVN Publisher: Error: target Directory not accessable F...

          I got the same error -
          SVN Publisher: Error: target Directory not accessable

          For example, let my test svn repository be

          http://mysource/svn/test/trunk

          under trunk I have two main directory:
          +src
          +bin

          all my source file are in src directory, the source files build by hudson, and the result executable file (named mybin) will be in bin directory.

          I've tried several setup like follows,

          SVN URL: http://mysource/svn/test/trunk
          Target Path: _WORKSPACE_/bin
          Pattern: mybin

          all the configuration I've tried result the "target Directory not accessable" messages.
          What is the right configuration for this case ?
          Thanks

          1. Nov 16, 2010

            A. Weisgerber says:

            I also got the very same error message: "SVN Publisher: Error: target Directory...

            I also got the very same error message:

            "SVN Publisher: Error: target Directory not accessable"

            This is happening using either the _WORKSPACE_ variable or hard coding the path.

            Did someone find a way to set the target directory?

            Thanks

  4. May 27, 2010

    bokc - says:

    This project is alive? I m very interesting by this plugin.

    This project is alive? I m very interesting by this plugin.

  5. Jul 12, 2010

    dmoebius - says:

    @Augie: You can use _WORKSPACE_ instead of $WORKSPACE or ${WORKSPACE}. ...

    @Augie: You can use _WORKSPACE_ instead of $WORKSPACE or ${WORKSPACE}.

    Another problem:

    When I use ".*\.zip" as Item Pattern and I have the following matching zip files in my workspace:
      fileA.zip, fileB.zip, fileC.zip, ...
    on svn import/commit they will be renamed to:
      fileA.zip, 1fileB.zip, 2fileC.zip, ...

    Looking from the source code (http://fisheye.jenkins-ci.org/browse/Hudson/trunk/hudson/plugins/svnpublisher/src/main/java/com/mtvi/plateng/subversion/SVNForceImport.java?r=HEAD) method forceImport(), there's no way to circumvent that other than not to use patterns that match more than one file.

  6. Aug 27, 2010

    aeryn says:

    It would be great if there was the ability to provide a check-in comment.  ...

    It would be great if there was the ability to provide a check-in comment.  That way you can use the comment in conjunction with "Excluded Commit Messages" of subversion plugin to avoid triggering a build by hudson doing a check-in via this plug-in.  Bonus, if it can have some variables like build number, etc.

  7. Sep 13, 2010

    santhoshb says:

    Is this plugin used by any one. I am giving the username and password for the "H...

    Is this plugin used by any one. I am giving the username and password for the "Hudson Management" console, but the authentication for the repo is still failing with the below error.  Any input on the same?

    13 Sep, 2010 7:51:26 PM com.mtvi.plateng.subversion.SVNForceImport forceImport
    SEVERE: *SVNForceImport Error: svn: Authentication required for '<http://aa.aa.aa.aa:80> CollabNet Subversion Repository'

    1. Dec 19, 2010

      yzach - says:

      Just spent 2 hours trying to solve this issue... Here is the solution: Subversi...

      Just spent 2 hours trying to solve this issue... Here is the solution:

      Subversion credentials for SVN Publisher should be specified in Manage Hudson -> Configure System page.

  8. Jan 20, 2011

    Bjørn Grønbæk says:

    No matter how I configure my project I keep having an authentication problem - "...

    No matter how I configure my project I keep having an authentication problem - "Authentication required for https://reponame". I have fillede the username and password in the Hudson main configuration, but this does not help me. Do you guys have any ideas? Is it a problem that the repo is httpS rather than http? The certificate is self signed, could that be a problem?

    1. Jun 15, 2011

      Subu Iyer says:

      Were you able to use this plugin?  I have similar auth failures even after ...

      Were you able to use this plugin?  I have similar auth failures even after setting up the username/password via Manage Hudson.

  9. Jun 17, 2011

    Andreas Schilling says:

    Everyone who has problems to get this running, here are some fixes we did in ord...

    Everyone who has problems to get this running, here are some fixes we did in order to make it work after all "normal" tries didn't work out.

    To us it seems that the global authentication options taken from "Manage Jenkins" are not used for some reason (maybe broken after Jenkins fork?). However, you simply can put the two tags (<user></user> and <password></password>) into the configuration of each job. Then it works.
    Of course, whenever you change something in the config now those credentials will be overwritten again.

    However, you easily can fix that as well if you are able to administrate Jenkins the leet haxx0r way:

    1. Go to $JENKINS_HOME/plugins/svnpublisher/WEB-INF/classes/vom/mtvi/plateng/subversion/SVNPublisher
    2. open the file global.jelly and copy the two <f:entry> sections
    3. open the file config.jelly and insert the two sections at a desired position (e.g. at the very beginning) within the <j:jelly> section
    4. change the
      value=${descriptor.user}
      value=${descriptor.password}

      to

      value=${instance.user}
      value=${instance.password}
    5. remove the file global.jelly (or at least move it to some backup, just out of the jenkins directory)
    6. restart the jenkins service
      Now you can give the credentials per job and everything will work.
    7. happiness \o/

    Additional notes:

    1) the password is stored in plain text in the config file of the job... *sigh*
    2) when using regexp patterns to define the files to commit, for multiple files prefixes (numbers) are generated for whatever reason during checkin. We have no clue whether this is some leftover from debugging or whatever, however it's totally undesired. Thus we defined one item per file to checkin. This is also not optimal, but at least it works.

    Hope this is of help to all those that also didn't manage to get this working!

    1. Jul 08, 2011

      Bodo Zunker says:

      I fixed the 0.1 to accept $WORKSPACE and also added the SVN auth workaround Andr...

      I fixed the 0.1 to accept $WORKSPACE and also added the SVN auth workaround Andreas describes.

      Furthermore I changed the check-in behaviour:

      It is now commiting ony one update for several files fitting a pattern. its no more delete and insert per file.
      Only files with actual binary changes are checked in.

      If this is was you need, apply the following patchfile to the 0.1 SVN:

      svnPub0.2.svnpatch

  10. Jan 03, 2012

    Maxim Kopeyka says:

    on Windows _WORKSPACE_ is  /C:/jenkins/workspace/ Of course, windo...

    on Windows _WORKSPACE_ is  /C:/jenkins/workspace/

    Of course, windows can't resolve this path
    SVN Publisher: Error: target Directory not accessable: /C:/jenkins/workspace/

    However it works for MacOS

    Finally, this plugin doesn't commit anything to SVN, I have the same settings as on screenshotArchiving artifacts
    workspace: /Library/Jenkins/jobs/xxx-yyy-zzz/workspace/
    Attempting to import to SVN: https://xxx/yyy/trunk
    SVN Publisher: target: /Library/Jenkins/jobs/xxx-yyy-zzz/workspace/zzzzzzzzzzz/bin/
    Finished: SUCCESS

  11. May 06, 2013

    Aytunc BEKEN says:

    This plugin need some documentation about usage! It seems nice job but impos...

    This plugin need some documentation about usage! It seems nice job but impossible to configure or debug the error. Especially "Directory not accessable" error comes with no explanation.