Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Warning

This plugin manages only tagging triggered by a successful build. This plugin is NOT related to "Tag this build" link.

Image Modified

What does this do?

...

  • 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 as env, sys, and repoURL respectively. For repoURL, 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. 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.

    Note
    titleJob name in tag base 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.
    Code Block
    svnrepo/
    |-- branches
    |-- tags
    `-- trunk
        |-- project1
        |   |-- a.txt
        |   |-- subproject1
        |   |   `-- subproject1.txt
        |   `-- subproject2
        |       `-- subproject2.txt
        `-- project2
            |-- subproject21
            |   `-- subproject21.txt
            `-- subproject22
                `-- subproject22.txt
    
    You specify two locations in subversion configuration.
    Code Block
    location 1: http://svn.example.com/svn/svnrepo/trunk/project1
    location 2: http://svn.example.com/svn/svnrepo/trunk/project2
    
    Then specify the tag base URL embedding a part of repoURL as tag base URL.
    Code Block
    http://svn.example.com/svn/svnrepo/tags/${env['BUILD_TAG']}/${repoURL[-1]}
    (or)
    ../tags/${env['BUILD_TAG']}/${repoURL[-1]}
    
    Wiki Markup
    You will get the following tags. Please note that repoURL contains {{\[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
    

...

  • Added groovy expression support 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.

    Warning
    titleChange in tag base URL

    Wiki Markup

04/18/08 Version 1.1

  • Fixed a path issue in help html links.

...