Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

repeat parameters in repo definition #1685

jgeorgeson ·
I have a configuration that needs a collection of sandboxes all with a common SVN URL pattern. I would like to setup one repo configuration using

http://host/svn/base-${params.get("repeat.testModule").toLowerCase()}/...


as the URL. And then define the SVN update step to have a define the repeat.testModule using a variable reference so that we can customize the set on manual triggers. First, it doesn't like the inclusion of toLowerCase(). That's not a big deal, we just have the sandboxes currently existing with mixed case while the actual SVN repo is all lower case, cosmetic change but would be nice to know why I can't use toLowerCase there. Second, and more importantly, this is generating a config error

2011-12-12 10:58:38,776 [Thread-12977] ERROR com.pmease.quickbuild.DefaultBuildEngine - Error processing build request.
com.pmease.quickbuild.QuickbuildException: Failed to run command: /opt/CollabNet_Subversion/bin/svn info http://host/svn/base-/... --username username --xml , returned code: 1


So it didn't resolve in the variable/parameter substition. I had set the config to always build so I'm not sure why it's trying to run this outside the specific SVN update step. Is this usecase not possible? I have 15 repos/sandboxes, I don't want to maintain 30 entities per config.
  • replies 5
  • views 2778
  • stars 0
robinshen ADMIN ·
The reason is that QB needs to take snapshot for these repositories and this is run out of the step. To workaround this, modify the repository url like below:

http://host/svn${groovy: def module=params.get("repeat.testModule"); if (module!=null) return "/base-" + module.toLowerCase() + "/..."; else return "";}

This tells QB to take snapshot for "http://host/svn" directly if the param is not defined.
jgeorgeson ·
I get the same error

    com.pmease.quickbuild.QuickbuildException: Failed to run command: /opt/CollabNet_Subversion/bin/svn info http://host/svn --username fhalcmsvn --xml , returned code: 1
robinshen ADMIN ·
Can you please run the same command from command line to see what happens?
jgeorgeson ·
It's failing because it's an invalid URL. The '/svn' DAV location in httpd is an SVNParentPath, so querying that URL returns

svn: Repository moved permanently to 'http://host/svn/'; please relocate


Because there's no repo specified. And /svn/base-' is an invalid repo path

svn: Could not open the requested SVN filesystem


Unless you have another suggestion I'm going to remove the repository config and just have a repeating shell command step that runs svn directly using the repeating parameters I've already outlined.
robinshen ADMIN ·
Since repeat params only exist when step runs. And putting this in repository definition cause the param returning empty value. If the parent repository path is not accessible to get the repository revision, then there is no way to achieve this in repository definition.