Re: Report C++ compiling errors in Jenkins

2012-11-22 Thread Miguel Algaba Borrego
Thanks a lot! I will also install the LogParser plugin to extract some 
useful data from the log. 

Bests regards!
Miguel Algaba.

On Friday, November 16, 2012 4:44:33 PM UTC+1, mgimza wrote:


 We use the LogParser plugin.

 http://wiki.hudson-ci.org/display/HUDSON/Log+Parser+Plugin

 It allows you to specify reg-expressions in a text file that are used when 
 parsing the results of the build steps.


 Unfortunately this happens at the end of the build and not at the 
 build-step.

 I hope that this helps,
 Mgimza

 On Fri, Nov 16, 2012 at 5:32 AM, Miguel Algaba Borrego 
 miguel.alg...@gmail.com javascript: wrote:

 Hi all,

 I am working in a C++ project and use Jenkins for CI. Our slave machine 
 runs Ubuntu Server 12.04 and we are using several plug-ins to detect and 
 report C++ compiling warnings, but we are wondering if it would be possible 
 to report C++ compiling errors as well. We noticed that Jenkins 
 automatically stops the job execution after a compiling error. We have also 
 tried to compile our targets using the make -k option to let the compiler 
 continue in case of failing targets. This way, he finally get non-failing 
 targets compiled, but Jenkins keeps stopping the job. Is there a way to let 
 Jenkins continue executing the job and report the failing targets and 
 detected compiling errors (in a similar way to detected warnings)?

 Thanks a lot and best regards!
 Miguel Algaba.




Jenkins + GIT ls-remote error

2012-11-22 Thread Casper
Hey everyone,

I've been trying to install Jenkins with the GIT plugin, but somehow the 
GIT plugin doesn't seem to work for me.

I'm running Debian 5, with Jenkins as a service through apt-get. Jenkins 
itself works just fine. I installed the GIT plugin through Jenkins, but it 
does not seem to be able to use GIT properly.

Whenever I insert a GIT repository in a Jenkins project, regardless whether 
it's local or remote through the ssh protocol, it always gives me this 
error:
Failed to connect to repository : Error performing command: /usr/bin/git 
ls-remote -h file:///home/casper/git/4xS/.git HEAD

i have the latest version of GIT installed, and tested through sudo su 
jenkins whether GIT was accessible as Jenkins, which it is. As you can see 
I defined the absolute path to my GIT binary in the config as well, it 
still won't work.

Any suggestions?

Thanks in advance,

Casper


Re: need help groovy script getBuildnumber

2012-11-22 Thread Sven Finsterwalder
I have got the solution:

import jenkins.*
import jenkins.model.*
import hudson.model.*
import org.apache.commons.httpclient.*
import org.apache.commons.httpclient.auth.*
import org.apache.commons.httpclient.methods.*

def buildNumber = 2
def urlDeployment = http://servername:8080/hudson/job/
def buildVersionURL = urlDeployment + 
selenium2-portalservices-FavoriteGameTests-2.2/api/xml?depth=1xpath=/freeStyleProject/build[action/cause/upstreamProject='dunia'
 
and action/cause/upstreamBuild=${buildNumber}]/number/text()  
  
final HttpClient client = new HttpClient();
client.getParams().setAuthenticationPreemptive(true);
client.getState().setCredentials(AuthScope.ANY, new 
UsernamePasswordCredentials(username, apiToken));
URI uri = new URI(buildVersionURL,false)
final GetMethod method = new GetMethod();
method.setURI(uri)
client.executeMethod(method);
response = method.getResponseBodyAsString()


Am Mittwoch, 21. November 2012 13:00:37 UTC+1 schrieb Sven Finsterwalder:

 Hello,

 i hope some one can help me.
 I have this groovy script:
 import jenkins.*
 import jenkins.model.*
 import hudson.model.*
 import org.apache.commons.httpclient.*
 import org.apache.commons.httpclient.auth.*
 import org.apache.commons.httpclient.methods.*

 def username = name
 def apiToken = token
 def client = new HttpClient()
 client.getState().setCredentials(new AuthScope(
 http://hudson/login?from=%2Fhudson%2F,8080,realm;),new 
 UsernamePasswordCredentials(username, apiToken))
 client.params.authenticationPreemptive=true
  
 def buildNumber = 2
   println(hello${buildNumber})
   
 def urlDeployment = 
 http://hudson/job/selenium2-portalservices-FavoriteGameTests-2.2/;
 def urlPart = 
 api/xml?depth=1xpath=/freeStyleProject/build[action/cause/upstreamProject='dunia'
  
 and action/cause/upstreamBuild=${buildNumber}]/number/text()
  println(urlDeployment ++urlPart)
   
 def get = new GetMethod()
   get.setURI(new URI(urlDeployment++urlPart,false))
   println(here)
 get.setDoAuthentication(true)
 get.doAuthentication=true
   println(there + get.getDoAuthentication())
   println(wow)
 response = get.getResponseBodyAsString()
 println(response)

 But i do not get the correct answer. I got always:

 Authentication required


 What is wrong with my script, please help me.



Re: How to restrict user from viewing a particular view?

2012-11-22 Thread clem
Hi,

maybe you just change your Security Settings.
For example, you can hide the Views from users without permissions.
But this includes all Views.

Not sure about one special View.

But have a look at this Plugin, maybe this will help you:
https://wiki.jenkins-ci.org/display/JENKINS/View+Job+Filters

Greetings


Re: How to create a new page view.

2012-11-22 Thread oliver gondža
On Thu, 22 Nov 2012 05:48:02 +0100, Bharathi Ramalingam  
ramalingam.bhara...@gmail.com wrote:



Hi All,
   I am developing a plugin where I want to display Job statistics when
clicked on the Job link.
My question is how can i define a URL and bind it to the page view.
Really appreciate any clues or help.

Thanks,


Hi, an Action is probably what you are looking for.

[1]  
https://wiki.jenkins-ci.org/display/JENKINS/Action+and+its+family+of+subtypes


--
oliver


Re: How to create a new page view.

2012-11-22 Thread clem
Hi,

if you just want to add some Links , for example to the sidebar of a Job, 
or to the Mainpage,
have a look at this Plugin for getting Informations about creating Links.

Its also working with Action, like the Plugin ogondza posted.
(But simple and easy to understand, if you are developing your own Plugin)

clem


Re: How to create a new page view.

2012-11-22 Thread clem
https://wiki.jenkins-ci.org/display/JENKINS/Sidebar-Link+Plugin


Re: Retrieve server configuration via http

2012-11-22 Thread clem
Hi,

if you want to use the Information from the config.xml file
for a Plugin, maybe XMLHttpRequest is what you are looking for.

In this case, you can get the config.xml file and all Information you
want to work with.

Or in which case you want to use the server Configuration Information ?

clem


Re: Cannot remove old users

2012-11-22 Thread clem
Hey Phil,

the Jenkins Userdatabase is just a folder in your JENKINS_HOME Directory.
Users is where you find all your Members. Maybe, just remove the folder 
from one of your
users, who is getting the Error Message, Username is already taken. Now 
he should be able to
register again.

I also tried to delete a user in the Jenkins User Page.
After You really want to delete... the user was not shown on the User 
Page.
So, just check, if there is a Folder at the JENKINS_HOME users Directory.


Re: Query about running different job steps on different slaves

2012-11-22 Thread alok kumar
Hey there,
That would be great!! Can you please share it with me?
Also, please let me know how to get it from github as I am new to this.

Thanks a lot for the help.

Alok

On Thu, Nov 22, 2012 at 12:10 PM, Ivan Kalinin pupss...@gmail.com wrote:

 Hi!

 Actually, I've managed to develop a plugin for my own needs that
 implements what you want. It allows to 'connect' a group of slaves to form
 a so-called 'compound slave' - a virtual entity, proxying Slave.doBuild()
 (or wassitsname) to a different subslave of the group. It adds a build step
 'run something on a sub-node' to delegate particular build step to a
 sub-slave. The plugin even can create 'compound' slaves on-the-fly as a
 cloud provider from real slaves provisioned in some other cloud.

 If that sounds promising to you, I can share it on github (currently is
 privately-hosted) and you can try to tweak it up to you needs.

 Cheers,
 pupssman.


 On Wednesday, November 21, 2012 6:18:29 PM UTC+4, alok kumar wrote:

 Hi,
 Can anyone let me know if it is possible to execute different build steps
 on different slaves from within a single job?
 Is there any plugin that supports that? If not, what can be the
 workaround to achieve the same?

 Any help would be greatly appreciated.

 Thanks,
 Alok




Changes since last success in Email Extension Plugin

2012-11-22 Thread Dirk Kuypers
Hi,

I have a compile job that runs continuously triggered by SCM which starts
about 40 or 50 test jobs after successful compilation.
I am printing the changes since last success (coming from the upstream
compile job) of a test job which is run after a compile job like this:
${CHANGES_SINCE_LAST_SUCCESS, showPaths=true, pathformat=%p}

This has worked until I began to allow the compile job to run concurrently
because the feedback cycle was getting too long recently with compile times
of 6 minutes and test times up to more than 20 minutes and changes of more
than one developer getting mixed up into one build. Now it can happen that
I have several compiles before a special test is running again. Looking at
the build of the test Jenkins handles this correctly because it says:

No changes from last build. Changes in dependency

   1. JobContinuous [image: Success]#9601 → [image: Success]#9605 (detail)


Clicking on details I get all changes summarized for those 5 builds.

The email only prints nothing. If there is a 1 to 1 relation between
compile and test, emailing the changes works.

Is this a bug/feature request? Am I doing something wrong there?

BR
Dirk


404 on using --prefix

2012-11-22 Thread Straaten, Onno van der
Hi,
I'm deploying latest release of Jenkins on Windows 2008 server. Now I want to 
run jenkins in web context /jenkins so I in my jenkins.xml I added a prefix.
For example  arguments-Xrs -Xmx256m 
-Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar 
%BASE%\jenkins.war --httpPort=8282 --ajp13Port=8283 
--prefix=/jenkins/arguments

I also tried prefix=jenkins, so without the slash. Both produce same results. 
There is a 404 on all paths, the old one and the new one.

Is it possible to run Jenkins under different web context? For example 
http://myserver.com:8282/jenkins instead of 
http://cwvutl06.resultinfra.com:8282 ?

How can this be achieved?
Thanks and Regards,
Onno

Status Code: 404
Exception: Request URL / not found.brbr
Stacktrace:
Generated by Winstone Servlet Engine v0.9.10 at Thu Nov 22 15:31:33 CET 2012

Status Code: 404
Exception: Request URL /jenkins not found.brbr
Stacktrace:
Generated by Winstone Servlet Engine v0.9.10 at Thu Nov 22 15:37:01 CET 2012


Think green - keep it on the screen.

This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.



Build flow plugin: fails build if there are unstable builds

2012-11-22 Thread Egle
Hi,

I am trying to set up a following flow if builds:
build( A )
build( B )
build( C )

Now I get FATAL: null error and stack trace in console if build B is 
unstable. So the flow does not execute job C. Is there a way to configure a 
flow that it would only terminate if the performed builds are failing and 
not becoming unstable?

Thanks,
Egle


How does Jenkins know tests history

2012-11-22 Thread Yaron Naveh
When a test fails Jenkins writes something like Failing for the past 4 
build (Since #12). How does Jenkins know the test history - is it by 
string matching the class/test name to previous results? If so and the 
class name changes does it mean that all history context for its tests is 
also lost?


SCM Polling fails: Cannot run program cleartool

2012-11-22 Thread natalie_public
Hello everyone,

 Since a few days the clear case polling does not work anymore (I'm not 100% 
sure if it ever worked...).

 The scm_polling.log is as follows:
 --
 Started on Nov 22, 2012 6:45:09 PM
 *** get view CSPEC ***
 [jobname] $ cleartool catcs -tag viewtag
 FATAL: Cannot run program cleartool (in directory 
/home/username/jenkins/workspace/viewtag): error=2, A file or directory 
in the path name does not exist.
 (--- Here the file contains some special characters that my email program 
doesn't allow to send) ava.io.IOException: Cannot run program cleartool (in 
directory /home/username/jenkins/workspace/viewtag): error=2, A file or 
directory in the path name does not exist.
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:471)
 at hudson.Proc$LocalProc.init(Proc.java:244)
 at hudson.Proc$LocalProc.init(Proc.java:216)
 at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
 at hudson.Launcher$ProcStarter.start(Launcher.java:338)
 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
 at hudson.remoting.Request$2.run(Request.java:326)
 at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
 at java.util.concurrent.FutureTask.run(FutureTask.java:149)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
 at java.lang.Thread.run(Thread.java:736)
 Caused by: java.io.IOException: error=2, A file or directory in the path name 
does not exist.
 at java.lang.UNIXProcess.init(UNIXProcess.java:53)
 at java.lang.ProcessImpl.start(ProcessImpl.java:112)
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:464)
 ... 15 more
 Done. Took 48 ms
 No changes
 --

 Therfore I've upgraded from Jenkins 1.477 to 1.491, but in the new version it 
doesn't work either. I'm using Jenkins ClearCase Plug-in 1.3.11.
 The operating system of the clearcase is IBM AIX Unix.
 In .bashrc, .profile and .bash_profile the PATH variable is extended by the 
path to cleartoo (export PATH=$PATH:/usr/atria/bin).

 Triggering a manual update via Build now works fine. The problem is just the 
polling.

 Does anybody have an idea?

 Thanks a lot in advance,

 Natalie


Re: Query about running different job steps on different slaves

2012-11-22 Thread Jason Swager
I would LOVE to see a plugin like this.  If you could send me github 
information after you make it available, I would be very grateful!
Thanks,
Jason

On Wednesday, November 21, 2012 10:40:36 PM UTC-8, Ivan Kalinin wrote:

 Hi!

 Actually, I've managed to develop a plugin for my own needs that 
 implements what you want. It allows to 'connect' a group of slaves to form 
 a so-called 'compound slave' - a virtual entity, proxying Slave.doBuild() 
 (or wassitsname) to a different subslave of the group. It adds a build step 
 'run something on a sub-node' to delegate particular build step to a 
 sub-slave. The plugin even can create 'compound' slaves on-the-fly as a 
 cloud provider from real slaves provisioned in some other cloud.

 If that sounds promising to you, I can share it on github (currently is 
 privately-hosted) and you can try to tweak it up to you needs.

 Cheers,
 pupssman.

 On Wednesday, November 21, 2012 6:18:29 PM UTC+4, alok kumar wrote:

 Hi,
 Can anyone let me know if it is possible to execute different build steps 
 on different slaves from within a single job?
 Is there any plugin that supports that? If not, what can be the 
 workaround to achieve the same?

 Any help would be greatly appreciated.

 Thanks,
 Alok



Re: Jenkins + GIT ls-remote error

2012-11-22 Thread Casper
Works now, thanks to Mark pointing out the memory error.

Jenkins needs some more RAM to use external software like GIT.

Op donderdag 22 november 2012 15:50:12 UTC+1 schreef Casper het volgende:

 It returns nothing, but when I omit the HEAD at the end, it returns all 
 the head just fine:

 jenkins@damocles:/home/casper/git/4xS$ /usr/bin/git ls-remote -h 
 file:///home/casper/git/4xS/.git HEAD
 jenkins@damocles:/home/casper/git/4xS$ /usr/bin/git ls-remote -h 
 file:///home/casper/git/4xS/.git 
 87ba7166704d85a92ef0c81768ff74d189444d6e refs/heads/develop
 035a02f708b60353491e30fda31fd819f2cbec06 refs/heads/master
 jenkins@damocles:/home/casper/git/4xS$ 


 Op donderdag 22 november 2012 14:05:50 UTC+1 schreef Mark Waite het 
 volgende:

 That seems to indicate that the Jenkins user can't read the 
 /home/casper/git/4xS/.git directory.

 Since you've confirmed that the Jenkins user can run the git command, 
 could you also confirm that the Jenkins user can successfully run the 
 command:

  /usr/bin/git ls-remote -h file:///home/casper/git/4xS/.git HEAD

   --
 *From:* Casper daca...@gmail.com
 *To:* jenkins...@googlegroups.com 
 *Sent:* Thursday, November 22, 2012 1:59 AM
 *Subject:* Jenkins + GIT ls-remote error
  
 Hey everyone,

 I've been trying to install Jenkins with the GIT plugin, but somehow the 
 GIT plugin doesn't seem to work for me.

 I'm running Debian 5, with Jenkins as a service through apt-get. Jenkins 
 itself works just fine. I installed the GIT plugin through Jenkins, but it 
 does not seem to be able to use GIT properly.

 Whenever I insert a GIT repository in a Jenkins project, regardless 
 whether it's local or remote through the ssh protocol, it always gives me 
 this error:
 Failed to connect to repository : Error performing command: /usr/bin/git 
 ls-remote -h file:///home/casper/git/4xS/.git HEAD

 i have the latest version of GIT installed, and tested through sudo su 
 jenkins whether GIT was accessible as Jenkins, which it is. As you can see 
 I defined the absolute path to my GIT binary in the config as well, it 
 still won't work.

 Any suggestions?

 Thanks in advance,

 Casper


   

Copying/Cloning Jobs Maintaining the Building Order (Dependency)

2012-11-22 Thread Francisco Díaz Trepat
Hi Guys, a colleague of mine is working on automation of release and 
jenkins job reordering in general.

We have a repo.git that contains a number of projects we build in jenkins, 
we want to automate the release process by using the jenkins api and clone 
all the _develop jobs to _release jobs.

So far so good, the problem is how can we obtain the BUILD ORDER.

proj-3_develop
proj-1_develop
proj-2_develop

How can we know which one needs to build first, we were thinking parsing 
maven dependency tree but seems a hustle.

Can this be done with jenkis api?

f.


Re: Jenkins failed to record SCM polling

2012-11-22 Thread hezjing
This problem is fixed in Jenkins 1.491 (issue
JENKINS-15733https://issues.jenkins-ci.org/browse/JENKINS-15733
).

My Mercurial is polling correctly now!

Thank you!


On Fri, Nov 9, 2012 at 2:48 AM, Mark Waite markwa...@yahoo.com wrote:

 You could consider switching to the long term support release.  It arrives
 about once every three months and remains stable for those three months.

 Mark Waite

   --
 *From:* KP koen.pollent...@gmail.com
 *To:* jenkinsci-users@googlegroups.com
 *Sent:* Thursday, November 8, 2012 2:02 AM
 *Subject:* Re: Jenkins failed to record SCM polling

 Exactly the same issue, but with (old built-in 1.x) CVS plugin.
 Issue went away after revert tot 1.488.

 After the lazy loading problem made jenkins unusable, now this... It seems
 the stability of the jenkins updates is getting very bad lately. 2 bugs
 completely breaking jenkins, only in a couple of weeks :-(





-- 

Hez