Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » How to access Global Variable from the hudson job(How to access Global Variable from the hudson job)
How to access Global Variable from the hudson job [message #1046602] Mon, 22 April 2013 01:59 Go to next message
Anamay Singh is currently offline Anamay Singh
Messages: 3
Registered: April 2013
Junior Member
In our project,for each mothly release,we create a branch from the trunk and perform the release.As a result,before the release ,we need to modify the SVN path for each module to refer to new branch,in each job configuration page.

To avoid modifying each job for every release ,we defined a global variable to contian the url for the branch.This gloabal variable is not accessible form the from the job configuration page.

As the gloabal variable contains the path to the branch and hence the pom.xml file of the module,we cannot even use the build script to access the global variable. Therefore we need to access the varibale from the job configuration page itself.
Re: How to access Global Variable from the hudson job [message #1046981 is a reply to message #1046602] Mon, 22 April 2013 12:29 Go to previous messageGo to next message
Steve Christou is currently offline Steve Christou
Messages: 125
Registered: June 2012
Location: Milwaukee, Wisconsin
Senior Member

What version of the subversion plugin are you using? In 2.3.8 I introduced a new feature (see changelog http://wiki.hudson-ci.org/display/HUDSON/Subversion+Plugin) where you can use global variables in the SVNURL. If your global variable is defined as REPOSITORY, to use a global variable your URL needs to look like: "${REPOSITORY}/projectA/trunk" without the quotes.

Thanks,
Steve.


/**
 * @author Steven Christou
 * @dev    Hudson-ci
 */
Re: How to access Global Variable from the hudson job [message #1058268 is a reply to message #1046981] Mon, 13 May 2013 08:24 Go to previous messageGo to next message
Anamay Singh is currently offline Anamay Singh
Messages: 3
Registered: April 2013
Junior Member
Currently we are uing the version 2.3.8-h-1 for the subversion plugin.

I tried to access global variable using ${REPOSITORY},$REPOSITORY from the job configuration page but it is not recognize the global variable and hence throws exception stating URL..... does not exits

Below is the stack trace
org.tmatesoft.svn.core.SVNException: svn: E170000: URL '${GLOBAL_URL}/platform_components/shared_components/btable' doesn't exist
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 org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:934)
at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:19)
at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:8)
at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:291)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout(SVNUpdateClient.java:777)
at hudson.scm.subversion.CheckoutUpdater$UpdateTaskImpl.perform(CheckoutUpdater.java:111)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:152)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:160)
at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:114)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:152)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:812)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:795)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:776)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2052)
at hudson.remoting.UserRequest.perform(UserRequest.java:114)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:283)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:60)
at java.lang.Thread.run(Unknown Source)


Here GLOBAL_URL is the global variable defined in the hudson system configuration page.

Please let me know if this is the correct way to access global variable or if I am missing some thing in this.

Thanks
Anamay
Re: How to access Global Variable from the hudson job [message #1269709 is a reply to message #1046602] Wed, 12 March 2014 01:38 Go to previous message
Meghana Kinekar is currently offline Meghana Kinekar
Messages: 2
Registered: March 2014
Junior Member
We are using the Hudson subversion plugin "2.3.8". but still we are getting the same below issue-

org.tmatesoft.svn.core.SVNException: svn: E170000: URL '${GLOBAL_URL}/platform_components/shared_components/btable' doesn't exist
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 org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:934

We checked in the build.xml, the url is getting expanded correctly but during the checkout of the project its failing.

We have many other plugins also on hudson like polarian, Hudson Release Manager, Subversion Tagging Plugin also installed, do this cause any issue or what other configuration might cause the issue."RequestDumperValve" in tomcat is enabled in tomcat. Does this cause the above issue. Please let me know.
Previous Topic:Hudson 3.1.2 Configuration
Next Topic:UnknownHostException Hudson Proxy
Goto Forum:
  


Current Time: Fri Aug 22 04:01:28 EDT 2014

Powered by FUDForum. Page generated in 0.41105 seconds