Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-3445

SVN_REVISIONS environment variable to pass multiple revision numbers

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: subversion-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      When multiple subversion repositories are configured within a single job, the
      SVN_REVISION environment variable cannot be used to pass all revision numbers
      from the corresponding repositories.
      The documentation suggests to use the svnversion command in this particular case
      but it is not very practical when the working copy is checked out with the 'svn
      update' option enabled: svnversion may report composite revision informations.

      I suggest to create a new environment variable, possibly SVN_REVISIONS, to hold
      a list of checked out revisions, whose order would match the declaration order
      of the repositories in the configuration page.

        Attachments

          Activity

          Hide
          dty Dean Yu added a comment -

          I added this feature to version 1.21 of the Subversion plugin. Rather than a single environment variable with all the revision numbers, I split them out into individual variables, with an index in the name that corresponds to the module in the configuration.

          SVN_REVISION_1, SVN_REVISION_2, etc.

          This change also exposes SVN_URL_1, SVN_URL_2, etc so you have access to the module URLs as well.

          Show
          dty Dean Yu added a comment - I added this feature to version 1.21 of the Subversion plugin. Rather than a single environment variable with all the revision numbers, I split them out into individual variables, with an index in the name that corresponds to the module in the configuration. SVN_REVISION_1, SVN_REVISION_2, etc. This change also exposes SVN_URL_1, SVN_URL_2, etc so you have access to the module URLs as well.
          Hide
          c089 c089 added a comment -

          Thanks, this solution works for me. Reopening nonetheless because the documentation has not been adapted accordingly: When you click the "See the list of available environment variables" there is no mention of the SVN_REVION_* variables.

          Show
          c089 c089 added a comment - Thanks, this solution works for me. Reopening nonetheless because the documentation has not been adapted accordingly: When you click the "See the list of available environment variables" there is no mention of the SVN_REVION_* variables.
          Hide
          dty Dean Yu added a comment -

          These variables are described in the help text for the Repository URL text field.

          Show
          dty Dean Yu added a comment - These variables are described in the help text for the Repository URL text field.

            People

            • Assignee:
              dty Dean Yu
              Reporter:
              enrico74 enrico74
            • Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: