Wiki Markup |
---|
{hudsonjenkins-plugin-info:pluginId=svn-tag} |
Warning |
---|
This plugin manages only tagging triggered by a successful build. This plugin is NOT related to "Tag this build" link. |
What does this do?
Excerpt |
---|
This plugin automatically performs subversion tagging (technically speaking svn copy) on successful build. |
...
- Read Subversion authentication information from Hudson's Jenkins’ Subversion SCM configuration.
- Delete the existing tag if exists.
- Perform URL to URL svn copy.
Please note that svn copy is cheap because it doesn't duplicate file contents when not necessary. URL to URL copy is also fast because there is no data transfer from Hudson Jenkins to Subversion, unlike maven scm plugin's "tag" goal.
...
Subversion Authentication
When you specify subversion a Subversion repository URL, starting with version 2.0 of the Subversion plugin, you are requested to enter authentication information. The values are stored in hudson.scm.SubversionSCM.xml
in HUDSON_HOME
directory. allowed to select credentials used for the checkout or update. This plugin obtains the same authentication information directly from Hudson core's Subversion SCM class so the principal and credential specified here is used for subversion authenticationthe Subversion plugin, meaning it must have write access to the repository.
System configuration
Basic configuration for the project with one svn location
...
- The template of comment recognizes groovy syntax. Map returned from
hudson.model.AbsutractBuild#getEnvVars()
, System Properties, and repository URL are bound so that you can refer them asenv
,sys
, andrepoURL
respectively. ForrepoURL
, see #repoURL. - The value of Map (and Properties) can be refered like this.
Code Block java java Build: ${env['BUILD_TAG']} on OS ${sys['os.name']} ${sys['os.version']}.
- Compilation happens when the focus is moved from the text field. Please check if the quotes, braces, and brackets are balanced when you get a compilation error. A closing single quote is missing after
BUILD_TAG
in the case below.
- Base tag URL's hostname must be identical with the one of Subversion URL. Different notation (e.g. raw IP address and hostname, short hostname and fully qualified hostname, or using alias) is recognized as different servers so that please make sure to use the identical hostname.
Note title Job name in tag base URL Job name is no longer implicitly appended to tag base URL since version 1.2. Please use '$\{env\['JOB_NAME'\]\}' if you need to use job name as a part of tag URL.Wiki Markup
Configuration for the project with multiple svn locations
...
- The location URL path list delimited by "/" (slash) is bound to groovy runtime as "repoURL" since version 1.6. Any path can be embedded as a part of tag base URL. Suppose you have the following hierarchy.
You specify two locations in subversion configuration.Code Block svnrepo/ |-- branches |-- tags `-- trunk |-- project1 | |-- a.txt | |-- subproject1 | | `-- subproject1.txt | `-- subproject2 | `-- subproject2.txt `-- project2 |-- subproject21 | `-- subproject21.txt `-- subproject22 `-- subproject22.txt
Then specify the tag base URL embedding a part of repoURL as tag base URL.Code Block location 1: http://svn.example.com/svn/svnrepo/trunk/project1 location 2: http://svn.example.com/svn/svnrepo/trunk/project2
You will get the following tags. Please note that repoURL contains {{\Code Block http://svn.example.com/svn/svnrepo/tags/${env['BUILD_TAG']}/${repoURL[-1]} (or) ../tags/${env['BUILD_TAG']}/${repoURL[-1]}
Wiki Markup [http,svn.example.com,svn,svnrepo,trunk,project1
\]
}} as List in case of the example above, and groovy allows to access the element from the end by specifying negative index. For example, {{repoURL
\[-2
\]
}} returns {{trunk
}} as the value.Code Block svnrepo/ |-- branches |-- tags |-- hudson-svnrepo-3 | | |-- project1 | | | |-- a.txt | | | |-- subproject1 | | | | `-- subproject1.txt | | | `-- subproject2 | | | `-- subproject2.txt | | `-- project2 | | |-- subproject21 | | | `-- subproject21.txt | | `-- subproject22 | | `-- subproject22.txt
...
- Any authentication method supported by Hudson Subversion core (SubversionSCM.class) the Subversion plugin should work from v1.4, but haven't been tested. Please create an issue ticket if you successfully tag with the authentication methods other than username / password. Please contact me if you have problems with other authentication scheme.
- Tagging for the project with multiple locations that are not symmetric and needed to be tagged in the different depth are not supported yet. This should be able to be addressed by specifying tag base URL per location, but haven't implemented yet.
...
Please create an issue ticket and specify svn-tag
as the sub-component when you find bugs, improvement ideas, or create a patch.
Please include the version of svn-tag plugin, subversion repository URL location(s), tag base URL, and the layout of your svn repositories.
"Tag this build" link appeared in a build screen is NOT related to this plugin. Please submit the report to subversion
instead.
History
Jul 7 2015 Version 1.18
- [JENKINS-28615] - Supplied credentials not used
- [JENKINS-26611] - SvnTagPublisher aborted java.lang.NoSuchMethodError
Jul 17 2014 Version 1.17
- JENKINS-21797 Compatibility with authentication in 2.x versions of the Subversion plugin.
- Better diagnostics of errors, including PR #3.
- Fixed improper version range dependency.
01/12/12
- k2nakamura no longer actively maintain this plugin. Instead, V.Renjith stepped up and take the ownership of the plugin. Thank you Renjith.
11/02/11 Version 1.16
- Made to work better with Promoted builds plugin (JENKINS-5608)
Warning |
---|
This version requires Hudson 1.421 or later. |
07/27/11 Version 1.15
- Merged the changes to address the issue described in JENKINS-10325. Thanks to Carsten Klein.
Warning |
---|
This version requires Hudson 1.420 or later. |
03/26/10 Version 1.14
- Fixed doMkdir problem introduced in 1.13 (JENKINS-6066).
...
- Added groovy expression support in tag base URL.
Warning title Change in tag base URL The tag base URL no longer appends job name implicitly at the end since this version. Please add '$\{env\['JOB_NAME'\]\}' if you upgrade from version 1.1 and want to keep the original behavior.Wiki Markup
04/18/08 Version 1.1
- Fixed a path issue in help html links.
...