revanthreddy created the topic: Creating single WAR file from multiple branches
Hi,
I am Revanth working for a product company. We are using Hudson for creating WAR files from SVN for our daily build purposes. Until these days everything went fine, but in recent days we have a change in SVN structure where I am stuck for preparing WAR file. Any help in this regard is highly appreciated.
My problem area:
We have a branch called “A” where platform files are checked in and another branch called “B” where product files are checked in. Through Hudson I need to prepare WAR file by combing “A” branch files on the top it branch “B” files. I need to checkout first “A” branch and then on the top it “B” branch files and build the WAR file.
Please let me know who this can be achieved by using Hudson.
Thanks&Regards,
Revanth.
rajeshkumar replied the topic: Re: Creating single WAR file from multiple branches
You can sycn the both source code using hudson – job configuration…
In Source Code Management = Subversion
and add as many Repository URL you want to sync…
Once sync got completed, Write one build.xmkl file and add to hudson job configuration…
Snippet of code below;
More reference can be found…
ant.apache.org/manual/Tasks/war.html
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
scmuser created the topic: How to restart Hudson?
How to restart hudson if i have installed like java – jar hudson.war
rajeshkumar replied the topic: Re:How to restart Hudson?
Reply from Hudson community…
Running hudson directly like that runs it under the built-in Winstone web server. You can use some commands that it has to control your app:
I do this:
start:
nohup $JAVA_HOME/bin/java $HUDSON_JAVA_OPTS -jar $HOME/wars/hudson.war –controlPort=8001 > $HOME/logs/hudson.log 2>&1 &
restart:
java -cp $HOME/bin/winstone-0.9.10.jar winstone.tools.WinstoneControl reload: –host=localhost –port=8001
shutdown:
java -cp $HOME/bin/winstone-0.9.10.jar winstone.tools.WinstoneControl reload: –host=localhost –port=8001
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
mnanjala replied the topic: Re:How to restart Hudson?
You can restart the service as below
Got to /etc/init/ (basically hudson service script resides here)
hudson.sh restart
rajeshkumar replied the topic: Re:How to restart Hudson?
What about in Windows?
Can you please provide small notes on What are the ways to start – stop hudson in Linux and Windows?
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
mnanjala replied the topic: Re:How to restart Hudson?
Well in windows you make it as a service is the best bet else from GUI itself you can restart.
Command Line would be like this and here windows istreated as a slave.
sc.exe create HudsonSlave binPath= “C:\WINDOWS\system32\java.exe -jar C:\hudson\slave.jar
-jnlpUrl http://SERVER:PORT/computer/MACHINE/slave-agent.jnlp” start= auto
This is a very simple version, you can elaborate start scripts which use some program to hide the CMD window, select the good server and try to ping it, get the MACHINE variable with %computername% ,etc…
amitanand123 replied the topic: Re:How to restart Hudson?
You can create .bat file
cd d:\Program Files\Hudson
java -DHUDSON_HOME=d:\Hudson -jar hudson.war
or you can use plugins to install as a service
“Install as Windows Service”
Installation Directory=d:\Hudson\.hudson
rajeshkumar replied the topic: Re:How to restart Hudson?
I got some good links over net as well…
weblogs.java.net/blog/2008/10/08/install…udson-service-redhat
wiki.hudson-ci.org/display/HUDSON/Instal…son+as+a+Unix+daemon
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
- Implementing Managed IT Services: A Step-by-Step Guide - August 30, 2024
- DevOps Foundation Certification - August 29, 2024
- SRE Foundation Certification - August 29, 2024