Re: customtools not working

2015-08-21 Thread moodysma sma
I tried removing the exported paths, but there is no download or extraction 
of the zip:

This is my batch build cmd:

rem echo %PATH%
echo %PsTools_HOME%
%PsTools_HOME%\PsExec.exe

Output:

Started by user anonymous
[CustomTools] - PsTools: Starting installation
[CustomTools] - PsTools: Tool is installed at C:\Users\user\.jenkins
[CustomTools] - PsTools: Setting PsTools_HOME=C:\Users\user\.jenkins
Building in workspace C:\Users\user\.jenkins\jobs\hello_world4\workspace
[workspace] $ cmd /c call C:\WINDOWS\TEMP\hudson2592194391930325096.bat

C:\Users\user\.jenkins\jobs\hello_world4\workspace>rem echo 
C:\Users\user\.jenkins;;C:\ProgramData\Oracle\Java\javapath;C:\Program 
Files\Microsoft HPC Pack 2008 R2\Bin\;C:\Program Files\NVIDIA GPU Computing 
Toolkit\CUDA\v4.0\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
 
Files\MATLAB\MATLAB Production Server\R2015a\runtime\win64;C:\Program 
Files\MATLAB\MATLAB Production Server\R2015a\bin;C:\Program 
Files\MATLAB\R2014a\runtime\win64;C:\Program 
Files\MATLAB\R2014a\bin;C:\Program 
Files\MATLAB\R2013b\runtime\win64;C:\Program 
Files\MATLAB\R2013b\bin;C:\Python27;C:\Program 
Files\Java\jdk1.7.0\bin;C:\Program Files (x86)\NTP\bin;D:\Program 
Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows 
Kits\8.1\Windows Performance Toolkit\;D:\Program Files\Microsoft SQL 
Server\120\DTS\Binn\;D:\Program Files\Microsoft SQL Server\Client 
SDK\ODBC\110\Tools\Binn\;D:\Program Files (x86)\Microsoft SQL 
Server\120\Tools\Binn\;D:\Program Files\Microsoft SQL 
Server\120\Tools\Binn\;D:\Program Files (x86)\Microsoft SQL 
Server\120\Tools\Binn\ManagementStudio\;D:\Program Files (x86)\Microsoft 
SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft\Web Platform 
Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web 
Pages\v1.0\;C:\Program Files (x86)\Microsoft SDKs\Windows 
Azure\CLI\wbin;C:\Program Files\MATLAB\R2014a\polyspace\bin;C:\Program 
Files (x86)\Microsoft SDKs\TypeScript\1.1\;C:\Program Files 
(x86)\nodejs\;C:\Program Files\TortoiseGit\bin;C:\Program Files 
(x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\NVIDIA 
Corporation\PhysX\Common;C:\Program Files\MATLAB\MATLAB Production 
Server\R2015a\polyspace\bin;C:\Program Files 
(x86)\QuickTime\QTSystem\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;;C:\ProgramData\Oracle\Java\javapath;C:\Program
 
Files\Microsoft HPC Pack 2008 R2\Bin\;C:\Program Files\NVIDIA GPU Computing 
Toolkit\CUDA\v4.0\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
 
Files\MATLAB\MATLAB Production Server\R2015a\runtime\win64;C:\Program 
Files\MATLAB\MATLAB Production Server\R2015a\bin;C:\Program 
Files\MATLAB\R2014a\runtime\win64;C:\Program 
Files\MATLAB\R2014a\bin;C:\Program 
Files\MATLAB\R2013b\runtime\win64;C:\Program 
Files\MATLAB\R2013b\bin;C:\Python27;C:\Program 
Files\Java\jdk1.7.0\bin;C:\Program Files (x86)\NTP\bin;D:\Program 
Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows 
Kits\8.1\Windows Performance Toolkit\;D:\Program Files\Microsoft SQL 
Server\120\DTS\Binn\;D:\Program Files\Microsoft SQL Server\Client 
SDK\ODBC\110\Tools\Binn\;D:\Program Files (x86)\Microsoft SQL 
Server\120\Tools\Binn\;D:\Program Files\Microsoft SQL 
Server\120\Tools\Binn\;D:\Program Files (x86)\Microsoft SQL 
Server\120\Tools\Binn\ManagementStudio\;D:\Program Files (x86)\Microsoft 
SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft\Web Platform 
Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web 
Pages\v1.0\;C:\Program Files (x86)\Microsoft SDKs\Windows 
Azure\CLI\wbin;C:\Program Files\MATLAB\R2014a\polyspace\bin;C:\Program 
Files (x86)\Microsoft SDKs\TypeScript\1.1\;C:\Program Files 
(x86)\nodejs\;C:\Program Files\TortoiseGit\bin;C:\Program Files 
(x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\NVIDIA 
Corporation\PhysX\Common;C:\Program Files\MATLAB\MATLAB Production 
Server\R2015a\polyspace\bin;C:\Program Files 
(x86)\QuickTime\QTSystem\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
 

C:\Users\user\.jenkins\jobs\hello_world4\workspace>echo 
C:\Users\user\.jenkins 
C:\Users\user\.jenkins

C:\Users\user\.jenkins\jobs\hello_world4\workspace>C:\Users\user\.jenkins\PsExec.exe
'C:\Users\user\.jenkins\PsExec.exe' is not recognized as an internal or 
external command,
operable program or batch file.

C:\Users\user\.jenkins\jobs\hello_world4\workspace>exit 9009 
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

On Friday, August 21, 2015 at 8:16:06 PM UTC-4, moodysma sma wrote:
>
> I'm trying to understand how this plugin works.  I've create a global tool 
> called "Pstools", exported Path is "Pstools".  Install automatically is set 
> to "http://download.sysinternals.com/files/PSTools.zip"; an

customtools not working

2015-08-21 Thread moodysma sma
I'm trying to understand how this plugin works.  I've create a global tool 
called "Pstools", exported Path is "Pstools".  Install automatically is set 
to "http://download.sysinternals.com/files/PSTools.zip"; and the label is 
"PsTools", when I create a job I get the following error message, I don't 
see it doing any extraction or download from the url.


Started by user anonymous 
[CustomTools] - PsTools: Starting installation
ERROR: Wrong EXPORTED_PATHS configuration. Can't find \PsToolsFinished 
: FAILURE

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/db4bc3a1-ef26-4e3c-b073-cf0a0e1d2cd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Remote Build Using Curl

2015-08-21 Thread Richard Bywater
Or given that assuming you really want to use curl, presumably you could
reference the code base of those projects to try and see how to do it :)

Richard.

On Sat, 22 Aug 2015 6:33 am Khai Do  wrote:

> If you don't mind using Python, both the python-jenkins and jenkinsapi
> packages can do this for you pretty easily.  Both are wrappers around the
> Jenkins REST api so basically exactly what you are trying to do with curl.
>
>
> On Thursday, August 20, 2015 at 9:28:57 AM UTC-7, Greg Nifor wrote:
>>
>> Caused by: java.lang.NullPointerException
>> at
>> hudson.model.FileParameterValue.(FileParameterValue.java:78)
>>
>>
>> On Thursday, August 20, 2015 at 9:23:53 AM UTC-7, Greg Nifor wrote:
>>>
>>> Update: Still doesn't work
>>>
>>> json='{"parameter": [{"name": "text", "value": "AA"}, {"name": "file",
>>> "value": "file0"}]}'
>>> url=
>>> curl $url -F file0=@ -F json="$json" -u :
>>>
>>>
>>> On Monday, August 17, 2015 at 2:42:58 PM UTC-7, Daniel Beck wrote:

 How to trigger a build with parameters is explained on the
 /job/JOBNAME/api URL in Jenkins -- the wiki page on the topic is a bit
 weird.

 On 17.08.2015, at 22:39, Walter Kelt  wrote:

 > Just looked at the Jenkins remote access api. Looks like file and
 parameters need to be passed into curl in a json format. Not sure what
 Jenkins version you are using, but you may want to check it out.
 >
 > If you are doing a parametrized build it looks to be a little more
 complicated and I don't see an example using -F
 >
 > Sent from my iPad
 >
 > On Aug 17, 2015, at 4:11 PM, Greg Nifor 
 wrote:
 >
 >> The job I'm triggering has two parameters, git and root. The curl
 sets those and I'm able to use those in my execute shell step.
 >>
 >> On Monday, August 17, 2015 at 12:57:38 PM UTC-7, walter.kelt wrote:
 >> Hmmm..when issuing a multipart form submission,  i wouldn't expect
 the multipart parameters to become Linux shell variables unless the code
 receiving the http request took the parameters and made them so. Does your
 http endpoint do so ? Seems I am missing something.
 >>
 >> Sent from my iPad
 >>
 >> On Aug 17, 2015, at 3:45 PM, Greg Nifor 
 wrote:
 >>
 >>> Linux, there's no errors. The command goes through, but Jenkins
 doesn't pick up on the variables when I echo them out this is the output:
 >>>
 >>> 12:31:06
 >>> + echo
 >>>
 >>> 12:31:06
 >>> 12:31:06
 >>> + echo root
 >>>
 >>> 12:31:06 root
 >>>
 >>> Top one echos git and the second one echoes root (it's default
 value is root)
 >>> echo $git
 >>> echo $root
 >>>
 >>> On Monday, August 17, 2015 at 12:32:48 PM UTC-7, walter.kelt wrote:
 >>> What was the error message ?  paste the most current command. Also,
 windows or Linux ?
 >>>
 >>> Sent from my iPad
 >>>
 >>> On Aug 17, 2015, at 3:27 PM, Greg Nifor 
 wrote:
 >>>
  That didn't work.
 
  On Monday, August 17, 2015 at 12:19:24 PM UTC-7, walter.kelt
 wrote:
  I think you need quote signs around each of the  -F itemssuch
 as -F "git=test"
 
  Sent from my iPad
 
  On Aug 17, 2015, at 3:15 PM, Greg Nifor 
 wrote:
 
 > curl -X POST localhost/job/Test/buildWithParameters -u user:pass
 -F git=test -F root=root1
 >
 >
 >
 >
 > On Monday, August 17, 2015 at 12:11:08 PM UTC-7, walter.kelt
 wrote:
 > Please paste your full curl command
 >
 > Sent from my iPad
 >
 > On Aug 17, 2015, at 3:06 PM, Greg Nifor 
 wrote:
 >
 >> When I try that the variables are empty.
 >>
 >> On Monday, August 17, 2015 at 11:49:09 AM UTC-7, walter.kelt
 wrote:
 >> You need to use -F for file and -F for data.
 >>
 >> Sent from my iPad
 >>
 >> On Aug 17, 2015, at 2:41 PM, Greg Nifor 
 wrote:
 >>
 >>> Is there a way to use curl to send both a file and string
 parameter. I can do each individually, but not together.
 >>>
 >>> Works:
 >>>
 >>> curl -X POST /job//buildWithParameters -u
 : -F file=@/path/to
 >>>
 >>> curl -X POST /job//buildWithParameters -u
 : --data string0=foo --data string1=bar
 >>>
 >>> Doesn't Work:
 >>>
 >>> curl -X POST /job//buildWithParameters -u
 : -F file=@/path/to --data string0=foo --data string1=bar
 >>>
 >>> The result I get is: Warning: You can only select one HTTP
 request!
 >>>
 >>>
 >>> Any ideas?
 >>>
 >>>
 >>> --
 >>> You received this message because you are subscribed to the
 Google Groups "Jenkins Users" group.
 >>> To unsubscribe from this group a

How to keep strict odering of pipeline jobs / per node?

2015-08-21 Thread Steve K
Hello,

I am chaining jobs together to implement automated tests.  Two of the jobs 
require rebooting the slave.
To illustrate what I'm talking about, I have these jobs:

J1 does some setup and reboots
J2 runs some tests
J3 does some cleanup and reboots

J2 has a configured quiet period to allow the slave to come back on-line 
following J1's reboot
J1 has a configured quiet period, because we can't start the pipeline again 
until the slave is back on-line following J3's reboot.

I've throttled the three jobs so that only one of them at a time can be 
building on a given slave.
They are also configured such that J2 must run on the same slave that J1 
was run on and J3 must run on the same slave as J2.

My first problem is that, often times, an instance of J1 gets queued up 
(due to source code change) before a running instance of J1 has completed.
So, the queued J1 runs before J2.  That's not good!
Is there a way to tell Jenkins "If any of the jobs in the pipeline are 
already running or queued, don't queue another job on that slave"?

To make things even more interesting/challenging, if another slave becomes 
available, it is OK to start a new pipeline on a different slave.

So, for any given slave, J1 must be followed by J2 and J2 must be followed 
by J3.

Thanks in advance for your ideas.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1db2bad7-e210-4c4a-85c8-9638c073de5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Moving a job to a Folder

2015-08-21 Thread Khai Do
We are working to add cloudbees folder support to the python-jenkins 
package (https://python-jenkins.readthedocs.org/en/latest/)  that will 
allow you to automate management (create/update/move/etc..) of folders.   
The change is under review right now 
(https://review.openstack.org/#/c/180185/) and is very close to being 
approved.  Hopefully it will get in sometime next week.  python-jenkins is 
open sourced, so use as you wish, would just love more contributions to 
make it better :)



On Thursday, August 20, 2015 at 12:12:40 PM UTC-7, Daniel Serodio wrote:
>
> We use this Groovy script to move jobs to folders, maybe you can use it as 
> a starting point for your needs:
>
> ###
> def FOLDER_NAME = 'Destination folder'
> def JOB_REGEX = 'Regex to match your jobs'
>
> import jenkins.*
> import jenkins.model.*
> import hudson.*
> import hudson.model.*
>
> jenkins = Jenkins.instance
>
> def folder = jenkins.getItemByFullName(FOLDER_NAME)
> if (folder == null) {
>   println "ERROR: Folder '$FOLDER_NAME' not found"
>   return
> }
>
> jenkins.items.grep { it.name =~ "${JOB_REGEX}" }.each { job ->
>   println "Moving '$job.name' to '$folder.name'"
>   Items.move(job, folder)
> }
> ###
>
> Regards,
> Daniel Serodio
>
>
> On Saturday, August 15, 2015 at 3:19:24 AM UTC-3, Stephen Connolly wrote:
>>
>> What I said:
>>
>> 1. You can use a groovy script right now. Will do exactly what you need. 
>> Some research required.
>>
>> 2. Oh look some synchronicity, I happen to have just been working on some 
>> stuff that would do this for a bigger set of problems... Sadly the stuff I 
>> was working on is for our paid product
>>
>> 3. The OSS should have a CLI command too... I think it does, but if I am 
>> wrong, adding a CLI command for the OSS plugin is something on our backlog, 
>> so we will get to it.
>>
>> I mentioned #2 not as a plug but more as a "oh, if you did happen to also 
>> be one of our customers"... Apologies if it read differently.
>>
>> -Stephen
>>
>> On Saturday, August 15, 2015, Vanetta Floyd  wrote:
>>
>>> Thanks...not interested in commercials for that product.  I'm interested 
>>> in what the open source community has to say.  
>>>
>>> Will all people asking questions going forward be spammed with plugs for 
>>> that product?
>>> On Aug 14, 2015 10:48 AM, "VFloyd"  wrote:
>>>
 Any ideas on how to move more than one job at a time into a folder?



 On Thursday, August 6, 2015 at 1:45:47 PM UTC-7, Daniel Laird wrote:
>
> All,
>
> I amusing the cloudbees plugin that creates folders.
> I am now trying to move some jobs that are currently in a 'view' into 
> a folder.
> I can easily query and list all the jobs in a view in groovy but I am 
> struggling to move the job into a folder.
> I have tried various methods - if anyone has some example of doing 
> this it would be greatly appreciated.
>
> Dan
>
 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "Jenkins Users" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/jenkinsci-users/doYddgacqTQ/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 jenkinsci-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/jenkinsci-users/e4cd1d42-0fba-4faf-a023-caab8b466a52%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>>> 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.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/CAL40ccPVuPWnNeaRostT0uggh6PaOmwE3KUzTPN2mbdqvtX%2BvQ%40mail.gmail.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>> Sent from my phone
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d6e69465-dbe7-4ec5-ad85-bdae3e2f28b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Remote Build Using Curl

2015-08-21 Thread Khai Do
If you don't mind using Python, both the python-jenkins and jenkinsapi 
packages can do this for you pretty easily.  Both are wrappers around the 
Jenkins REST api so basically exactly what you are trying to do with curl.


On Thursday, August 20, 2015 at 9:28:57 AM UTC-7, Greg Nifor wrote:
>
> Caused by: java.lang.NullPointerException
> at 
> hudson.model.FileParameterValue.(FileParameterValue.java:78)
>
>
> On Thursday, August 20, 2015 at 9:23:53 AM UTC-7, Greg Nifor wrote:
>>
>> Update: Still doesn't work
>>
>> json='{"parameter": [{"name": "text", "value": "AA"}, {"name": "file", 
>> "value": "file0"}]}'
>> url=
>> curl $url -F file0=@ -F json="$json" -u :
>>
>>
>> On Monday, August 17, 2015 at 2:42:58 PM UTC-7, Daniel Beck wrote:
>>>
>>> How to trigger a build with parameters is explained on the 
>>> /job/JOBNAME/api URL in Jenkins -- the wiki page on the topic is a bit 
>>> weird. 
>>>
>>> On 17.08.2015, at 22:39, Walter Kelt  wrote: 
>>>
>>> > Just looked at the Jenkins remote access api. Looks like file and 
>>> parameters need to be passed into curl in a json format. Not sure what 
>>> Jenkins version you are using, but you may want to check it out. 
>>> > 
>>> > If you are doing a parametrized build it looks to be a little more 
>>> complicated and I don't see an example using -F 
>>> > 
>>> > Sent from my iPad 
>>> > 
>>> > On Aug 17, 2015, at 4:11 PM, Greg Nifor  wrote: 
>>> > 
>>> >> The job I'm triggering has two parameters, git and root. The curl 
>>> sets those and I'm able to use those in my execute shell step. 
>>> >> 
>>> >> On Monday, August 17, 2015 at 12:57:38 PM UTC-7, walter.kelt wrote: 
>>> >> Hmmm..when issuing a multipart form submission,  i wouldn't expect 
>>> the multipart parameters to become Linux shell variables unless the code 
>>> receiving the http request took the parameters and made them so. Does your 
>>> http endpoint do so ? Seems I am missing something. 
>>> >> 
>>> >> Sent from my iPad 
>>> >> 
>>> >> On Aug 17, 2015, at 3:45 PM, Greg Nifor  
>>> wrote: 
>>> >> 
>>> >>> Linux, there's no errors. The command goes through, but Jenkins 
>>> doesn't pick up on the variables when I echo them out this is the output: 
>>> >>> 
>>> >>> 12:31:06 
>>> >>> + echo 
>>> >>> 
>>> >>> 12:31:06 
>>> >>> 12:31:06 
>>> >>> + echo root 
>>> >>> 
>>> >>> 12:31:06 root 
>>> >>> 
>>> >>> Top one echos git and the second one echoes root (it's default value 
>>> is root) 
>>> >>> echo $git 
>>> >>> echo $root 
>>> >>> 
>>> >>> On Monday, August 17, 2015 at 12:32:48 PM UTC-7, walter.kelt wrote: 
>>> >>> What was the error message ?  paste the most current command. Also, 
>>> windows or Linux ? 
>>> >>> 
>>> >>> Sent from my iPad 
>>> >>> 
>>> >>> On Aug 17, 2015, at 3:27 PM, Greg Nifor  
>>> wrote: 
>>> >>> 
>>>  That didn't work. 
>>>  
>>>  On Monday, August 17, 2015 at 12:19:24 PM UTC-7, walter.kelt wrote: 
>>>  I think you need quote signs around each of the  -F itemssuch 
>>> as -F "git=test" 
>>>  
>>>  Sent from my iPad 
>>>  
>>>  On Aug 17, 2015, at 3:15 PM, Greg Nifor  
>>> wrote: 
>>>  
>>> > curl -X POST localhost/job/Test/buildWithParameters -u user:pass 
>>> -F git=test -F root=root1 
>>> > 
>>> > 
>>> > 
>>> > 
>>> > On Monday, August 17, 2015 at 12:11:08 PM UTC-7, walter.kelt 
>>> wrote: 
>>> > Please paste your full curl command 
>>> > 
>>> > Sent from my iPad 
>>> > 
>>> > On Aug 17, 2015, at 3:06 PM, Greg Nifor  
>>> wrote: 
>>> > 
>>> >> When I try that the variables are empty. 
>>> >> 
>>> >> On Monday, August 17, 2015 at 11:49:09 AM UTC-7, walter.kelt 
>>> wrote: 
>>> >> You need to use -F for file and -F for data. 
>>> >> 
>>> >> Sent from my iPad 
>>> >> 
>>> >> On Aug 17, 2015, at 2:41 PM, Greg Nifor  
>>> wrote: 
>>> >> 
>>> >>> Is there a way to use curl to send both a file and string 
>>> parameter. I can do each individually, but not together. 
>>> >>> 
>>> >>> Works: 
>>> >>> 
>>> >>> curl -X POST /job//buildWithParameters -u 
>>> : -F file=@/path/to 
>>> >>> 
>>> >>> curl -X POST /job//buildWithParameters -u 
>>> : --data string0=foo --data string1=bar 
>>> >>> 
>>> >>> Doesn't Work: 
>>> >>> 
>>> >>> curl -X POST /job//buildWithParameters -u 
>>> : -F file=@/path/to --data string0=foo --data string1=bar 
>>> >>> 
>>> >>> The result I get is: Warning: You can only select one HTTP 
>>> request! 
>>> >>> 
>>> >>> 
>>> >>> Any ideas? 
>>> >>> 
>>> >>> 
>>> >>> -- 
>>> >>> 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-use...@googlegroups.com. 
>>> >>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/65067202-61bf-40b8-8509-376d5ae79589%40

Jenkins UI hanging, 5GB of de.esailors.jenkins.teststability.StabilityTestData$Result in memory

2015-08-21 Thread Matt Stave
We updated to 1.6.24 last Saturday, since then, we're running into problems 
where the Web interface gets suddenly slow, then eventually stops 
responding, though jobs are still processing.

I installed the javamelody plugin after the 2nd time, it show a sudden 
spike in memory from ~ 2GB to near the Heap max on the master.

In the memory histogram view it shows 
de.esailors.jenkins.teststability.StabilityTestData$Result taking 5GB (74%) 
of the heap, with 216M "instances".   java.lang.object[] is taking 1.2GB, 
325K instances.

It also shows outstanding requests for 
$stapler/bound/a3eefa4e-d1b7-4112-a60d-f58bd64f4bb1/rerunBuild 
ajax POST 

 
/ Handling POST /$stapler/bound/f3fef2df-4d0f-4207-af7d-d296c4659d28/rerunBuild 
from 
[x.x.x.x]: RequestHandlerThread[#10]
that have been running for a very long time.  It correlates with someone 
clicking on the re-run button in a build pipeline view.

There's nothing obvious in the logs around the time of each incident, but 
each does have something like

WARNING: Failed to load [*path to jenkins home/somejob]*
/builds/576/junitResult.xml
java.io.FileNotFoundException: [*path to jenkins 
home/somejob]*builds/576/junitResult.xml 
(No such file or directory)

If I look in the filesystem, that file is there.

There are also some of these, that I thought might be due to problems in 
getPreviousResult() brought on by having kill the server and restart it 
while jobs are in flight, while the UI is hung.

Aug 20, 2015 1:48:21 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Error while serving http://[*server name]*/view/[*view 
name]*/job/[*job 
name]*/jacoco/graph
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ big stack trace that ends with ]
Caused by: java.lang.NullPointerException
at 
hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:199)
at 
hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:107)
at 
hudson.plugins.jacoco.JacocoBuildAction.getPreviousResult(JacocoBuildAction.java:249)
at 
hudson.plugins.jacoco.JacocoBuildAction.getPreviousResult(JacocoBuildAction.java:240)
at 
hudson.plugins.jacoco.JacocoBuildAction.getPreviousResult(JacocoBuildAction.java:36)
at 
hudson.plugins.jacoco.model.CoverageObject$1.createDataSet(CoverageObject.java:379)
at 
hudson.plugins.jacoco.model.CoverageObject$GraphImpl.createGraph(CoverageObject.java:418)
at hudson.util.Graph.render(Graph.java:87)
at hudson.util.Graph.doPng(Graph.java:98)
at 
hudson.plugins.jacoco.model.CoverageObject.doGraph(CoverageObject.java:373)
at 
hudson.plugins.jacoco.JacocoProjectAction.doGraph(JacocoProjectAction.java:53)

and similarly 
Aug 21, 2015 10:30:03 AM hudson.ExpressionFactory2$JexlExpression evaluate
...
Caused by: java.lang.IllegalStateException: 
hudson.tasks.junit.TestResultAction@1b176aa2 was attached to both [jobname] 
#574 and [jobname] #576
at 
hudson.tasks.test.AbstractTestResultAction.getPreviousResult(AbstractTestResultAction.java:229)
WARNING: Caught exception evaluating: it.failureDiffString in /view/[*view 
name]*/job/[*job name]*. Reason: java.lang.reflect.InvocationTargetException
We upgraded to 1.625 and increased the heap, still hitting this. 

We have 224 jobs, 50 workers
Ideas welcome.  
I can try disabling the job stability plugin, but it's very useful.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5ac6c0c6-355a-4f7a-ad21-e6e9417da8c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Cucumber ]Cucumber Test

2015-08-21 Thread Kirshan Luhana
Hi

I am new to Jenkins, want to run Cucumber Test for my Android project. 

I already installed 
Cucumber Plugin 
Cucumber json test reporting. 

Cucumber Reports Plugin 
cucumber-perf 



I am confuse what should I give in build step > Run Cucumber Test > 
Cucumber directory ?
if leaving empty I am getting error.

Regards

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/eddb29cb-9e82-4c4f-8408-b4b84fff7a61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins, Web application server and Nexus

2015-08-21 Thread James Green
The only point I'd make is you don't really want Jenkins to "know" about
your servers individually to deploy to them. Perhaps for staging purposes,
but given the elasticity in the world of production machines you probably
want to "pull" using a script on your production instances from your repo
manager like Nexus. Puppet can do this. Another option is to container(ise)
your builds and then use orchestration onwards.

The key is that Jenkins probably doesn't know about production boxes. There
might be many, and they may well fluctuate.


On 21 August 2015 at 06:45, Jeff  wrote:

> You can do a lot with Jenkins so you dont need GoCD.  We are using GoCD
> because I think it does  better job at visualizing and managing deployment
> pipelines (post-build) and provides idempotent revisions which we use as a
> rollback solution.  In other words, pipelines are versioned and if done
> right you can go back in time and rerun any step with the exact settings
> used previously.
>
> if you don't need or care about that and the complexity is not too crazy,
> stick with Jenkins.  What Jenkins does very well is the implicit Maven
> build dependences and all the other tool and  plug in integrations to get
> your initial build artifacts, source/coverage analysis such as SonarQube
> etc. and unit test reporting.
>
> Good luck!
> On Aug 20, 2015 8:40 PM, "Martin"  wrote:
>
>> Hi, Jeff:
>>
>> Very helpful! So it looks like between my Jenkins and Nexus, I also need
>> a GoCD? Have never used it, but good to learn about it.
>>
>> Thanks,
>>
>> On Thursday, August 20, 2015 at 6:59:59 PM UTC-7, Jeff Vincent wrote:
>>>
>>> If (as an example) you are running Ubuntu 12.04 or 14.04, you would
>>> install 'tomcat7-admin'  (`sudo apt-get install tomcat7-admin).  Then there
>>> is a file /var/lib/tomcat7/conf/tomcat-users.xml that configures the users
>>> allowed to authenticate to the admin (via UI or API endpoint) to manage the
>>> applications deployed to Tomcat.  The url for the manager application would
>>> be something like:
>>>
>>> http://:8080/manager/html
>>>
>>> See https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html for
>>> details on using/configuring it.
>>>
>>> WIthout a manager API or interface, you somehow need to get the WAR file
>>> to the server.  If using tomcat (as an example) on Ubuntu the typical path
>>> (if installed via the apt package system) would be
>>> /var/lib/tomcat7/webapps.  Dropping the WAR file in there would cause it to
>>> automatically deploy/redeploy.  Again, I'm not familiar with JBoss but I
>>> imagine it is similar.
>>>
>>> At my previous company, Jenkins published the WAR file version to our
>>> GoCD pipeline.  It would then go to Nexus and pull that version of the WAR,
>>> create and RPM (CentOS based distro), push the RPM to a central repository,
>>> update Chef Data Bags and then initiate the Chef update which would pull
>>> the new RPM onto the server and push the WAR to the right folder.
>>>
>>> At my current company we are using GoCD with SaltStack to update the
>>> Salt pillar files for the application.  WHen we run the salt
>>> state.highstate command, the system detects a change to the WAR file, pulls
>>> it directly from Nexus and drops it into the tomcat webapps folder (after
>>> it does a stop tomcat, clean old war folder/file, restart tomcat).  It also
>>> provisions tomcat if needed and updates any application specific properties
>>> files or settings.
>>>
>>> Hope that was clear.
>>>
>>> On Thu, Aug 20, 2015 at 6:17 PM, Brent Atkinson 
>>> wrote:
>>>
 He means the Apache Tomcat manager app. It provides the means to
 programmatically deploy to Tomcat. JBoss has similar  functionality exposed
 through its management services, though you may have to enable/secure it.
 This assumes your server lives longer than a deployment, which is not how
 everyone does it.
 On Aug 20, 2015 8:05 PM, "Martin"  wrote:

> Hi, Jeff:
>
> What do you mean by the "manager application" in the description of
> "manager application to be installed and configured"? Is it Nexus? Thanks.
>
> On Thursday, August 20, 2015 at 7:43:34 PM UTC-4, Jeff Vincent wrote:
>>
>> I don't know anything about JBoss, but Apache (Tomcat) doesn't 'grab'
>> anything.  You have to push the build to the server either using the 
>> tomcat
>> manager API or use some other mechanism (SCP, wget, etc.) to otherwise 
>> grab
>> the WAR file and get it onto the server.
>>
>> Jenkins has the 'deploy war/ear to a container' plugin to facilitate
>> this, but it requires (in the case of tomcat) the manager application to 
>> be
>> installed and configured.  If your production environment is like ours,
>> they will not install the manager application so it is either
>> copied/configured manually or you can script it via a provisioning tool
>> (SaltStack, Chef, Ansible, Puppet, etc.) and there are numerous ways to 
>> do
>

How to do CI using jenkins with SVN to Azure PaaS?

2015-08-21 Thread Nirav
We are trying to have a free tool to setup continuous integration of our web
sites. Our source control is SVN and we are using Azure PaaS, and that's
where we want to deploy our site. 
We do not have Azure VMs as of now. 

Please let me know how can we setup CI with SVN using Jenkins and deploy on
Azure PaaS.



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/How-to-do-CI-using-jenkins-with-SVN-to-Azure-PaaS-tp4766378.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1440151963845-4766378.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.


Re: Triggers not working after adding Reverse Build triggers with Groovy

2015-08-21 Thread Sverre Moe
I checked inside the config.xml before and after I manually saved the 
downstream project.

The only difference after saved, the reverse build trigger was placed 
before the scmtrigger.
  
 
   
   project1
   
 SUCCESS
 0
 BLUE
 true
   
 
 
   H/15 * * * *
   false
 



fredag 21. august 2015 09.23.17 UTC+2 skrev Sverre Moe følgende:
>
> I have added some reverse build triggers with a Groovy script. 
> Unfortunately the triggers does not work properly.
>
> It all looks like its ok, but after an upstream project has been built I 
> get the following NullPointerException:
>
> Warning: you have no plugins providing access control for builds, so falling 
> back to legacy behavior of permitting any downstream builds to be triggered
> FATAL: null
> java.lang.NullPointerException
>  
> 
> at 
> jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:111)
>  
> 
> at 
> jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:84) 
> 
> at 
> jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:141)
>  
> 
> at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:245) 
> 
> at 
> hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:687)
>  
> 
> at hudson.model.Run.execute(Run.java:1788) 
> 
> at hudson.matrix.MatrixBuild.run(MatrixBuild.java:301) 
> 
> at 
> hudson.model.ResourceController.execute(ResourceController.java:98) 
> 
> at hudson.model.Executor.run(Executor.java:381) 
> 
> Finished: SUCCESS
>
>
> I fixed it by the following approach: Before building one of the upstream 
> project, I went into the configuration of each of its downstream projects, 
> checked the "Build after other projects are built" for each of them. The 
> reverse build trigger was already activated, the projects listed. I save 
> the project even though there actually was no changes. This time the 
> reverse build trigger worked when an upstream project was build all its 
> downstream projects got triggered.
>
> Why did I have to manually go into each downstream project and save it? My 
> groovy script does that.
>
>
> #!/usr/bin/env groovy
>
> import jenkins.triggers.ReverseBuildTrigger
> import hudson.model.Result
>
> def jenkinsInstance = jenkins.model.Jenkins.getInstance()
> def developmentView = jenkinsInstance.getView("Development")
> developmentView.getItems().each { project ->
>
> def upstreamProjects = null
> if (project.name.equals("project3")) {
> upstreamProjects = "project1, project2 "
> }
>
> if (upstreamProjects != null) {
> def trigger = new ReverseBuildTrigger(upstreamProjects, 
> Result.SUCCESS)
> project.addTrigger(trigger)
> project.save()
> }
> }
>
> jenkinsInstance.rebuildDependencyGraph()
> It contains only one for simplicity. My if-else contains aprox 100 
> projects.
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/52c26b21-181e-4344-a66a-4e37e33108c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Triggers not working after adding Reverse Build triggers with Groovy

2015-08-21 Thread Sverre Moe
I have added some reverse build triggers with a Groovy script. 
Unfortunately the triggers does not work properly.

It all looks like its ok, but after an upstream project has been built I 
get the following NullPointerException:

Warning: you have no plugins providing access control for builds, so falling 
back to legacy behavior of permitting any downstream builds to be triggered
FATAL: null
java.lang.NullPointerException
  
   at 
jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:111)
 

at 
jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:84) 

at 
jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:141)
 

at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:245) 

at 
hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:687)
 

at hudson.model.Run.execute(Run.java:1788) 

at hudson.matrix.MatrixBuild.run(MatrixBuild.java:301) 

at hudson.model.ResourceController.execute(ResourceController.java:98) 

at hudson.model.Executor.run(Executor.java:381) 

Finished: SUCCESS


I fixed it by the following approach: Before building one of the upstream 
project, I went into the configuration of each of its downstream projects, 
checked the "Build after other projects are built" for each of them. The 
reverse build trigger was already activated, the projects listed. I save 
the project even though there actually was no changes. This time the 
reverse build trigger worked when an upstream project was build all its 
downstream projects got triggered.

Why did I have to manually go into each downstream project and save it? My 
groovy script does that.


#!/usr/bin/env groovy

import jenkins.triggers.ReverseBuildTrigger
import hudson.model.Result

def jenkinsInstance = jenkins.model.Jenkins.getInstance()
def developmentView = jenkinsInstance.getView("Development")
developmentView.getItems().each { project ->

def upstreamProjects = null
if (project.name.equals("project3")) {
upstreamProjects = "project1, project2 "
}

if (upstreamProjects != null) {
def trigger = new ReverseBuildTrigger(upstreamProjects, 
Result.SUCCESS)
project.addTrigger(trigger)
project.save()
}
}

jenkinsInstance.rebuildDependencyGraph()
It contains only one for simplicity. My if-else contains aprox 100 projects.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/359c5d02-ec66-44b1-be3d-3df40d7e7ab5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.