Pipeline: analysis-core steps (findbugs, PMD, etc) and JaCoCo NoSuchMethodError

2016-10-21 Thread Jeremy


Hello,


First time posting here, sorry if the format isn't the norm.


I am having trouble using the analysis-core and JaCoCo plugins with my 
Pipeline job.  All of those plugins have workflow support.  The plugins are 
not appearing in the Snippet generator, nor are they appearing in the regular 
"java.lang.NoSuchMethodError: No such DSL method" stack-trace which lists 
all available steps and commands.


Below is a list of the minimum required version of each plugin for workflow 
support, as well as the version installed on my system.


If anyone can point me in the right direction to get these plugins working 
with Pipeline, it would be greatly appreciated.


Thanks,

Jeremy



Plugin ---Min. Req. Version---My Version

---

JaCoCo---2.1 2.1

Analysis-core -- 1.73 - 1.79---

Find Bugs --- 4.62 - 4.65---

PMD/CPD--- 3.42 - 3.45---

Task Scanner ---4.46 - 4.49---

-- 
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/a56a18b6-9943-4dd7-8749-7510ad5029c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


JIRA/Stash (bitbucket server)/Jenkins setup - build kicking off unnecessarily

2016-10-21 Thread John
Hey everyone:

I have Stash (bitbucket server)/Jira integreated setup using Jenkins for CI.
I want to kick off my builds on "push to feature branch" only.

The issue I have is that the builds are kicking off on these 3 actions as 
well:
* create branch directly in stash
* create pull request in stash
* approval of pull request (merge to master)

I have this in branch specifier to prevent starting build on push to master
:^(?!.*master).*$

Would appreciate any help in how to prevent this.

Thanks
John

-- 
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/98cbbed9-5e94-4586-bfa0-c24ba8a88351%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


make parameter mandatory

2016-10-21 Thread Bhushan Kittur
Hello ,


I am planing to make  Jenkins string parameter mandatory for one of the jobs 
and force user to enter an alphanumeric value in the parameter's value field to 
schedule the job.

Can someone let me know how to make a parameter mandatory and accepts only 
alpha numeric value?  Thank you.


Best , BSK


Sent from Outlook

-- 
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/HK2PR03MB185740F1C048D601C3F09ADAA8D40%40HK2PR03MB1857.apcprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins and the IBM i Series

2016-10-21 Thread Allen Fisher
Hello Everyone-

I've been brought in to work on build processes in a very specialized 
environment. We make software for the IBM iSeries which has Windows components 
and iSeries components. Has anyone out there used Jenkins to drive processes on 
the iSeries? I've not had much luck finding anything. I'm completely fine 
blazing a new trail, but I'd rather check first and see if anyone's working in 
this sort of environment.

Thanks!

Allen

[http://static.helpsystems.com/hs/email/templates/signatures-final/images/hs-logo2.png]

Allen Fisher
Build and Release Engineer

e. allen.fis...@helpsystems.com
w. www.helpsystems.com

[http://static.helpsystems.com/hs/email/templates/signatures-final/images/social-linkedin.jpg]
 
[http://static.helpsystems.com/hs/email/templates/signatures-final/images/social-twitter.jpg]
 




-- 
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/ca6583d3abbe4aa58d2d9f831cdbfdef%40EDPREXCH01.helpsystems.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline : Confused about file access on slaves

2016-10-21 Thread Jonathan Hodgson


On Friday, October 21, 2016 at 6:11:28 PM UTC+1, Baptiste Mathus wrote:
>
> One thing to understand is that your pipeline is actually always to be run 
> from/on the master. Each "instruction" if actually sent from the master the 
> requested node, then kind of checkpointed before going further.
>
> So, when you're using a pipeline, it's aware of that. When you're using 
> directly groovy, you end up running on the master.
>
> That's one the reasons you should prefer using the pipeline-utility-steps 
> plugin for that matter, and in general keep your pipeline code as simple as 
> possible.
>
> HTH
>
> Hi Baptiste,

thanks, I'd pretty much worked that out but it's good to have it clarified.

Having gone through various hassles relating to Groovy in the pipeline I 
think I might propose a "Gotchas" section for the documentation, pointing 
out the pitfalls. It's confusing when you're starting out and some things 
work while others don't, and then you google for answers to questions and 
don't realize that the answers you've found relate to system.groovy rather 
than pipeline.groovy. A simple "this is the issue, this works, this doesn't 
(or cannot be guaranteed to), beware the difference with system.groovy when 
looking for answers to questions" page would have saved me an incredible 
amount of time.

Also, I wonder if there would be a way to implement a pipeline step that 
let you run groovy on the slave, passing parameters to it. Doing stuff 
through shell scripts, even if you're basically using them to call scripts 
in other languages, is rather messy.

-- 
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/689d5a38-d6c3-4aa7-8a78-b7d0c03dba4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Collecting Workflow Run Info in Pipeline

2016-10-21 Thread Baptiste Mathus
IMO this is fragile because it's not really a job's job. Seems more like a
plugin's one. Might be interesting for others btw. Something like a
pipeline-runs-summary plugin.

Le 18 oct. 2016 5:19 PM, "Zack Sampson"  a écrit :

> I figured this out. I ended up crawling around the actual workflow UI java
> code. It's fragile, but this doesn't appear to be supported in a nonfragile
> way. The classes I used were FlowNodeUtil, Describe, StatusExt, etc.
>
> On Monday, October 17, 2016 at 10:34:20 AM UTC-4, Zack Sampson wrote:
>>
>> Hey,
>>
>> I'm trying to write a Pipeline job to generate a daily summary of my
>> pipeline runs from the preceding day. I've figured out that in a
>> non-sandboxed, non-CPS block I can get at the hudson instance and from
>> there find the jobs/runs, but I can't find out how to get to the "stage X
>> took Y minutes" data.
>>
>> Has anyone done this before? Do you know where that data lives within
>> WorkflowRun?
>>
>> Thanks,
>> - Zack
>>
> --
> 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/db0f58bd-35ca-474a-9849-9e3e8f28235f%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/CANWgJS4coA8SVRSkDk8%2BqAdiXNkX1-j2TjYeiW-V_qkyF9ibTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: plugin issue..

2016-10-21 Thread Baptiste Mathus
Yes. Installing plugins by hand is very difficult to do, and can break your
instance.
At least, test that on a test instance if you don't have internet access on
the prod server

Le 20 oct. 2016 4:53 PM, "Teichner Peter"  a
écrit :

> Use the plugins page if possible as there might be dependencies to install
> with the plugin
>
>
>
> *From:* jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@
> googlegroups.com] *On Behalf Of *Prasu S
> *Sent:* 20 October 2016 15:52
> *To:* Jenkins Users
> *Subject:* plugin issue..
>
>
>
> I installed workflow-step-api plugin manually by copying
> workflow-step-api.hpi version 2.0 under the Jenkins plugins directory and
> restarted Jenkins. But I don't see the plugin in Jenkins under installed
> tab. Did it miss anything ? Please help. Thanks in advance...
>
> --
> 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/c4bf912c-bbcc-4d72-99d5-ad3ab65f0f26%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/1D7A50BF5AC1D449A7E018A3CE1D8B
> 339DD229AE%40CHX-EXMBX-06.hq.k.grp
> 
> .
> 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/CANWgJS6RhYLFFXa7bJdxfnxivdkjpu90KAgfSnVKLe%2BD3HW2OQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline : Confused about file access on slaves

2016-10-21 Thread Baptiste Mathus
One thing to understand is that your pipeline is actually always to be run
from/on the master. Each "instruction" if actually sent from the master the
requested node, then kind of checkpointed before going further.

So, when you're using a pipeline, it's aware of that. When you're using
directly groovy, you end up running on the master.

That's one the reasons you should prefer using the pipeline-utility-steps
plugin for that matter, and in general keep your pipeline code as simple as
possible.

HTH

Le 18 oct. 2016 12:58 AM, "Jonathan Hodgson"  a
écrit :

Hi,

I've touched on this stuff in a previous thread where I thought it was
about running on Windows, in turns out it's the same for any slave

So I'm starting a new thread now I'm clearer what the issue is

I have code that basically works like this

node('master') {  // Master is running Linus
SET_STUFF_UP
}
platform_builders ["Mac"] = {
node ("XCode")
{
BUILD_STUFF_ON_OSX
}
}
platform_builders ["Windows"] = {
node ("VS2013")
{
BUILD_STUFF_ON_WINDOWS
}
}
parallel(platform_builders)


So, pretty standard.

Now what I don't understand is what I get when I try to access files.

In SET_STUFF_UP jenkins Buildsteps that access files (checkouts, DeleteDir,
etc) operate on the master (as expected) and Groovy's standard file
handling classes (File, FileNameFinder etc) also act on the master... so
that's all fine

but in BUILD_STUFF_IN_OSX and BUILD_STUFF_IN_WINDOWS buildsteps operate on
files on the slaves (as expected) while Groovy standard classes operate on
the master.

1) Is this expected? The documentation says that File operates on "the
current machine", which I took to mean the one actually running the code at
that moment, which is the slave. But that isn't hwat is happening

2) How do I get around it? Buildsteps just don't provide the functionality
I need, and doing stuff in shell scripts and batch files (which works as
expected) is really clunky.



-- 
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/f314bd0d-7fea-469e-8616-8ad60ce1885f%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/CANWgJS6%2B5LW9Be9BDA5624jaTP2AFnjrNSoA4mw66JQW4UVK_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: moving hotfixes along a parallel SDLC

2016-10-21 Thread Baptiste Mathus
OK then let's go back to your original question. You say you"need to bump
version numbers". I would guess this is actually not the root reason.

Why do you want to do that?

I mean: if they are different jobs, so probably for different things, why
would want to do that?

It does indeed seem surprising to me at first sight.

Le 17 oct. 2016 4:28 PM, "Guy Matz"  a écrit :

> Yeah, sorry, I'm not actually suggesting bumping version #s is the way to
> go . . .  I was hoping that maybe I was approaching the problem the wrong
> way, and that someone had a better idea.  Thanks!!
>
> On Mon, Oct 17, 2016 at 10:00 AM, 'Björn Pedersen' via Jenkins Users <
> jenkinsci-users@googlegroups.com> wrote:
>
>> Hi,
>>
>> It could be done, but think about using  a better versioning scheme.
>> Using build numbers  from different jobs seems like a way to ask for
>> trouble.
>>
>> Take a look at:
>>   https://wiki.jenkins-ci.org/display/JENKINS/Version+Number+Plugin
>>   https://wiki.jenkins-ci.org/display/JENKINS/semantic-versioning-plugin
>>   https://wiki.jenkins-ci.org/display/JENKINS/Next+Build+Number+Plugin
>>
>> Björn
>>
>>
>> Am Montag, 17. Oktober 2016 15:44:25 UTC+2 schrieb Guy Matz:
>>>
>>> Hello!  I need to be able to bump version numbers between two different
>>> jobs, meaning that if job A runs, it should have a build number higher that
>>> job B, and if job B runs, it should have a build # higher than job A . . .
>>>  for example, job A may run 10 ten times and have a build number of 10.
>>> Then job B will run and needs a build # of 11.  Job A wight run after than
>>> and needs a build # of 12.
>>>
>>> Anyone know how to do this?  I *think* I need this because I am going to
>>> have parallel tracks in my SDLC:  my usual develop -> master and a new
>>> hotfix -> master SDLC being build by a separate job.  Do I need this?  Any
>>> better ideas out there?  This seems like a common enough problem that it's
>>> already been solved six ways to sunday . . .
>>>
>>> Thanks a lot,
>>> Guy
>>>
>> --
>> 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/ms
>> gid/jenkinsci-users/ff35676e-c537-493d-ab45-62a5ce42ca8f%
>> 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/CABnTgtWcTbM%2B4UKXifEmAo1TWDZr8jWny9W%
> 2BgJ817iFpgvhg3A%40mail.gmail.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/CANWgJS66KV34yQXdUGxTBKHbH3d4WK1vGRo36PPpMhjPO87qzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Output of shell command into a variable

2016-10-21 Thread Sam K
Currently, I'm doing this.  

sh '  > /tmp/aa'
def VAR1 = readFile('/tmp/aa')

This mostly works.  But oftentimes the variable has a newline and so it 
messes up its usage. 

Is there a better way to store the output in a variable without having to 
deal with the newline? 

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f12a1391-bf74-41f9-9c6e-9eab354b7ea6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: JIRA/Stash (bitbucket server)/Jenkins setup - build kicking off unnecessarily

2016-10-21 Thread Indra Gunawan (ingunawa)
The Stash PR git ref spec is already different than the regular Git build ref 
spec you can't have all in 1 job/build.


From: 
> on 
behalf of John >
Reply-To: 
"jenkinsci-users@googlegroups.com" 
>
Date: Friday, October 21, 2016 at 8:40 AM
To: Jenkins Users 
>
Subject: JIRA/Stash (bitbucket server)/Jenkins setup - build kicking off 
unnecessarily

Hey everyone:

I have Stash (bitbucket server)/Jira integreated setup using Jenkins for CI.
I want to kick off my builds on "push to feature branch" only.

The issue I have is that the builds are kicking off on these 3 actions as well:
* create branch directly in stash
* create pull request in stash
* approval of pull request (merge to master)

I have this in branch specifier to prevent starting build on push to master
:^(?!.*master).*$

Would appreciate any help in how to prevent this.

Thanks
John

--
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/98cbbed9-5e94-4586-bfa0-c24ba8a88351%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/D42FDE19.5ECFD%25ingunawa%40cisco.com.
For more options, visit https://groups.google.com/d/optout.


Re: JIRA/Stash (bitbucket server)/Jenkins setup - build kicking off unnecessarily

2016-10-21 Thread Indra Gunawan (ingunawa)
1.)  For the "create branch directly in stash",  you can have 1 job triggered 
with Git SCM strategy "inverse" with "master" (meaning: to trigger only when 
the new branch or commits are pushed to any branch except "master")
2.)  For the "create pull request in stash", you need the Stash Pull Request 
Plugin.
3.) For the "merge to master", you can have another job triggered by gitCommit 
hook triggered only or SCM polling with commit is going to "master"


From: 
> on 
behalf of John >
Reply-To: 
"jenkinsci-users@googlegroups.com" 
>
Date: Friday, October 21, 2016 at 8:40 AM
To: Jenkins Users 
>
Subject: JIRA/Stash (bitbucket server)/Jenkins setup - build kicking off 
unnecessarily

Hey everyone:

I have Stash (bitbucket server)/Jira integreated setup using Jenkins for CI.
I want to kick off my builds on "push to feature branch" only.

The issue I have is that the builds are kicking off on these 3 actions as well:
* create branch directly in stash
* create pull request in stash
* approval of pull request (merge to master)

I have this in branch specifier to prevent starting build on push to master
:^(?!.*master).*$

Would appreciate any help in how to prevent this.

Thanks
John

--
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/98cbbed9-5e94-4586-bfa0-c24ba8a88351%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/D42FDCF3.5ECF3%25ingunawa%40cisco.com.
For more options, visit https://groups.google.com/d/optout.


Re: Output of shell command into a variable

2016-10-21 Thread Sam K

Your answer works like a charm, but will still give me a problem with the 
newline in the end.  I added the trim() from the stackoverflow answer and 
now the output is what I want.  

Thanks again!!
Sam

On Friday, October 21, 2016 at 5:20:16 PM UTC-7, Mark Waite wrote:
>
> If you're inside a pipeline script and calling sh (or bat), then you can 
> use a slightly different syntax and it will assign the output of the shell 
> command as the return value.
>
> See 
> https://github.com/MarkEWaite/jenkins-bugs/blob/2e662560a42571b18ec32d78d1ac730952075d78/Jenkinsfile#L52
>  for 
> an example, or the stackoverflow answer at 
> http://stackoverflow.com/questions/36507410/is-it-possible-to-capture-the-stdout-from-the-sh-dsl-command-in-the-pipeline#
>  .
>
> Mark Waite
>
> On Fri, Oct 21, 2016 at 12:08 PM Sam K  
> wrote:
>
>> Currently, I'm doing this.  
>>
>> sh '  > /tmp/aa'
>> def VAR1 = readFile('/tmp/aa')
>>
>> This mostly works.  But oftentimes the variable has a newline and so it 
>> messes up its usage. 
>>
>> Is there a better way to store the output in a variable without having to 
>> deal with the newline? 
>>
>> 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-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/f12a1391-bf74-41f9-9c6e-9eab354b7ea6%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/7fe9c311-2cee-46ba-81ee-9e255c1a3c53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Output of shell command into a variable

2016-10-21 Thread Mark Waite
If you're inside a pipeline script and calling sh (or bat), then you can
use a slightly different syntax and it will assign the output of the shell
command as the return value.

See
https://github.com/MarkEWaite/jenkins-bugs/blob/2e662560a42571b18ec32d78d1ac730952075d78/Jenkinsfile#L52
for
an example, or the stackoverflow answer at
http://stackoverflow.com/questions/36507410/is-it-possible-to-capture-the-stdout-from-the-sh-dsl-command-in-the-pipeline#
 .

Mark Waite

On Fri, Oct 21, 2016 at 12:08 PM Sam K  wrote:

> Currently, I'm doing this.
>
> sh '  > /tmp/aa'
> def VAR1 = readFile('/tmp/aa')
>
> This mostly works.  But oftentimes the variable has a newline and so it
> messes up its usage.
>
> Is there a better way to store the output in a variable without having to
> deal with the newline?
>
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/f12a1391-bf74-41f9-9c6e-9eab354b7ea6%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/CAO49JtEu_rAqBGVJsQRx8nvPhUscdmhy8jhDRdQaNPG5oiERRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Specifying "LATEST" JDK For Automated Installer

2016-10-21 Thread Justin Holmes
Hello All,

I did a fair bit of googling before sending this query, do let me know if 
this has been answered before.

I'm working in an environment that is highly automated. My Jenkins 
instances are managed as docker containers and elements of JENKINS_HOME are 
managed via a volume mount. As part of this image volume mount, I'd like to 
o specify that Jenkins install the last available JDK for Sun/Oracle. 
Currently, it only appears that I am able to specify a specific JDK 
version. 

Is there a way to do this currently that I am not seeing? If not, is this a 
feature of which the maintainers would be supportive? I would be 
interesting in providing the relevant issue and build a PR if so. 

- Justin

-- 
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/7603b243-d5c7-4ff0-9058-bbe2e8d1e9f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What does "cannot start writing logs to a finished node" mean?

2016-10-21 Thread Sven Finsterwalder
I have a similar problem my code looks like this:

#!groovy​


timestamps {
 def checkoutFolderPipelineScript = '/../workspace@script'
 def buildEnv
 node('master') {
 stage("Setup") {
 echo "${pwd()}"
 buildEnv = 
load("${pwd()}${checkoutFolderPipelineScript}/BuildEnvironment.groovy")
 }
 }

 node {
 stage('Create files') {
 parallel(
 JuriDefault: {
 def casinoName = "astroroyal"
 dir("${casinoName}") {
 writeFile file: "IoM_default.html", text: 
"IoM3300"

 buildEnv.stashItem("ast1", "IoM_default.html", "${pwd()}")
 }
 },
 JuriIoM: {
 def casinoName = "astroroyal_IoM"
 dir("${casinoName}") {
 writeFile file: "IoM.html", text: 
"IoM171070"

 buildEnv.stashItem("ast2", "IoM.html", "${pwd()}")
 }

 },
 JuriES: {
 def casinoName = "astroroyal_ES"
 dir("${casinoName}") {
 writeFile file: "ES.html", text: 
"IoM7070"

 buildEnv.stashItem("ast3", "ES.html", "${pwd()}")
 }

 }
 )
 }


 stage("Create overview of files content") {
 dir("testresultOverview") {
 unstash("ast1")
 unstash("ast2")
 unstash("ast3")
 sh """#!/bin/sh
 ls -l ${pwd()}
 """

 def reportFileList = new FileNameFinder().getFileNames("${pwd()}/", '*.html')
 def htmlMetaDataAndStyle = "\n" +
 "\n" +
 "\n" +
 "\n" +
 "table {\n" +
 " border-collapse: collapse;\n" +
 "}\n" +
 "th{" +
 "background-color: #8f9093;" +
 "color: white;" +
 "padding: 5px" +
 "}" +
 "table, td, th {\n" +
 " border: 1px solid black;\n" +
 "}\n" +
 "\n" +
 "\n" +
 ""
 def reportOutput = 
"JurisdictionTotalPassedFailedSkipped\n"
 for (item in reportFileList) {
 // If it does exist
 if (fileExists(item)) {
 def output = readFile item;
 reportOutput = "${reportOutput} ${output}"
 } else {
 echo "skipp ${item}"
 }
 }
 echo "${reportOutput}"
 writeFile file: "testresultoverviewreport.html", text: 
"${htmlMetaDataAndStyle} ${reportOutput} "
 publishHTML([allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true,
 reportDir : "${pwd()}",
 reportFiles : "testresultoverviewreport.html",
 reportName : "TestresultOverviewReport"])
 }

 }
 }
}



Am Donnerstag, 20. Oktober 2016 22:36:22 UTC+2 schrieb ky...@kayak.com:
>
> [Lint KayakFree] [android-lint] Computing warning deltas based on reference 
> build #35[Pipeline] [Lint KayakFree] }[Pipeline] [Lint KayakFree] // 
> node[Pipeline] [Lint KayakFree] }[Pipeline] // parallel[Pipeline] }[Pipeline] 
> // stage[Pipeline] End of Pipelinejava.lang.IllegalStateException: cannot 
> start writing logs to a finished node 
> org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode[id=30]
>
>
>
> The lint stage never finishes and lint passed so it shouldn't be hitting 
> the catch which does print a little debug output.
> This worked in the previous version of Jenkins (2.25)..current is 2.26:
>
> stage ('Lint') {
>   def branches = [:]
>   branches['Lint KayakFree'] = {
> node ('android') {
>   try {
> unstash name: 'source'
> sh "./gradlew --no-daemon lintKayakFree${variant}"
> androidLint()
>   } catch (Exception err) {
> currentBuild.result = 'FAILURE'
> this.notifyStash('FAILED')
>   }
> }
>   }
>   branches['Lint Checkfelix'] = {
> node ('android') {
>   try {
> unstash name: 'source'
> sh "./gradlew --no-daemon lintCheckfelix${variant}"
>   } catch (Exception err) {
> currentBuild.result = 'FAILURE'
> this.notifyStash('FAILED')
>   }
> }
>   }
>   branches['Lint Swoodoo'] = {
> node ('android') {
>   try {
> unstash name: 'source'
> sh "./gradlew --no-daemon lintSwoodoo${variant}"
>   } catch (Exception err) {
> currentBuild.result = 'FAILURE'
> this.notifyStash('FAILED')
>   }
> }
>   }
>   parallel branches
> }
>
>

-- 
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/72ef38e9-f2d0-438b-bd39-801ba865eda1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What does "cannot start writing logs to a finished node" mean?

2016-10-21 Thread kyee


On Friday, October 21, 2016 at 4:21:44 AM UTC-4, Sven Finsterwalder wrote:
>
> Update the 
> Pipeline Supporting APIs Plugin 
>  
> to 2.10 then it will work again.
>

Thanks Sven.
How do I get Jenkins to see the 2.10 plugin?  I've tried restarting it but 
it still thinks the latest is 2.9?
 

-- 
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/2a6564d0-eee8-4a00-b17e-0de79ecef7ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline: Is there a plugin to give a "better console"??

2016-10-21 Thread Jonathan Hodgson


On Thursday, October 20, 2016 at 5:02:34 PM UTC+1, Trever wrote:
>
> This plugin advertises to allow collapsing sections of the console
>
> https://wiki.jenkins-ci.org/display/JENKINS/Collapsing+Console+Sections+Plugin
>
>
> Yes, I saw that, and it might be useful, but it doesn't seem to work with 
the pipeline. 

-- 
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/ce3a6418-3923-4512-be83-c32ba4d17111%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline: Is there a plugin to give a "better console"??

2016-10-21 Thread Vincent Latombe
Did you give a try to Blue Ocean? https://jenkins.io/projects/blueocean/

Vincent

2016-10-21 14:01 GMT+02:00 Jonathan Hodgson :

>
>
> On Thursday, October 20, 2016 at 5:02:34 PM UTC+1, Trever wrote:
>>
>> This plugin advertises to allow collapsing sections of the console
>> https://wiki.jenkins-ci.org/display/JENKINS/Collapsing+Conso
>> le+Sections+Plugin
>>
>>
>> Yes, I saw that, and it might be useful, but it doesn't seem to work with
> the pipeline.
>
> --
> 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/ce3a6418-3923-4512-be83-c32ba4d17111%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/CAH-zGChUgdHdFQNF%3DXvLNnNNq8xhFfWdBPacB7Ho%3DtMJwtwN-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline: Is there a plugin to give a "better console"??

2016-10-21 Thread Jonathan Hodgson


On Friday, October 21, 2016 at 1:09:07 PM UTC+1, Vincent Latombe wrote:
>
> Did you give a try to Blue Ocean? https://jenkins.io/projects/blueocean/
>
>
>> I did,

It seems promising, but really not that great at the moment.

The steps view is close to what I'd like to see, the facility to click on a 
parallel branch and see that is nice. But most of the steps are collapsed 
down to something completely useless like "print message". So let's say I 
was printing out a build summary. What I would see in the steps view is a 
series of collapsed sections saying "print message" and if I click on any 
one of those, I get just one bit of the summary.

What I would like to see is a collapsed section saying "OSX Debig Build 
Summary", and when I expand it, I see the whole summary.

It could also do with the option of expanded and contractiing a range of 
sections.

On top of that Blue Ocean as a whole seems very unfinished, is slow at the 
moment and loses me plugins I'm using and also doesn't display the build 
description (which I actually use to show build progress and results.

-- 
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/2ab4bf2f-9e77-404d-9147-b3d5c4016d6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


When Connecting to GitLab from Jenkins it is failing

2016-10-21 Thread reddypramodh adalam
Hi,

I am just trying to test the connection from Jenkins and it is failing with 
below error

ERROR 

A problem occurred while processing the request. Please check our bug 
tracker  to see if a similar problem has 
already been reported. If it is already reported, please vote and put a 
comment on it to let us gauge the impact of the problem. If you think this 
is a new issue, please file a new issue. When you file an issue, make sure 
to add the entire stack trace, along with the version of Jenkins and 
relevant plugins. The users list 
 might be also useful in 
understanding what has happened.
Stack trace

javax.servlet.ServletException: java.lang.NullPointerException
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
at 
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
at 
hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at 
hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:80)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at 
hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at 
hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at 
org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at 
hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at 
org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
at 

systest job gives OptimisticLockException with oracle DB.

2016-10-21 Thread Nandlalaji Singh
Hi 

i am running systest job locally using local oracle setup. It run fine but 
on jenkins same systest job is failing with following error.

"javax.persistence.OptimisticLockException: 
org.hibernate.StaleObjectStateException: Row was updated or deleted by 
another transaction (or unsaved-value mapping was incorrect)".

The thing is that i check the value manual, its unique value and not being 
used by other test parallelly. Show the logs.

I know we have different approach to resolve that. i.e using Optimistic 
lock or using @Version. But i am kind of resolving test case and not 
changing production code.

The thing is why its running fine locally and not on jenkins. Also its 
giving delete problem with table with join tables.


Please help to resolve that

Regards
Nand


-- 
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/1c56bd30-3c1c-4736-921c-6816f6f23716%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline: Is there a plugin to give a "better console"??

2016-10-21 Thread Sverre Moe
That plugin does not seem to support Pipeline.

torsdag 20. oktober 2016 18.02.34 UTC+2 skrev Trever følgende:
>
> This plugin advertises to allow collapsing sections of the console
>
> https://wiki.jenkins-ci.org/display/JENKINS/Collapsing+Console+Sections+Plugin
>
> On Thursday, October 20, 2016 at 2:02:18 AM UTC-7, Jonathan Hodgson wrote:
>>
>> Hi,
>>
>> I'm developing a pipeline job. The console is indispensible in this, not 
>> surprisingly.
>>
>> But it's getting harder and harder to find what I need in the endless 
>> stream of text, combining the outputs from what is currently a master and 
>> two slaves (I expect the number of slaves will grow).
>>
>> Is there a plugin that makes life easier in this respect. Perhaps 
>> allowing filters (e.g  which node) and also collapsing of sections?
>>
>> Thanks
>>
>> Jon
>>
>

-- 
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/b1282e82-83d6-4874-a2b6-f167f68da4ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What does "cannot start writing logs to a finished node" mean?

2016-10-21 Thread Daniel Jeznach
Hi,

I have similar problem as well, I noticed the exception today after 
upgrading Jenkins to 2.26, but problem with executing parallel tasks 
appeared earlier (probably after pipeline plugins upgrade).
I have too complex parallel delivery to paste here, but I tried to create 
other one, as simple as possible and it fails as well, making jenkins 
unusable.

Following code:

parallel one: {
node('normal'){
echo 'one'
}
}, two: {
node('heavy'){
echo 'two'
}
}


results in:

[Pipeline] parallel[Pipeline] [one] { (Branch: one)[Pipeline] [two] { (Branch: 
two)[Pipeline] [one] node[one] Running on N-escloc19_2-5e15cc49-8 in 
/ephemeral/jenkins_test/workspace/vartest[Pipeline] [two] node[Pipeline] [two] 
// node[Pipeline] [two] }[two] Failed in branch two[Pipeline] [one] {[Pipeline] 
[one] echo[one] one[Pipeline] [one] }[Pipeline] [one] // node[Pipeline] [one] 
}[Pipeline] // parallel[Pipeline] End of 
Pipelinejava.lang.IllegalStateException: cannot start writing logs to a 
finished node org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode[id=8]
at 
org.jenkinsci.plugins.workflow.support.actions.LogActionImpl.(LogActionImpl.java:110)
at 
org.jenkinsci.plugins.workflow.support.actions.LogActionImpl.stream(LogActionImpl.java:81)
at 
org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:73)
at 
org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:252)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:179)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)
at 
org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
at 
groovy.lang.MetaClassImpl.invokeMethodOnGroovyObject(MetaClassImpl.java:1280)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1174)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at 
com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:16)
at WorkflowScript.run(WorkflowScript:6)
at ___cps.transform___(Native Method)
at 
com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:48)
at 
com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
at 
com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:46)
at com.cloudbees.groovy.cps.Next.step(Next.java:58)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
at 
org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:163)
at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:324)
at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:78)
at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236)
at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:224)
at 
org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:63)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at 
jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Finished: 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 

Re: What does "cannot start writing logs to a finished node" mean?

2016-10-21 Thread Sven Finsterwalder
Update the 
Pipeline Supporting APIs Plugin 
 
to 2.10 then it will work again.

Am Donnerstag, 20. Oktober 2016 22:36:22 UTC+2 schrieb ky...@kayak.com:
>
> [Lint KayakFree] [android-lint] Computing warning deltas based on reference 
> build #35[Pipeline] [Lint KayakFree] }[Pipeline] [Lint KayakFree] // 
> node[Pipeline] [Lint KayakFree] }[Pipeline] // parallel[Pipeline] }[Pipeline] 
> // stage[Pipeline] End of Pipelinejava.lang.IllegalStateException: cannot 
> start writing logs to a finished node 
> org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode[id=30]
>
>
>
> The lint stage never finishes and lint passed so it shouldn't be hitting 
> the catch which does print a little debug output.
> This worked in the previous version of Jenkins (2.25)..current is 2.26:
>
> stage ('Lint') {
>   def branches = [:]
>   branches['Lint KayakFree'] = {
> node ('android') {
>   try {
> unstash name: 'source'
> sh "./gradlew --no-daemon lintKayakFree${variant}"
> androidLint()
>   } catch (Exception err) {
> currentBuild.result = 'FAILURE'
> this.notifyStash('FAILED')
>   }
> }
>   }
>   branches['Lint Checkfelix'] = {
> node ('android') {
>   try {
> unstash name: 'source'
> sh "./gradlew --no-daemon lintCheckfelix${variant}"
>   } catch (Exception err) {
> currentBuild.result = 'FAILURE'
> this.notifyStash('FAILED')
>   }
> }
>   }
>   branches['Lint Swoodoo'] = {
> node ('android') {
>   try {
> unstash name: 'source'
> sh "./gradlew --no-daemon lintSwoodoo${variant}"
>   } catch (Exception err) {
> currentBuild.result = 'FAILURE'
> this.notifyStash('FAILED')
>   }
> }
>   }
>   parallel branches
> }
>
>

-- 
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/0e0244c5-65c7-4962-9221-bad8ada3d84e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: NodeJS Plugin:in windows : npm commends not working

2016-10-21 Thread bolleypally vijay kumar
Thanks Eric for all your help the problem solved when i made shell run mode 
to Windows batch mode 

*Problem Solved*

On Tuesday, 18 October 2016 20:59:44 UTC+5:30, bolleypally vijay kumar 
wrote:
>
> 1. I'm trying to print node and npm version in a jenkins jobs in windows 
> machine
>
> I dont wan to use Auto install so i gave physical location of node folder 
> due to some config problems in widows with NodeJS plug in i also done(1. 
> In the windows nodejs install folder add a new folder "bin" and copy in the 
> node.exe) but still showing command not found for npm 
>
> Please find ATTACHED Screens for more details
>
> i also found few open issues like 
> https://issues.jenkins-ci.org/browse/JENKINS-21953
> https://issues.jenkins-ci.org/browse/JENKINS-26828
>
> Could you please suggest are the above issues blocking me or is there any 
> other look around exist for my problem
>
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a5a83381-eacf-4eff-a8ce-f1f913c976d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What does "cannot start writing logs to a finished node" mean?

2016-10-21 Thread Daniel Jeznach
Upgrading plugin worked for me, but after update I have no textarea
where I can input pipeline script. Only option "Pipeline script from
SCM" works for me... :(

2016-10-21 10:21 GMT+02:00 Sven Finsterwalder :
> Update the
>
> Pipeline Supporting APIs Plugin to 2.10 then it will work again.
>
>
> Am Donnerstag, 20. Oktober 2016 22:36:22 UTC+2 schrieb ky...@kayak.com:
>>
>> [Lint KayakFree] [android-lint] Computing warning deltas based on
>> reference build #35
>> [Pipeline] [Lint KayakFree] }
>> [Pipeline] [Lint KayakFree] // node
>> [Pipeline] [Lint KayakFree] }
>> [Pipeline] // parallel
>> [Pipeline] }
>> [Pipeline] // stage
>> [Pipeline] End of Pipeline
>> java.lang.IllegalStateException: cannot start writing logs to a finished
>> node org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode[id=30]
>>
>>
>>
>> The lint stage never finishes and lint passed so it shouldn't be hitting
>> the catch which does print a little debug output.
>> This worked in the previous version of Jenkins (2.25)..current is 2.26:
>>
>> stage ('Lint') {
>>   def branches = [:]
>>   branches['Lint KayakFree'] = {
>> node ('android') {
>>   try {
>> unstash name: 'source'
>> sh "./gradlew --no-daemon lintKayakFree${variant}"
>> androidLint()
>>   } catch (Exception err) {
>> currentBuild.result = 'FAILURE'
>> this.notifyStash('FAILED')
>>   }
>> }
>>   }
>>   branches['Lint Checkfelix'] = {
>> node ('android') {
>>   try {
>> unstash name: 'source'
>> sh "./gradlew --no-daemon lintCheckfelix${variant}"
>>   } catch (Exception err) {
>> currentBuild.result = 'FAILURE'
>> this.notifyStash('FAILED')
>>   }
>> }
>>   }
>>   branches['Lint Swoodoo'] = {
>> node ('android') {
>>   try {
>> unstash name: 'source'
>> sh "./gradlew --no-daemon lintSwoodoo${variant}"
>>   } catch (Exception err) {
>> currentBuild.result = 'FAILURE'
>> this.notifyStash('FAILED')
>>   }
>> }
>>   }
>>   parallel branches
>> }
>>
> --
> 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/jTsPn0_39rU/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/0e0244c5-65c7-4962-9221-bad8ada3d84e%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Quidquid Latine dictum sit, altum videtur.

-- 
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/CANrDL34cCy5vcCkFTRwURXoomdt397-c8ESRxRcfotc-Qk4O%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline Step plugin, can't figure out where global.jelly should go

2016-10-21 Thread Chris Sawczuk
When writing a plugin which came with a class extending the 'Builder' 
class, I would place my global.jelly file in a structure similar to:

com.myplugin.plugin.PluginStepBuilder/global.jelly

But recently I've been developing a plugin which does not use a 'Builder' 
extension and simply uses @Extension and friends to make itself available 
to Jenkins.

My descriptor class extends the `AbstractStepDescriptorImpl` class, which 
can override the configure method, but I can't figure out where the 
global.jelly file should go.

Any advice or 'RTFM's with a documentation URL would be greatly appreciated!

Kindest regards,

Chris S.

-- 
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/f5cc02de-b3cd-4022-94e8-7279b4135613%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Unicode Character conversion of CHECK MARK in Jenkins showing ✓

2016-10-21 Thread bolleypally vijay kumar
Hi,

Im trying to print CHECK MARK before a test to represent it as PASSED in my 
windows Jenkins server

so i used unicode '\u2713 ' (from 
http://www.fileformat.info/info/unicode/char/2713/index.htm)in my code when 
i print in my local machine its was good but in jenkins its showing as ✓ 

*and my question is How can i represent check mark problematically in both 
my local machine and in Jenkins ?*

Please find Attached screen short

-Vijay

-- 
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/83f700e0-31e2-4339-bdf2-041b3d989724%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature branch BRANCH_NAME for PR builds (Github Organization)

2016-10-21 Thread Sean Flanigan
I found a workaround for this, but it does require approving a few methods
for the Groovy sandbox, and it costs an extra call to the GitHub API:

// TODO use GitHub credentials to avoid rate limiting
// See https://developer.github.com/v3/pulls/#get-a-single-pull-request
def prUrl = new URL("
https://api.github.com/repos/my-organisation/my-repository/pulls/${env.CHANGE_ID}
")
// use head.label for owner:branch
// use head.ref for the branch name only
def sourceBranchLabel = new
groovy.json.JsonSlurper().parseText(prUrl.text).head.label


On 21 October 2016 at 12:46, Sean Flanigan  wrote:

> Sorry I can't help, but that's an excellent question. I was about to ask
> it myself (although I build _merged_ heads for PRs).
>
> There don't seem to be any suitable environment variables, so the only
> option I can think of is to interrogate the Multibranch Plugin, which may
> or may not have the original branch name in it somewhere. I haven't worked
> which class to use yet.
>
> On 1 October 2016 at 01:17, 'Logan Glickfield' via Jenkins Users <
> jenkinsci-users@googlegroups.com> wrote:
>
>> Hi there!
>>
>> Is there any way to get the original feature branch name within a
>> pipeline that was triggered by a PR build rather than the "PR-#" style
>> BRANCH_NAME?
>>
>> I've tried things like:
>> scm checkout
>> def branch = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref
>> HEAD').trim()
>>
>> But that doesn't work because its actually on a detached head commit with
>> no branch.
>>
>>
>> Our Github Organization is currently configured to use:
>> - Build origin branches
>> - Build origin PRs (unmerged head)
>>
>> We also specify "Include branches" so that we only build the "master
>> PR-*" branches.
>>
>> It seems like I could use "Build origin branches also filed as PRs" and
>> get the correct BRANCH_NAME for free. But if I understand correctly,
>> "Include branches" would become useless and I would no longer be able to
>> configure it to build only the "master" branch and pull request branches.
>>
>> Anyone have any ideas how I might be able to make this work?
>>
>> Thanks!
>>
>> -Logan
>>
>> --
>> 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/ms
>> gid/jenkinsci-users/3135bfee-2501-4814-8555-af0c79551112%
>> 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/CAGi586PX-SnMxUz0eAfUaLeqF4tiowHZHEE4W_jkXNc8w0qVLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


IOError: [Errno 11] Resource temporarily unavailable

2016-10-21 Thread Bruno Vilhena
Trying to run an ansible playbook in Jenkins, which starts a docker 
container (kubernetes-anywhere) to provision an environment.

I used to be able to run this without issues, by starting the contain 
detached and the executing the provisioning command line within the 
container, from jenkins.

Since a couple of days ago started having an issue where the build ends 
abruptly with this error: 

*fatal: [localhost] => Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ansible/runner/__init__.py", line 589, in 
_executor
exec_rc = self._executor_internal(host, new_stdin)
  File "/usr/lib/pymodules/python2.7/ansible/runner/__init__.py", line 793, in 
_executor_internal
return self._executor_internal_inner(host, self.module_name, 
self.module_args, inject, port, complex_args=complex_args)
  File "/usr/lib/pymodules/python2.7/ansible/runner/__init__.py", line 1125, in 
_executor_internal_inner
self.callbacks.on_ok(host, data)
  File "/usr/lib/pymodules/python2.7/ansible/callbacks.py", line 544, in on_ok
display(msg, color='yellow', runner=self.runner)
  File "/usr/lib/pymodules/python2.7/ansible/callbacks.py", line 148, in display
print msg2
IOError: [Errno 11] Resource temporarily unavailable*



I've tried lots of work around, and the playbook seems to work properly if I 
run it from the command line, using the same user as Jenkins.


I've also updated nproc and open file limits, and rebooted both jenkins and the 
box itself, with no success.


Did a strace of the run and I can see the error logging:


*lock_gettime(CLOCK_REALTIME, {1477026483, 732994400}) = 
0**clock_gettime(CLOCK_REALTIME, {1477026483, 733171300}) = 0
read(3, 0xc2100f9000, 4096) = -1 EAGAIN (Resource temporarily 
unavailable)
clock_gettime(CLOCK_REALTIME, {1477026483, 733531600}) = 0
write(3, "POST /v1.18/containers/f0a9b48ba"..., 465) = 465
epoll_wait(4, {{EPOLLIN|EPOLLOUT, {u32=2614059608, u64=139902583792216}}}, 128, 
0) = 1
read(3, "HTTP/1.1 404 Not Found\r\nContent-"..., 4096) = 143
clock_gettime(CLOCK_REALTIME, {1477026483, 737483000}) = 0
open("/etc/localtime", O_RDONLY)= 5
mmap(0xc21010, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0xc21010
mmap(0xc20ffe, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0xc20ffe
clock_gettime(CLOCK_REALTIME, {1477026483, 738410500}) = 0
clock_gettime(CLOCK_REALTIME, {1477026483, 738642200}) = 0
read(5, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) 
= 3661
clock_gettime(CLOCK_REALTIME, {1477026483, 738984000}) = 0
read(5, "", 4096)   = 0
close(5)= 0
clock_gettime(CLOCK_REALTIME, {1477026483, 739523600}) = 0
clock_gettime(CLOCK_REALTIME, {1477026483, 739702600}) = 0
write(2, "time=\"2016-10-21T06:08:03+01:00\""..., 99) = 99
exit_group(1)   = ?
+++ exited with 1 +++*



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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4a8efb54-eca8-44ea-bf4e-6244dafa3363%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.