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

Allow check out of specific revision from Subversion via REVISION parameter

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      Modify hudson.scm.SubversionSCM.CheckOutTask to accept a value passed in as a
      build parameter with the name REVISION and checkout the specified revision for
      building. Check the following wiki page for modification requested:
      http://wiki.jenkins-ci.org/display/JENKINS/Subversion+Release+Manager

        Attachments

          Activity

          Hide
          piascikj piascikj added a comment -

          Created an attachment (id=592)
          Changes to CheckOutTask needed by svn-release-mgr plugin

          Show
          piascikj piascikj added a comment - Created an attachment (id=592) Changes to CheckOutTask needed by svn-release-mgr plugin
          Hide
          piascikj piascikj added a comment -

          Changed to enhancement and title change

          Show
          piascikj piascikj added a comment - Changed to enhancement and title change
          Hide
          dodok1 dodok1 added a comment -

          I would like to ask what is the reason to checkout specific revision from
          Subversion. Could you please describe the process it covers? For me it is not
          clear from the plugin page.

          Anyway, there is posibility to incorporate revision into url

          $ svn co -h
          checkout (co): Check out a working copy from a repository.
          usage: checkout URL[@REV]... [PATH]

          Show
          dodok1 dodok1 added a comment - I would like to ask what is the reason to checkout specific revision from Subversion. Could you please describe the process it covers? For me it is not clear from the plugin page. Anyway, there is posibility to incorporate revision into url $ svn co -h checkout (co): Check out a working copy from a repository. usage: checkout URL [@REV] ... [PATH]
          Hide
          msaxer msaxer added a comment -

          Here's an example of where this would be handy:
          I have a Hudson job that is responsible for deploying code to our production
          environment. It would be nice to specify which SVN revision # to build rather
          than always selecting the HEAD. Yes, I know branching is the right way to do
          this, but this project would work just fine with deploying from a specific
          revision # on the trunk.

          Show
          msaxer msaxer added a comment - Here's an example of where this would be handy: I have a Hudson job that is responsible for deploying code to our production environment. It would be nice to specify which SVN revision # to build rather than always selecting the HEAD. Yes, I know branching is the right way to do this, but this project would work just fine with deploying from a specific revision # on the trunk.
          Hide
          peter_schuetze peter_schuetze added a comment -

          @msaxer:

          look at dodok1's comment. Instead of your current URL (http://.../trunk) you just need to add the revision number to it. The URL will then look like http;//.../trunk@${MYREVISION} where MYREVISION is a parameter of your job. You can also replace ${MYREVISION} with a revision number, but I don't think that will have a useful purpose at all.

          Show
          peter_schuetze peter_schuetze added a comment - @msaxer: look at dodok1's comment. Instead of your current URL ( http://.../trunk ) you just need to add the revision number to it. The URL will then look like http;//.../trunk@${MYREVISION} where MYREVISION is a parameter of your job. You can also replace ${MYREVISION} with a revision number, but I don't think that will have a useful purpose at all.
          Hide
          dty Dean Yu added a comment -

          As mentioned on the thread on the wiki page, the Subversion plugin gets a RevisionParameterAction from the build which contains the Subversion revision of that build. No need to maintain a copy of the SubversionSCM code or modify CheckOutTask.

          Show
          dty Dean Yu added a comment - As mentioned on the thread on the wiki page, the Subversion plugin gets a RevisionParameterAction from the build which contains the Subversion revision of that build. No need to maintain a copy of the SubversionSCM code or modify CheckOutTask.
          Hide
          kraxel Sven Keller added a comment -

          Hello,

          I'm not sure if my proeblem is related to this topic but perhaps, somebody is still istening to this thread and can give some guidance.
          I configured the job using SVNRM-plugin as described in the quick help and I can see my revision list in the "releases" menu.
          However all the time I start a job from this list
          (corresponding link looks like: http://myJenkins:8080/job/myJob/releases/build?revision=1934)
          it always takes HEAD instead of the given revision number.

          Where do I have to configure this in my job?
          adding @1934 or @${REVISION} to the release SCM configuration does not help.

          Sven

          Show
          kraxel Sven Keller added a comment - Hello, I'm not sure if my proeblem is related to this topic but perhaps, somebody is still istening to this thread and can give some guidance. I configured the job using SVNRM-plugin as described in the quick help and I can see my revision list in the "releases" menu. However all the time I start a job from this list (corresponding link looks like: http://myJenkins:8080/job/myJob/releases/build?revision=1934 ) it always takes HEAD instead of the given revision number. Where do I have to configure this in my job? adding @1934 or @${REVISION} to the release SCM configuration does not help. Sven
          Hide
          angelfighter Helene W added a comment -

          I have the same problem as Sven Keller.
          When I add @${REVISION} at the end of the SVN url, than I don't see the revisions ("/trunk@$REVISION doesn't exist in the repository")

          Show
          angelfighter Helene W added a comment - I have the same problem as Sven Keller. When I add @${REVISION} at the end of the SVN url, than I don't see the revisions ("/trunk@$REVISION doesn't exist in the repository")
          Hide
          anup_masurkar Anup Masurkar added a comment -

          Hi,

          Can you please provide me step by step solution for this issue even i am looking for "specific revision from Subversion via REVISION parameter" and the plugin "svn-release-mgr" which you have provided i am unable to find out.

          Thanks,

          Anup

          Show
          anup_masurkar Anup Masurkar added a comment - Hi, Can you please provide me step by step solution for this issue even i am looking for "specific revision from Subversion via REVISION parameter" and the plugin "svn-release-mgr" which you have provided i am unable to find out. Thanks, Anup

            People

            • Assignee:
              Unassigned
              Reporter:
              piascikj piascikj
            • Votes:
              10 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: