Re: Building Maven project in Jenkins

2013-08-16 Thread Baptiste Mathus
Hi,
Read the message:
Unable to auto-install JDK until the license is accepted.

You have to go in the jenkins admin and check the corresponding checkbox
near JDK.

Cheers
Le 16 août 2013 02:20, inbaraj dir...@gmail.com a écrit :

 Hello,

 I created a simple Maven webapp by issuing this command.
 *mvn archetype:generate -DgroupId=web.myapp -DartifactId=myapp
 -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
 *
 and Later i try to build this in jenkins. While building I am getting the
 following error.

 Started by user anonymous
 Building in workspace F:\Jenkins\jobs\Mavenjob\workspace
 Unable to auto-install JDK until the license is accepted.
 Parsing POMs
 Unable to auto-install JDK until the license is accepted.
 Unable to auto-install JDK until the license is accepted.
 [webapp] $

 F:\Jenkins\tools\hudson.model.JDK\C_Program_Files_x86_Java_jdk1.7.0_25/bin/java
 -Xms256m -Xmx512m -cp

 F:\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-agent-1.3.jar;F:\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\F_Maven\boot\plexus-classworlds-2.4.2.jar
 org.jvnet.hudson.maven3.agent.Maven3Main
 F:\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\F_Maven
 F:\svn\tomcat\webapps\jenkins\WEB-INF\lib\remoting-2.24.jar
 F:\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-1.3.jar
 50791
 ERROR: Failed to parse POMs
 java.io.IOException: Cannot run program

 F:\Jenkins\tools\hudson.model.JDK\C_Program_Files_x86_Java_jdk1.7.0_25/bin/java
 (in directory F:\webapp): CreateProcess error=2, The system cannot find
 the file specified
 at java.lang.ProcessBuilder.start(Unknown Source)
 at hudson.Proc$LocalProc.init(Proc.java:244)
 at hudson.Proc$LocalProc.init(Proc.java:216)
 at hudson.Launcher$LocalLauncher.launch(Launcher.java:763)
 at hudson.Launcher$ProcStarter.start(Launcher.java:353)
 at

 hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:228)
 at hudson.maven.ProcessCache.get(ProcessCache.java:231)
 at

 hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:686)
 at

 hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
 at hudson.model.Run.execute(Run.java:1593)
 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:491)
 at hudson.model.ResourceController.execute(ResourceController.java:88)
 at hudson.model.Executor.run(Executor.java:242)
 Caused by: java.io.IOException: CreateProcess error=2, The system cannot
 find the file specified
 at java.lang.ProcessImpl.create(Native Method)
 at java.lang.ProcessImpl.init(Unknown Source)
 at java.lang.ProcessImpl.start(Unknown Source)
 ... 13 more
 Finished: FAILURE

 Help me out in fixing this issue.

 Thanks
 Inbaraj



 --
 View this message in context:
 http://jenkins-ci.361315.n4.nabble.com/Building-Maven-project-in-Jenkins-tp4676610.html
 Sent from the Jenkins users mailing list archive at Nabble.com.

 --
 You received this message because you are subscribed to the Google Groups
 Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to jenkinsci-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


SECURITY-47 with xpath

2013-08-16 Thread teilo
Hi all,

After a lot of head scratching[1] I found that you can no longer (by 
default) use text() in an xpath  in api/xml/xpath=blah.

The associated commit references SECURITY-47 - which I can't see but from 
the other commit would seem to be related only to jsonp[2]?

What I'm finding hard to work out is what the attack vector is for xpath 
primatives?  the content is returned as text/plain so should not be 
interpreted by any browser.  Anyone any pointers?

enabling hudson.model.Api.INSECURE=true to get xpath primatives would 
expose jsonp which is not something that I would want to do as the attack 
vector there is well understood.

Regards,

/James

[1] https://issues.jenkins-ci.org/browse/JENKINS-19221
[2] 
http://www.cloudbees.com/jenkins-advisory/jenkins-security-advisory-2013-02-16.cb

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


LTS RC Page

2013-08-16 Thread Slide
The LTS RC page [1] doesn't have any information as to the version of the
LTS RC. Can this information be easily added so its easier to determine
what version you are getting by downloading the RC?

Thanks,
slide

1 - http://jenkins-ci.org/stable-rc

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Executing on multiple slaves in a single job

2013-08-16 Thread leopard
Hello,

I could not find anyone reporting their experience on a certain use case I 
have trouble implementing in Jenkins:

We'd like to run acceptance tests on our application, which is composed of 
several sub-systems running concurrently on different servers with 
different operating systems (linux  windows).

For example, a certain test might require a deployment of 2 linux systems 
(each running a different sub-system) and a windows system.

Basically we need a way to run the following process:
* a = Acquire a slave with label 'linux-server'
* a_ip = find the ip address of slave '$a'
* Deploy sub system A on 'a'
* Do something similar with a slave that we will refer to as $b with 
sub-system B
* Do something similar with a slave  with label 'windows-server' that we 
will refer to as $c with sub-system C
* Run the acceptance tests on a system that is deployed on servers: $a_ip, 
$b_ip, $c_ip

Currently we run the automatic acceptance tests on pre-deployed servers but 
this approach does not scale well.

Some notes
* We prefer a solution that uses jenkins slaves (vs computers that are 
managed in other ways, like a cloud provider), because we re-use the 
jenkins slaves for running other types of activities (build, integration 
tests)
* We have no way to run all of the sub-systems on the same server (for 
example, to test the failover feature of our application, we may want to 
tests that if a server running a critical sub-system crashes, then another 
server automatically runs the critical service)

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: assigning new values to existing build parameters in build-flow job

2013-08-16 Thread rginga
I have learned some things and I think I am REALLY CLOSE to my goal but I 
have hit a wall. Let me be specific:

I have a CORE build job that will be invoked via Build-Flow from other jobs 
asynchronously, passing different parameters. I want to Archive the CORE 
build result into the calling job. In my calling job I have created a build 
parameter of type Build Selector for Copy Artifact with a dummy build 
number (61). I have found that parameter in 
build.properties.buildVariables. I want to SET that property to something 
else and use it in the post-build Copy Artifacts from another project.For 
example:

b = build (Core-build-job)

build.properties.buildVariables = b.build.number (correctly formatted)

my DSL does this trying to change the build number to 63

out.println Build variables are:  + build.properties.buildVariables

build.properties.buildVariables = 
[CORE_BUILD_NUMBER1:SpecificBuildSelector plugin=\copyartifact@1.27\ 
 buildNumber*63*/buildNumber/SpecificBuildSelector]

out.println Build variables are:  + build.properties.buildVariables

the output is this:

Build variables are: [CORE_BUILD_NUMBER1:SpecificBuildSelector 
plugin=copyartifact@1.27  
buildNumber*61*/buildNumber/SpecificBuildSelector]
Build variables are: [CORE_BUILD_NUMBER1:SpecificBuildSelector 
plugin=copyartifact@1.27  
buildNumber*61*/buildNumber/SpecificBuildSelector]


WHY CAN'T I CHANGE THAT PROPERTY?


On Wednesday, August 14, 2013 3:45:54 PM UTC-4, rginga wrote:

 I have created a parameterized build-flow job. In the DSL portion, I can 
 access the parameter value that I setup: REAL_BUILD_NUMBER as 
 params[REAL_BUILD_NUMBER]. I call my downstream build as b = build(...). 
 I now want to set REAL_BUILD_NUMBER equal to b.build.number for use in a 
 post-build step. I cannot figure out the syntax here. 
 params[REAL_BUILD_NUMBER] = b.build.number is syntactically correct but 
 does not change the value. params[REAL_BUILD_NUMBER] = a dummy string 
 also does not change the value


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Build Flow - dynamic parameter question

2013-08-16 Thread Bob Bick
Hi,

A build flow job invokes job X that has a dynamic parameter Y. The build flow 
job also has the dynamic parameter Y that it passes to job X. Ideally, 
parameter Y from the build flow job should override the calculated dynamic 
parameter value for job X. Unfortunately, when the build flow job invokes job 
X, job X recalculates parameter Y.

Q. Is there a way to have job X use parameter Y? That is, I'd like the dynamic 
parameter script to check whether the value has already been set, and if so, 
then use that value.

Right now, to get this behavior to work, I am planning to create two parameters 
(Y and Y_OVERRIDE) for job X ... and then use Y_OVERRIDE. Any other ideas as to 
a better way to do this? This seems like an awful hack.

Dynamic parameter plugin doc:
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Dynamic+Parameter+Plug-in

Thanks,
Bob

*** *** ***
This message contains information which may be confidential and privileged. 
Unless you are the addressee (or authorized to receive for the addressee), you 
may not use, copy or disclose to anyone the message or any information 
contained in the message. If you have received the message in error,  please 
advise the sender by reply e-mail and delete the message.

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Build Flow - dynamic parameter question

2013-08-16 Thread nicolas de loof
you can't. By nature, dynamic parameters are computer by the job to use
them, can't be force to a fixed value by the invoker.


2013/8/16 Bob Bick bb...@netjets.com

  Hi,

 ** **

 A build flow job invokes job X that has a dynamic parameter Y. The build
 flow job also has the dynamic parameter Y that it passes to job X. Ideally,
 parameter Y from the build flow job should override the calculated dynamic
 parameter value for job X. Unfortunately, when the build flow job invokes
 job X, job X recalculates parameter Y.

 ** **

 Q. Is there a way to have job X use parameter Y? That is, I’d like the
 dynamic parameter script to check whether the value has already been set,
 and if so, then use that value.

 ** **

 Right now, to get this behavior to work, I am planning to create two
 parameters (Y and Y_OVERRIDE) for job X … and then use Y_OVERRIDE. Any
 other ideas as to a better way to do this? This seems like an awful hack.*
 ***

 ** **

 Dynamic parameter plugin doc:


 https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Dynamic+Parameter+Plug-in
 

 ** **

 Thanks,

 Bob


 *** *** ***
 This message contains information which may be confidential and
 privileged. Unless you are the addressee (or authorized to receive for the
 addressee), you may not use, copy or disclose to anyone the message or any
 information contained in the message. If you have received the message in
 error,  please advise the sender by reply e-mail and delete the message.

 --
 You received this message because you are subscribed to the Google Groups
 Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to jenkinsci-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Build Flow - dynamic parameter question

2013-08-16 Thread Bob Bick
Thanks Nicolas.

I didn't think there was a way to do it, but thought maybe there was a better 
(more creative) solution than what I came up with. People are going to look at 
job X and wonder why there are two parameters (Y and Y_OVERRIDE). It would be 
really nice if Jenkins had the concept of hidden parameters :)

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of nicolas de loof
Sent: Friday, August 16, 2013 11:33 AM
To: jenkinsci-users@googlegroups.com
Subject: Re: Build Flow - dynamic parameter question

you can't. By nature, dynamic parameters are computer by the job to use them, 
can't be force to a fixed value by the invoker.

2013/8/16 Bob Bick bb...@netjets.commailto:bb...@netjets.com
Hi,

A build flow job invokes job X that has a dynamic parameter Y. The build flow 
job also has the dynamic parameter Y that it passes to job X. Ideally, 
parameter Y from the build flow job should override the calculated dynamic 
parameter value for job X. Unfortunately, when the build flow job invokes job 
X, job X recalculates parameter Y.

Q. Is there a way to have job X use parameter Y? That is, I'd like the dynamic 
parameter script to check whether the value has already been set, and if so, 
then use that value.

Right now, to get this behavior to work, I am planning to create two parameters 
(Y and Y_OVERRIDE) for job X ... and then use Y_OVERRIDE. Any other ideas as to 
a better way to do this? This seems like an awful hack.

Dynamic parameter plugin doc:
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Dynamic+Parameter+Plug-in

Thanks,
Bob

*** *** ***
This message contains information which may be confidential and privileged. 
Unless you are the addressee (or authorized to receive for the addressee), you 
may not use, copy or disclose to anyone the message or any information 
contained in the message. If you have received the message in error,  please 
advise the sender by reply e-mail and delete the message.
--
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.commailto:jenkinsci-users%2bunsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.commailto:jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

*** *** ***
This message contains information which may be confidential and privileged. 
Unless you are the addressee (or authorized to receive for the addressee), you 
may not use, copy or disclose to anyone the message or any information 
contained in the message. If you have received the message in error,  please 
advise the sender by reply e-mail and delete the message.

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Executing on multiple slaves in a single job

2013-08-16 Thread Owen B. Mehegan
This sounds like an ideal use case for matrix/multi-configuration jobs. 
Just create a matrix job, use the slave labels as your configuration axes 
(check all the slaves you want this to run on), and follow your nose.

Since I suspect you will need to perform slightly different actions for the 
Windows and Linux slaves, I would probably use the Conditional Build Step 
plugin to determine (through evaluation of the build environment variables 
- e.g. NODE_LABELS) what type of slave the build was happening on, and then 
run either a shell script or Windows batch script to do the rest of your 
work. I'm making some assumptions about the specifics of your build process 
here, but it seems like this would be pretty straightforward.

There don't seem to be that many people using matrix jobs in the Jenkins 
community, for some reason, so I've always found myself having to 
experiment a bit to get them to work. Occasionally you find plugins that 
don't work in that type of job for whatever reason, and there are other 
gotchas. But we use them heavily and to good effect. Let me know if you 
have further questions.

On Friday, August 16, 2013 6:52:02 AM UTC-7, leopard wrote:

 Hello,

 I could not find anyone reporting their experience on a certain use case I 
 have trouble implementing in Jenkins:

 We'd like to run acceptance tests on our application, which is composed of 
 several sub-systems running concurrently on different servers with 
 different operating systems (linux  windows).

 For example, a certain test might require a deployment of 2 linux systems 
 (each running a different sub-system) and a windows system.

 Basically we need a way to run the following process:
 * a = Acquire a slave with label 'linux-server'
 * a_ip = find the ip address of slave '$a'
 * Deploy sub system A on 'a'
 * Do something similar with a slave that we will refer to as $b with 
 sub-system B
 * Do something similar with a slave  with label 'windows-server' that we 
 will refer to as $c with sub-system C
 * Run the acceptance tests on a system that is deployed on servers: 
 $a_ip, $b_ip, $c_ip

 Currently we run the automatic acceptance tests on pre-deployed servers 
 but this approach does not scale well.

 Some notes
 * We prefer a solution that uses jenkins slaves (vs computers that are 
 managed in other ways, like a cloud provider), because we re-use the 
 jenkins slaves for running other types of activities (build, integration 
 tests)
 * We have no way to run all of the sub-systems on the same server (for 
 example, to test the failover feature of our application, we may want to 
 tests that if a server running a critical sub-system crashes, then another 
 server automatically runs the critical service)

 Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: New to Jenkins - need some help

2013-08-16 Thread Scott Tatum
Hey, I just have to say, your teacher gives great assignments! :-D

-Scott
On Aug 16, 2013 5:41 PM, boy8b...@gmail.com wrote:

 First of all I'm a student and very noobish with linux and jenkins. I'm
 also tired of searching the web (it makes me crazy sometimes :) )

 I need to do the following on a linux virtual machine (Cent OS 6.4 Minimal)

 We expect the following components installed:
 • Java compiler (OpenJDK 1.7.0) (done)
 • Version Management (Git or Mercurial) that can be used remotely (done
 using Mercurial)
 • Maven to compile (done)
 • Jenkins to manage automated tests (done)


- At given intervals (eg daily at midnight) the latest revision in the 
 version
control system (tip, HEAD, ...) will be compiled with Maven. In
addition, Java Docs will be created and packages (jar, war, ...). Then
Jenkins will do all tests and conduct reports.

 Which Job will I need to choose (Free-Style/Maven2/3,...)? I would go for
 a maven2/3 project but I'm not sure what the differences are...

 Will Jenkins see automatically what the latest revision is in Mercurial
 (my chosen version control system)?

 Which plugin will I need to execute the tests and report them? I think mvn
 test command is to execute the tests but where can I conduct reports?

- Make sure there is a report of previous builds.

 Is this my second job? Do i run this after job 1?

 What are the reports of the previous builds? How can Jenkins give them to
 me?

- Ensure that the Java Docs and packages can be downloaded (jars, wars,
...) of the latest build easy

 Will Mercurial Hgweb give me the choice to publish the javadoc somehow or
 will I need to make an own server where I manually publish the javadocs and
 packages? Or can Jenkins somehow make my life easier?

  --
 You received this message because you are subscribed to the Google Groups
 Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to jenkinsci-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.