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

Add support for build parameters in Subversion URLs.

    XMLWordPrintable

Details

    Description

      Subversion URLs can be parameterized. The plugin should substitute the URL parameters by their default values. Furthermore, the plugin should support URLs ending with @HEAD.

      This enhancement request comes from the following comment by Damon Overboe.

      The scenario is I wanted to be able to trigger older builds by passing the specific revision, so I added SVN_REVISION as a parameter, defaulting to HEAD.

      • Set up a job
      • Feature branch it
      • Modify the main job to allow SVN_REVISION to be passed in as a parameter,
      • and default it to HEAD (may not matter)
      • and change your svn url to http://path/to/project/trunk@$SVN_REVISION
      • then rebasing a feature will fail, complaining about the path.

      Also, if you set up the job initially with the @SVN_REVISION, the plug-in won't be able to find the repo when you go to feature branch it.

      The work-around for me is easy enough; rather than specifying the @SVN_REVISION in the URL, I just:

      • manually cut a branch from the specific revision I want,
      • tell the plug-in to add the feature branch (with the same name)
      • Click OK to add the project when it warns me the branch already exists.

      Attachments

        Activity

          alex_ouzounis Alex Ouzounis added a comment - https://github.com/jenkinsci/svnmerge-plugin/pull/16

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          pom.xml
          src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java
          src/test/java/jenkins/plugins/svnmerge/FeatureBranchPropertyTest.java
          http://jenkins-ci.org/commit/svnmerge-plugin/9231b9191724a194e18fa5c48e9e3c28df501869
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs.

          • When resolving the UpStream ModuleLocation in FeatureBranchProperty,
            make sure we take into accout the parameter from the parent project,
            Computer environment and Node environment.
          • Subversion dependenvy changed from 2.2 to 2.4.4 - we need
            ModuleLocation#(Job<?,?> project) as well as ModuleLocation#(EnvVars
            env) to expand consisntently the variables.
          • Added testUpStreamURLwithParams in FeatureBranchPropertyTest
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: pom.xml src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java src/test/java/jenkins/plugins/svnmerge/FeatureBranchPropertyTest.java http://jenkins-ci.org/commit/svnmerge-plugin/9231b9191724a194e18fa5c48e9e3c28df501869 Log: JENKINS-24735 - Add support for build parameters in Subversion URLs. When resolving the UpStream ModuleLocation in FeatureBranchProperty, make sure we take into accout the parameter from the parent project, Computer environment and Node environment. Subversion dependenvy changed from 2.2 to 2.4.4 - we need ModuleLocation#(Job<?,?> project) as well as ModuleLocation#(EnvVars env) to expand consisntently the variables. Added testUpStreamURLwithParams in FeatureBranchPropertyTest

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          pom.xml
          http://jenkins-ci.org/commit/svnmerge-plugin/ea4feccd574079bb790c6cb94fa90a6468d0af59
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs.

          • Increment core dependency to 1.509 since Subversion 2.4.4 needs it.
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: pom.xml http://jenkins-ci.org/commit/svnmerge-plugin/ea4feccd574079bb790c6cb94fa90a6468d0af59 Log: JENKINS-24735 - Add support for build parameters in Subversion URLs. Increment core dependency to 1.509 since Subversion 2.4.4 needs it.

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java
          http://jenkins-ci.org/commit/svnmerge-plugin/781226823cf2d1b02f5060ac10a3637f84f47281
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs.

          • removed un-necessary try/catch in FeatureBranchProperty#integrate
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java http://jenkins-ci.org/commit/svnmerge-plugin/781226823cf2d1b02f5060ac10a3637f84f47281 Log: JENKINS-24735 - Add support for build parameters in Subversion URLs. removed un-necessary try/catch in FeatureBranchProperty#integrate

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java
          http://jenkins-ci.org/commit/svnmerge-plugin/4ef248b6f8f403f2ef51ceeb880d80e6f26fef82
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs.

          • update try/catch SVNException creation in
            FeatureBranchProperty#integrate to new API
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java http://jenkins-ci.org/commit/svnmerge-plugin/4ef248b6f8f403f2ef51ceeb880d80e6f26fef82 Log: JENKINS-24735 - Add support for build parameters in Subversion URLs. update try/catch SVNException creation in FeatureBranchProperty#integrate to new API

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java
          http://jenkins-ci.org/commit/svnmerge-plugin/453bb3be31af18f17214b885e215d368456ff4ed
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs

          • reinstate FeatureBranchProperty to latest HEAD; accidentily used an
            older revision previously
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java http://jenkins-ci.org/commit/svnmerge-plugin/453bb3be31af18f17214b885e215d368456ff4ed Log: JENKINS-24735 - Add support for build parameters in Subversion URLs reinstate FeatureBranchProperty to latest HEAD; accidentily used an older revision previously

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java
          src/test/java/jenkins/plugins/svnmerge/FeatureBranchPropertyTest.java
          http://jenkins-ci.org/commit/svnmerge-plugin/5da95aade63c7c07d2b582f15f155a22773414d7
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs

          • Expand parameters from upstream job not from property owner
          • Updated test
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java src/test/java/jenkins/plugins/svnmerge/FeatureBranchPropertyTest.java http://jenkins-ci.org/commit/svnmerge-plugin/5da95aade63c7c07d2b582f15f155a22773414d7 Log: JENKINS-24735 - Add support for build parameters in Subversion URLs Expand parameters from upstream job not from property owner Updated test

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          src/main/java/jenkins/plugins/svnmerge/IntegratableProjectAction.java
          http://jenkins-ci.org/commit/svnmerge-plugin/8e84f51508198f0de1065807d48522cd6c23882f
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs

          • When creating a feature branch from a project that supports
            integration from new feature branches, take into account system and
            project environment variables
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: src/main/java/jenkins/plugins/svnmerge/IntegratableProjectAction.java http://jenkins-ci.org/commit/svnmerge-plugin/8e84f51508198f0de1065807d48522cd6c23882f Log: JENKINS-24735 - Add support for build parameters in Subversion URLs When creating a feature branch from a project that supports integration from new feature branches, take into account system and project environment variables

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java
          src/main/java/jenkins/plugins/svnmerge/IntegratableProjectAction.java
          src/main/java/jenkins/plugins/svnmerge/Utility.java
          http://jenkins-ci.org/commit/svnmerge-plugin/c1c458ca705f8ed0c4a324ec56ae5927f0666f93
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs

          • Extract SVNUrl variable expansion into a utility and use that acrosss
            all classes that require it.
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java src/main/java/jenkins/plugins/svnmerge/IntegratableProjectAction.java src/main/java/jenkins/plugins/svnmerge/Utility.java http://jenkins-ci.org/commit/svnmerge-plugin/c1c458ca705f8ed0c4a324ec56ae5927f0666f93 Log: JENKINS-24735 - Add support for build parameters in Subversion URLs Extract SVNUrl variable expansion into a utility and use that acrosss all classes that require it.

          Code changed in jenkins
          User: Hugues Chabot
          Path:
          pom.xml
          src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java
          src/main/java/jenkins/plugins/svnmerge/IntegratableProjectAction.java
          src/main/java/jenkins/plugins/svnmerge/Utility.java
          src/test/java/jenkins/plugins/svnmerge/FeatureBranchPropertyTest.java
          http://jenkins-ci.org/commit/svnmerge-plugin/d845cf04cb76cc05bfa09f0a90be93ca38a2b224
          Log:
          Merge pull request #16 from alexouzounis/JENKINS-24735

          [FIXED JENKINS-24735] - Add support for build parameters in Subversion URLs.

          Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/fc6fe531500d...d845cf04cb76

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Hugues Chabot Path: pom.xml src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java src/main/java/jenkins/plugins/svnmerge/IntegratableProjectAction.java src/main/java/jenkins/plugins/svnmerge/Utility.java src/test/java/jenkins/plugins/svnmerge/FeatureBranchPropertyTest.java http://jenkins-ci.org/commit/svnmerge-plugin/d845cf04cb76cc05bfa09f0a90be93ca38a2b224 Log: Merge pull request #16 from alexouzounis/ JENKINS-24735 [FIXED JENKINS-24735] - Add support for build parameters in Subversion URLs. Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/fc6fe531500d...d845cf04cb76

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          src/main/java/jenkins/plugins/svnmerge/Utility.java
          http://jenkins-ci.org/commit/svnmerge-plugin/8e1a3b75d19221d1dd2c2edffac35fb23640b2ba
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs

          • Add support for Global Node Properties as well
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: src/main/java/jenkins/plugins/svnmerge/Utility.java http://jenkins-ci.org/commit/svnmerge-plugin/8e1a3b75d19221d1dd2c2edffac35fb23640b2ba Log: JENKINS-24735 - Add support for build parameters in Subversion URLs Add support for Global Node Properties as well

          Code changed in jenkins
          User: Hugues Chabot
          Path:
          src/main/java/jenkins/plugins/svnmerge/Utility.java
          http://jenkins-ci.org/commit/svnmerge-plugin/344a848c5d48ce2904b42aed3ad962b73d3f7f5b
          Log:
          Merge pull request #18 from alexouzounis/JENKINS-24735

          JENKINS-24735 - Add support for build parameters in Subversion URLs

          Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/d845cf04cb76...344a848c5d48

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Hugues Chabot Path: src/main/java/jenkins/plugins/svnmerge/Utility.java http://jenkins-ci.org/commit/svnmerge-plugin/344a848c5d48ce2904b42aed3ad962b73d3f7f5b Log: Merge pull request #18 from alexouzounis/ JENKINS-24735 JENKINS-24735 - Add support for build parameters in Subversion URLs Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/d845cf04cb76...344a848c5d48

          Code changed in jenkins
          User: Alexandros Ouzounis
          Path:
          src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java
          http://jenkins-ci.org/commit/svnmerge-plugin/c1c54c962b9dc39b2d865119ca343343779c1c96
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs

          • Update IntegrateAction to expand SVN URLs
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexandros Ouzounis Path: src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java http://jenkins-ci.org/commit/svnmerge-plugin/c1c54c962b9dc39b2d865119ca343343779c1c96 Log: JENKINS-24735 - Add support for build parameters in Subversion URLs Update IntegrateAction to expand SVN URLs

          Code changed in jenkins
          User: Alex Ouzounis
          Path:
          src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java
          http://jenkins-ci.org/commit/svnmerge-plugin/14eeb009758a87889a0e5c5964d41a7cdfe655b0
          Log:
          JENKINS-24735 - Add support for build parameters in Subversion URLs

          • Update IntegrateAction to expand SVN URLs (fixed typo)
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Ouzounis Path: src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java http://jenkins-ci.org/commit/svnmerge-plugin/14eeb009758a87889a0e5c5964d41a7cdfe655b0 Log: JENKINS-24735 - Add support for build parameters in Subversion URLs Update IntegrateAction to expand SVN URLs (fixed typo)

          Code changed in jenkins
          User: Hugues Chabot
          Path:
          src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java
          http://jenkins-ci.org/commit/svnmerge-plugin/d4f365865c7741dea46697d06e8abde0c433a8aa
          Log:
          Merge pull request #19 from alexouzounis/JENKINS-24735

          JENKINS-24735 - Add support for build parameters in Subversion URLs

          Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/344a848c5d48...d4f365865c77

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Hugues Chabot Path: src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java http://jenkins-ci.org/commit/svnmerge-plugin/d4f365865c7741dea46697d06e8abde0c433a8aa Log: Merge pull request #19 from alexouzounis/ JENKINS-24735 JENKINS-24735 - Add support for build parameters in Subversion URLs Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/344a848c5d48...d4f365865c77

          People

            kohsuke Kohsuke Kawaguchi
            hugueschabot Hugues Chabot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: