How to map Hudson user names to VCS user names

rajeshkumar created the topic: How to map Hudson user names to VCS user names
Hi All

I’m wondering if it is possible to map the Hudson user name to one or more VCS user names. I’ve setup a Hudson instance with simple security (logged in people can do anything, non-logged in people can only view build results). For some reason Hudson is not mapping the users to the people that perform the checkins. So the last activity of each user is always empty. Is there a special setting that I need to know of or should Hudson automatically take care of that?

Thanks
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Advice on our Hudson setup / How to Poll Dependencies

scmuser created the topic: Advice on our Hudson setup / How to poll dependenc
Advice on our Hudson setup / How to poll dependencies

Hi, I’m looking for some advice on whether our Hudson setup is
sensible, and I’m also wondering how to poll instead of build
“dependency-triggered” jobs.

We have a project that is broken up into 3 components. As is typical
with git, each component is a standalone piece that lives in its own
git repository.

The Hudson Git Plugin takes multiple repository URLs but blends them
together, so we couldn’t just keep everything in a single job (nor do
I think we really want that), and instead we created one job per
repository.

Dependency-wise, one project (C) depends on the other two (A, B).
Brief Googling led us to the Join Plugin. So now we have a 4th “base”
job (D) that is empty and simple triggers A, B to build, then has a
Join Trigger for C. D builds every hour.

Now to the question: our setup produces a lot of unnecessary builds.
Is there a way to add polling into the chain, such that if an upstream
poll detects no changes, downstream polls still take place? It seems
that currently there are two problems standing in the way of this:

(1) Downstream jobs can only be built, not polled.

(2) Only post-build triggers exist, so an upstream project (like A or
B) must actually go through a build for C to build, whereas what we’d
want here is a post-poll trigger.

Thanks in advance for any tips

Tagged :

Where can you set/change the ANT_OPTS in Hudson

rajeshkumar created the topic: Where can you set/change the ANT_OPTS in Hudson
Where can you set/change the ANT_OPTS in Hudson

Questions:
I’m using Hudson and Maven and also Ant to make a build.

I need to set the ANT_OPTS to pass additional JVM arguments. But where can I
set/change the ANT_OPTS in Hudson for a project?

When I configure a project I press button ‘ADVANCED’ in the build section.
In there I can set the MAVEN_OPTS, but actually I’m searching for the
ANT_OPTS.

Because at the moment the JunitReport code which is being called by ant
within Maven I’m running out of permgen memory.

At the moment this is what I pass to MAVEN_OPTS:
-Xmx1024m -Xms1024m -XX:MaxPermSize=512m -XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled

but I really need to set the ANT_OPTS somewhere.

Answer
Try the “java options” field in the advanced section.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Hudson with Subversion

scmuser created the topic: Hudson with Subversion
A basic question about Hudson and Subversion when having many branches
I have a trunk and many branches.

I want a single Hudson job to control all these things, instead of creating one job for each branch, not to mention the fact that the number of branches will increase in the future.

The most important thing is, when branch A is changed and updated, I want Hudson only to build branch A, not all branches and trunk.

In a word: how can I make Hudson discriminate which directory has been changed and run the corresponding script?
How to implement this?

mnanjala replied the topic: Re:Hudson with Subversion
Hello
You should use parameterized build which and you should later give as ${BRANCH} where ever you call respective branch…

Tagged :

Seeking in and out of Cobertura

mnanjala created the topic: Seeking in and out of Cobertura
Hi All,

I need all info about Cobertura

How we can implement?How much time it would need to get implemented?What are all code base it supports?What is benifits? I saw the website did not understand fully.

-Thanks
Pravin

rajeshkumar replied the topic: Re: Seeking in and out of Cobertura
Hi Praveen,

Hope this will help you….

Official Site of cobertura
cobertura.sourceforge.net/

FAQ cobertura
cobertura.sourceforge.net/faq.html

cobertura Introdcution
cobertura.sourceforge.net/introduction.html

cobertura Command Line reference
cobertura.sourceforge.net/commandlinereference.html

cobertura Ant Task Reference
cobertura.sourceforge.net/anttaskreference.html

cobertura with Maven
cobertura.sourceforge.net/maven.html

cobertura Plugins for Hudson
wiki.hudson-ci.org/display/HUDSON/Cobertura+Plugin

cobertura Good tutorial
www.devx.com/ibm/Article/28095

cobertura Bamboo plugins
studio.plugins.atlassian.com/wiki/displa…boo+Cobertura+Plugin
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Creating single WAR file from multiple branches

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

Tagged :

Does Jenkins let you create branches?

sathiya created the topic: Does Jenkins let you create branches?
All,

At my workplace we create weekly branches for releases. I tried p4 integ and p4 submit inside Jenkins so I could schedule branching. I used export to setup P4PORT and P4CLIENT. It dies saying files not in client view. Can you schedule Jenkins to create branches?

Thanks,
Rakhee

rajeshkumar replied the topic: Re: Does Jenkins let you create branches?
Hi,

At present perforce jenkins plugins just support following operations…
Polling
Synchronizing
Browsing latest changes
Labeling builds (tagging)
you can create your custom script to do so.However, the error which you are getting should be somthing related to your p4 client view. re-check your client view mapping and branch mapping. both should be in client view.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

/usr/bin/p4 error in windows machine with jenkins

rajeshkumar created the topic: /usr/bin/p4 error in windows machine with jenkins
Issues:

[workspace] $ “C:\Program Files\Perforce\p4.exe” login -p
[workspace] $ /usr/bin/p4 login -p

Solution:

This must be related to value of P4USER, P4PORT, P4PASSWD or P4TICKET variable is not getting passed to Jenkins.
Try following..
Restart Machine or Restart Services OR Set P4USER, P4PORT, P4PASSWD or P4TICKET and Restart Jenkins Services again.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

How to Change Jenkins HTTP port number?

scmuser created the topic: How to Change Jenkins HTTP port number?
How to Change Jenkins HTTP port number?

rajeshkumar replied the topic: How to Change Jenkins HTTP port number?
For Windows (service installation)
Edit jenkins.xml or hudson.xml

Navigate to the directory where you installed Jenkins/Hudson and you will see the XML at the root. Open it and look for tag, there will be all the command arguments to be used when starting up Jenkins or Hudson.
One of those arguments is –httpPort, typically:
–httpPort=8080.
Change 8080 to whatever port number you want.

WAR File, deployed in GlassFish
You will need to change the default HTTP port in GlassFish.

Natively installed in linux
At least for RHEL, you should be able to find the /etc/sysconfig/hudson, which typically has the following line, among other configuration ones:
HUDSON_PORT=”8080″.
Change 8080 to whatever port number you want.

Other linux distributions (using wrapper)
At the time of writing, Arch Linux’s AUR Jenkins version uses wrapper to launch itself from the .war file.

Edit /opt/jenkins/conf/wrapper.conf, find wrapper.app.parameter.2=–httpPort=8070 (typically).
Change 8070 to whatever port number you want.

This wrapper solution applies to any system using wrapper, not only linux.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Jira issue not fixed via hudson

amitanand123 created the topic: Jira issue not fixed via hudson
Anybody performed this task?

Let say Hudson+Jira and SVN are integrated and we are planning to release a build.
While execution of job we can identify how many tickets are fix during a unique build but how we are going to identify the tickets which are not fixed during the same build?
Build server should send an email notification of Tickets which are not fixed during that build?

Thanks in advance
Amit

rajeshkumar replied the topic: Jira issue not fixed via hudson
I know i am replying late but I am looking for similar solution now a days? Can you please share your experience on it?
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :