Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you do this with Hudson?

I want to create a hudson job, that takes an id as a parameter. And use that id to calculate the svn-repo path.

Where I work you have a svn path for every issue that you resolve. And then all the issues are joined into a single svn-path.

What I want to do is to run static code analysis on the partial issues.

So I think maybe having an Ant build.xml that I use for every issue, then, parametrize the job with the issue id.

I have tried to achieve that but the svn path doesn't replace the parameter.

I have tried with #issueId, %issueId%, ${issueId} and ${env.issueId} without success.

Jump error like:

Location 'http://svn-path:8181/svn/devSet/issues/${env.chuid}' does not exist
Checking out a fresh workspace because C:\Documents and Settings\dnoseda\.hudson\jobs\test\workspace\${env.chuid} doesn't exist
Checking out http://svn-path:8181/svn/devSet/issues/${env.chuid}
ERROR: Failed to check out http://svn-path:8181/svn/devSet/issues/${env.chuid}
org.tmatesoft.svn.core.SVNException: svn: '/svn/!svn/bc/46190/devSet/issues/$%7Benv.chuid%7D' path not found: 404 Not Found (http://svn-path:8181)
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
    at 

I am think that I can not do what I want.

Do you know how I can setup the correct configuration to achieve this matter?

Thanks for any help.

Edit The section of the configurate job that I want to put this parameter is this:

<scm class="hudson.scm.SubversionSCM">
<locations>
      <hudson.scm.SubversionSCM_-ModuleLocation>
        <remote>http://svn-path:8181/svn/devSet/issues/${env.issueid}</remote>
      </hudson.scm.SubversionSCM_-ModuleLocation>
    </locations>

New Edit: Solved

My version of hudson it was the last (1.349), but the version of svn plugin it was 1.11, being the last the 1.13, and it work with ${issueId}

Thank for the anwsers

like image 829
user2427 Avatar asked Jan 19 '26 08:01

user2427


1 Answers

From the hudson wiki:

"The parameter are available as environment parameters. So e.g. a shell ($FOO, %FOO%) or Ant ( ${env.FOO} ) can access these values."

Your syntax doesn't match the one in the wiki.

like image 193
Tomislav Nakic-Alfirevic Avatar answered Jan 20 '26 22:01

Tomislav Nakic-Alfirevic