Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass environment variable of hudson as a parameter for svn build

My requirement is I need the scope of Hudson's environment variable in the subproject's build parameter for svn url.

I want to set SVN Branch name as an environment variable of Hudson, as I want it to be used by all my projects configured there.

If I access my environment variable [BUILD_BRANCH] as

http://svn/repos/project/subproj/branches/${BUILD_BRANCH}

the url is not getting replaced with the value.

But in the same case if I have BUILD_BRANCH as String Parameter for Parameterised Build in each subproj the url is replaced with value. But I cannot not change the branch value [build parameter value] each time in all the projects. Also the downstream projects were not able to access the build parameters [String] of the calling projects.

like image 858
Krishna Prasanth Avatar asked Oct 20 '10 18:10

Krishna Prasanth


1 Answers

There is a checkbox called: "This build is Parameterized" in the build's configuration.

If you enable that, you will be able to create parameters to this specific build.

I hope that this helps.

like image 94
Marek Avatar answered Nov 14 '22 16:11

Marek