Re: LDAP Plugin authentication issue

2014-10-29 Thread Gil Br
Hi,

Your answer relates to Active Directory, I'm using LDAP 389 on Linux.
Any other idea?

Gil

בתאריך יום שלישי, 28 באוקטובר 2014 16:58:34 UTC+2, מאת Gil Br:

 All,

 I installed the latest LDAP Plugin for Jenkins.
 When I use ldap://server.name I get *no* error under the LDAP Server 
 line, however when I use ldap*s*://server.name:636 I get the following 
 error:
 Unable to connect to ldaps://server.name:636 : 
 javax.naming.CommunicationException: 
 simple bind failed: server.name:636 [Root exception is 
 javax.net.ssl.SSLHandshakeException: 
 sun.security.validator.ValidatorException: 
 PKIX path building failed: 
 sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
 valid certification path to requested target]

 javax.naming.CommunicationException: simple bind failed: server.name:636 
 [Root exception is javax.net.ssl.SSLHandshakeException: 
 sun.security.validator.ValidatorException: PKIX path building failed: 
 sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
 valid certification path to requested target]
   at com.sun.jndi.ldap.LdapClient.authenticate(Unknown Source)
   at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)
   at com.sun.jndi.ldap.LdapCtx.(Unknown Source)
   at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)
   at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)
   at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)
   at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)

 In either case (ldaps or ldap) I get login failed when I try to login with my 
 NT user/password, Jenkins runs on windows.


 Am I missing something here?


 Gil



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


HowTo save the last successful build?

2014-10-29 Thread moni . schaefer . hch
Hello,

if a failed build follows follows on a successful build, the successful 
build isn´t available anymore. Is there any possibility to save the last 
successful build?

Thanks!
Monika

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


RE: HowTo save the last successful build?

2014-10-29 Thread Matthew.Webber
As far as I know, Jenkins always keeps the last successful build, even if you 
are using “discard old builds”. Are you observing something different?

From: moni.schaefer@googlemail.com [mailto:moni.schaefer@googlemail.com]
Sent: 29 October 2014 08:00
To: jenkinsci-users@googlegroups.com
Subject: HowTo save the last successful build?

Hello,

if a failed build follows follows on a successful build, the successful build 
isn´t available anymore. Is there any possibility to save the last successful 
build?

Thanks!
Monika
--
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.commailto:jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/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.
For more options, visit https://groups.google.com/d/optout.


Re: NullPointerExceptions after adding TimerTrigger via groovy script.

2014-10-29 Thread Colin McIntyre


 Old post, I know, but I just came across this issue so thought I'd add my 
 findings.  https://issues.jenkins-ci.org/browse/JENKINS-14771 looks to be 
 the same issue, the reason for the NPE is that while you've added the 
 trigger to the job you haven't told the trigger about the job.  To work 
 around it I used this code:


def job = hudson.model.Hudson.instance.getJob(My Job);
def spec = 0 0 1 * *;
hudson.triggers.TimerTrigger newCron = new 
hudson.triggers.TimerTrigger(spec);
newCron.start(job, true);
job.addTrigger(newCron);
job.save(); 

It's the call to TimerTrigger.start that sorted it for me.


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


Re: Selenium crashes Chrome when running from Jenkins

2014-10-29 Thread James Green
That's a two year-old thread. There are other issues that are similar (
https://code.google.com/p/chromedriver/issues/detail?id=928) and current.

On 28 October 2014 17:28, Tamilarasan Rajendran tamil1...@gmail.com wrote:

 Hi, I am also facing similar issue.

 I am trying to execute my automation scripts in Jenkins.

 We have 2 slave machine.. one is Win7 (OS) and other is winxp (OS).

 When i change the slave machine to winxp, my scripts works perfectly
 without any issues.

 But, when i change ti win7 OS machine, my scripts getting failed saying,

 Chrome failed to start: crashed (Driver info: chromedriver=2.9.248315,
 platform= windows NT 6.1 SP1 x86_32).

 --
 Tamilarasan.


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


Re: LDAP Plugin authentication issue

2014-10-29 Thread Maciej Jaros

Gil Br (2014-10-29 08:51):

Hi,

Your answer relates to Active Directory, I'm using LDAP 389 on Linux.
Any other idea?


Depending on your LDAP configuration you should use correct search base 
and search filter... But I'm not sure how would you use NT password if 
LDAP is on Linux? Or what do you mean by NT? I though you meant Windows 
NT password (hence I mentioned Active Directory which is kind of built 
in Windows domain).


Regards,
Nux

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


Re: How to structure Jenkins with a build that has 100's of projects?

2014-10-29 Thread Maciej Jaros

Patrick van Dissel (2014-10-29 02:35):

[...]
About the jobs structure..
It really depends how you're going to use Jenkins.
Start simpel, and only add what is nessesary.
The amount of jobs does not really matter. For your idea, with my team
we currently have a Jenkins setup of 1 master with 3 slaves running a
bit more then 1000 jobs. With multiple jobs for single
apps/libraries/.., eg. CI, Deploy, DEV, TEST, ACC, PRO, etc. Almost all
managed with JobDSL scripts.


The JobDSL sounds very interesting! But how do you configure 
authorization in a complex environment? I mean I'd like to put DSL in 
SVN, but do not want to put passwords there. So two issues really:


1. SSH authorization (executing and sending files).
2. SVN authorization.

Regards,
Nux.

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


Re: question on BUILD_ID

2014-10-29 Thread Maciej Jaros

alok kumar (2014-10-28 17:42):

Hi All,
I am using ZEN timestamp plugin to modify the BUILD_ID as per our 
requirements.
It works well when I use it any build step, but when I try using the 
changed BUILD_ID variable in the extended email build step it doesnt 
show the modified BUILD_ID, but, the default one instead.


Has anyone come across this before? If so, can you please help me to 
overcome this issue.


AFAIK changes in environment variables do not stick between steps. Not 
sure about emails, but I use values written in files to pass variables 
between steps.


Regards,
Nux.

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


Re: Jenkins CI and the accessibility of it's UI

2014-10-29 Thread doughansen08
Did you ever get a response?  Is Jenkins ADA/508 compliant?

On Wednesday, September 24, 2014 11:40:15 AM UTC-4, laura1...@gmail.com 
wrote:

 I’m not sure if this is the right forum for this request, but I was hoping 
 someone might be able to point me in the right direction…

 I was hoping someone might be able to provide a Voluntary Product 
 Accessibility Template (VPAT) or similar 
 accessibility statement for Jenkins CI.  I have included a blank VPAT for 
 reference.

 *What is a VPAT?*





 *The VPAT is a tool used to document a product's conformance with the 
 accessibility standards under Section 508 of the Rehabilitation Act. The 
 purpose of the VPAT is to assist Federal contracting officials and other 
 buyers in making preliminary assessments regarding the availability of 
 commercial Electronic and Information Technology products and services 
 with features that support accessibility. *

 *What is Section 508?*





 *Section 508, an amendment to the United States Workforce Rehabilitation 
 Act of 1973, is a federal law mandating that all electronic and information 
 technology developed, procured, maintained, or used by the federal 
 government be accessible to people with disabilities. Technology is deemed 
 to be accessible if it can be used as effectively by people with 
 disabilities as by those without. *

 Thank you in advance for all of your help.


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


Re: How to structure Jenkins with a build that has 100's of projects?

2014-10-29 Thread Patrick van Dissel
The JobDSL (currently) does not support having you global Jenkins config
files managed by the DSL. So, we have the global Jenkins configs in a
separate closed repository which we checked out manually once and is now
kept insync with a Jenkins job :). But solutions like
Puppet/Chef/Ansible could also help you there, we're skipping those
solution and are currently moving to use Docker (https://www.docker.com)
instead.

For the authorization, we use a separate Jenkins job which executes a
Groovy script. That groovy script looks at our landscape service;
- for each application
-- finds the team of that application
-- adds authentication section to the jobs
We run this job as downstream dependency of the JobDSL Seed job.

Next week I will give a talk on the JobDSL at the dutch JFall conference
(http://www.nljug.org/jfall/2014/) in The Netherlands. It will be mostly
code, showing an extensive CI and CD setup with the JobDSL. And also
showing steps how to start with the JobDSL. I will record the session
and share the slides, video and demo code afterwards.
I'll add the links here as soon as I have them shared :)

/Patrick

On 10/29/2014 12:47 PM, Maciej Jaros wrote:
 Patrick van Dissel (2014-10-29 02:35):
 [...]
 About the jobs structure..
 It really depends how you're going to use Jenkins.
 Start simpel, and only add what is nessesary.
 The amount of jobs does not really matter. For your idea, with my team
 we currently have a Jenkins setup of 1 master with 3 slaves running a
 bit more then 1000 jobs. With multiple jobs for single
 apps/libraries/.., eg. CI, Deploy, DEV, TEST, ACC, PRO, etc. Almost all
 managed with JobDSL scripts.
 
 The JobDSL sounds very interesting! But how do you configure
 authorization in a complex environment? I mean I'd like to put DSL in
 SVN, but do not want to put passwords there. So two issues really:
 
  1. SSH authorization (executing and sending files).
  2. SVN authorization.
 
 Regards,
 Nux.
 
 -- 
 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
 mailto:jenkinsci-users+unsubscr...@googlegroups.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.
For more options, visit https://groups.google.com/d/optout.


how to write goovy script for following sceanrio

2014-10-29 Thread niraj nandane
I want groovy script for following scenario.

1. I am starting build with string parameterized build . When i  run build
it will ask me value for that string parameter. Now i want to execute
groovy script in build step which will read this passed string parameter .
I want to create a a string type variable of same name as of string
parameter with value entered by user at run time.

2. My second scenario is as follows.

When i will get the name of the string parameter , i will search it in
availble list of projects and run that project .

3. My third scenario is as follows.

Suppose i was value to string parameter as project1 project2 project3 the
space seperated values, then i want to start all the three projects i.e
project1 project2 project3 build parallely using groovy script.

Any help would be greatly appreciated.
Thanks a ton in advance

-- 
Thanks and regards
Niraj Nandane(Vit pune)

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


Re: how to write goovy script for following sceanrio

2014-10-29 Thread Dirk Heinrichs
Am 29.10.2014 um 13:40 schrieb niraj nandane:

 1. I am starting build with string parameterized build . When i  run
 build it will ask me value for that string parameter. Now i want to
 execute groovy script in build step which will read this passed string
 parameter . I want to create a a string type variable of same name as
 of string parameter with value entered by user at run time.

def myVariable = build.buildVariableResolver.resolve(NAME_OF_PARAM)

HTH...

Dirk
-- 

*Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions
*Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach
*Tel*: +49 2226 159 (Ansage) 1149
*Email*: d...@recommind.com mailto:d...@recommind.com
*Skype*: dirk.heinrichs.recommind
www.recommind.com http://www.recommind.com

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


Re: question on BUILD_ID

2014-10-29 Thread Jayaprakash D B
Probably EnvInject plugin may help you..

Thanks,
JP

On Tue, Oct 28, 2014 at 10:12 PM, alok kumar alok.kuma...@gmail.com wrote:

 Hi All,
 I am using ZEN timestamp plugin to modify the BUILD_ID as per our
 requirements.
 It works well when I use it any build step, but when I try using the
 changed BUILD_ID variable in the extended email build step it doesnt show
 the modified BUILD_ID, but, the default one instead.

 Has anyone come across this before? If so, can you please help me to
 overcome this issue.

 Thanks,
 Alok

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


Re: jenkins building when it shouldn't

2014-10-29 Thread michaelw
Thanks...

So I think I've solved it...

The message : *Scheduling another build to catch up with XXX *crept into 
the build logs. 

This of course was scheduling a build (and doing it on _every_ build).

The branch to build is */master and this is what it has been for a while 
but at some point having this branch spec caused multiple builds to be 
registered.

I removed the * and made it remotes/origin/master and now I only get ONE 
build.

I am very glad I have solved the problem.

It would be nice to know why this *Scheduling another build to catch up 
with XXX *occurs (for what use case) because it only caused me major 
headaches.

On Tuesday, 28 October 2014 22:09:36 UTC+2, michaelw wrote:

 Wow... that would be great. I'm busy confirming it is unique to bitbucket. 
 I suspect it is.

 When I've narrowed it down I'll submit.

 Thanks

 On 28 October 2014 13:24, Mark Waite mark.earl.wa...@gmail.com wrote:

 I'm not sure what else could be happening in that job. Could you submit a 
 bug report, and attach the job definition for the failing job, and the 
 build logs for the cases where multiple jobs are being executed to catch 
 up, yet the same SHA1 is used in each case during the catch up?

 Thanks,
 Mark Waite

 On Tue, Oct 28, 2014 at 1:45 AM, michaelw michael.wi...@gmail.com 
 wrote:

 Sha1's for all the builds are exactly the same. 

 On Tuesday, 21 October 2014 22:34:47 UTC+2, Mark Waite wrote:

 If polling is not configured, then you'll need to read the build log of 
 each job that was run, and extract the differences between those jobs.

 Usually, changes detected means that the git plugin believes that the 
 remote repository includes a branch which matches the branches to build 
 in the job definition and which points to a SHA1 which has not yet been 
 built.  It queues a build to run a job using that SHA1.

 Thanks,
 Mark Waite

 On Tue, Oct 21, 2014 at 4:43 AM, michaelw michae...@gmail.com wrote:

 There is nothing in my polling log and I have no polling configured.

 On Monday, 6 October 2014 18:26:21 UTC+2, Mark Waite wrote:

 If you've configured branches to build to use a wild card, and if 
 there are changes on those branches compared to the last time they were 
 built, then a bunch of builds will be queued for the changes on those 
 branches.

 You might post your git polling log to show what changes it has 
 detected, or the early part of the build log to show the state of the 
 repository.

 Mark Waite

 On Mon, Oct 6, 2014 at 9:55 AM, michaelw michae...@gmail.com wrote:

 Hi All...

 Whenever I kick off a build in jenkins it queues up a bunch of 
 builds claiming that it is doing so because changes are detected.

 I have disabled all polling etc.

 I did have the commit hook on but is also disabled.

 The only change is that we have moved our git repositories to bit 
 bucket... again no commit hook configured there.

 I have also monitored the logs during a build and I don't see 
 anything unusual...

 Please can someone help me trouble shoot this. Maybe I can dial up 
 the logging so that I can work out why jenkins is behaving like this?

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




 -- 
 Thanks!
 Mark Waite
  
  -- 
 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.
 For more options, visit https://groups.google.com/d/optout.




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




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




 -- 
 see my blog: 
 http://analysis102.blogspot.com
 http://audiblethoughts.blogspot.com
 http://outsideofficehours.blogspot.com
  

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


Re: Jenkins CI and the accessibility of it's UI

2014-10-29 Thread R. Tyler Croy
(replies inline)

On Wed, 24 Sep 2014, laura1fxj...@gmail.com wrote:

 
 
 I?m not sure if this is the right forum for this request, but I was hoping 
 someone might be able to point me in the right direction?
 
 I was hoping someone might be able to provide a Voluntary Product 
 Accessibility Template (VPAT) or similar 
 accessibility statement for Jenkins CI.  I have included a blank VPAT for 
 reference.


What's the goal of such statements? Not being too informed on software
accessibility challenges and requirements, I'd like to have an understanding of
the cost/benefit for the Jenkins project to release/publish such a statement.


I would recommend adding this discussion to the next project governance
meeting's agenda:
https://wiki.jenkins-ci.org/display/JENKINS/Governance+Meeting+Agenda



- R. Tyler Croy

--
 Code: https://github.com/rtyler
  Chatter: https://twitter.com/agentdero

  % gpg --keyserver keys.gnupg.net --recv-key 3F51E16F
--


pgpIyTY0Ow0rB.pgp
Description: PGP signature


Re: Jenkins CI and the accessibility of it's UI

2014-10-29 Thread Laura1fxjunk
No I never received a response. 



 On Oct 29, 2014, at 8:02 AM, doughansen08 doughanse...@gmail.com wrote:
 
 Did you ever get a response?  Is Jenkins ADA/508 compliant?
 
 On Wednesday, September 24, 2014 11:40:15 AM UTC-4, laura1...@gmail.com 
 wrote:
 I’m not sure if this is the right forum for this request, but I was hoping 
 someone might be able to point me in the right direction…
 I was hoping someone might be able to provide a Voluntary Product 
 Accessibility Template (VPAT) or similar 
 accessibility statement for Jenkins CI.  I have included a blank VPAT for 
 reference.
 
 What is a VPAT?
 The VPAT is a tool used to document a product's conformance with the 
 accessibility standards under Section 508 of the Rehabilitation Act. The 
 purpose of the VPAT is to assist Federal contracting officials and other 
 buyers in making preliminary assessments regarding the availability of 
 commercial Electronic and Information Technology products and services 
 with 
 features that support accessibility.
 
 What is Section 508?
 Section 508, an amendment to the United States Workforce Rehabilitation Act 
 of 1973, is a federal law mandating that all electronic and information 
 technology developed, procured, maintained, or used by the federal 
 government 
 be accessible to people with disabilities. Technology is deemed to be 
 accessible if it can be used as effectively by people with disabilities as 
 by those without.
 
 Thank you in advance for all of your help.
 
 
 -- 
 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/yrcSJUOp2AU/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 jenkinsci-users+unsubscr...@googlegroups.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.
For more options, visit https://groups.google.com/d/optout.


Re: [Email-ext] Resolving email address from Cause.UserIdCause

2014-10-29 Thread Stuart Rowe
Here you go :)


import javax.mail.Message
import hudson.model.*
import com.cloudbees.plugins.flow.*
import hudson.tasks.MailAddressResolver

def getUpstreamBuild(AbstractBuild curBuild)
{
upStreamBuild = null
if(curBuild != null)
{
// find a cause that will lead to an upstream build
for( cause in curBuild.causes )
{
if(cause instanceof Cause.UpstreamCause)
{
upStreamBuild =
Hudson.instance.getItem(cause.upstreamProject).getBuildByNumber(cause.upstreamBuild)
break
}
else if(cause instanceof FlowCause)
{
upStreamBuild = cause.getFlowRun()
break
}
}
}
return upStreamBuild
}

def getUserIdCause(AbstractBuild curBuild)
{
def userIdCause = null
if (curBuild != null)
{
for( cause in curBuild.causes )
{
if(cause instanceof Cause.UserIdCause)
{
userIdCause = cause
break
}
}
}

return userIdCause
}

def getEmailFromUserId(userId)
{
email = null
user = User.get(userId, false, [:])
if(user)
{
email = MailAddressResolver.resolve(user)
}
return email
}

def getRootRequesterUserEmail()
{
try
{
// try to find a user ID cause for the current build
def userIdCause = getUserIdCause(build)
if(userIdCause != null)
{
return getEmailFromUserId(userIdCause.getUserId())
}

def rootBuild = null
def curUpstreamBuild = getUpstreamBuild(build)

// find the top level build
while(curUpstreamBuild)
{
rootBuild = curUpstreamBuild
curUpstreamBuild = getUpstreamBuild(curUpstreamBuild)
}

// try to find a user ID cause from the top level build
userIdCause = getUserIdCause(rootBuild)
if(userIdCause != null)
{
return getEmailFromUserId(userIdCause.getUserId())
}
}
catch (e)
{
println e
}
return  null
}

// update the recipients with the requester from the top level build
def userEmail = getRootRequesterUserEmail()
return userEmail


On Tue, Oct 28, 2014 at 6:17 PM, Nick Dierauf ndier...@gmail.com wrote:

 Stuart, can you post the groovy script that you use to determine the email
 address (ie, myscript.groovy)?
 Thanks!
 Nick.


 On Tuesday, March 11, 2014 11:24:37 AM UTC-7, Stuart Rowe wrote:

 Hi, does anyone know of a way to look up a user's email address from
 their user ID? I can't make the assumption that the email is 
 use...@company.com because I know this isn't always the case.

 We're using the Active Directory plugin for security which is where the
 email addresses for users are coming from. I need to manually add the
 requester to the recipient list because this doesn't seem to be propagated
 by BuildFlow FlowCauses. The relevant parts of build pipeline in this case
 is:

 BuildFlow project A (scheduled by the logged in user) -- Build Flow
 project B -- Free Style Project with an Editable Email Notification post
 build step.

 Thanks in advance,

 Stuart

  --
 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/nQtro7RisO4/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 jenkinsci-users+unsubscr...@googlegroups.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.
For more options, visit https://groups.google.com/d/optout.


auth-matrix errors after upgrade - downgrade

2014-10-29 Thread Willem Bos
Hi All,

I did an unintentional upgrade of Jenkins from version 1.532.3 to 1.565.3 
using the Long Term Support rpm's from jenkins.org. I tried to correct the 
situation by downgrading to 1.532.1.

After the downgrade matrix-auth errors are written to jenkins.log :

WARNING: Failed to scout 
hudson.security.GlobalMatrixAuthorizationStrategy$PermissionAdderImpl
java.lang.InstantiationException: 
/opt/jenkins/data/plugins/matrix-auth/WEB-INF/lib/classes.jar might need to 
be rebuilt: java.lang.ClassNotFoundException: 
hudson.security.GlobalMatrixAuthorizationStrategy$PermissionAdderImpl
at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
...

It's no longer possible to log in to Jenkins, it just dumps :

java.lang.NullPointerException
at 
hudson.security.HudsonPrivateSecurityRealm$4.isPasswordValid(HudsonPrivateSecurityRealm.java:670)
at 
hudson.security.HudsonPrivateSecurityRealm$Details.isPasswordCorrect(HudsonPrivateSecurityRealm.java:479)
at 
hudson.security.HudsonPrivateSecurityRealm.authenticate(HudsonPrivateSecurityRealm.java:178)
...

I then disabled all security by modifying config.xml, setting useSecurity 
to false and removing the authorizationStrategy and securityRealm tags. 
That got things going again, but I of course want to recover cleanly.

I don't have a lot experience with Jenkins so I am not sure what to try 
next. The Jenkins wiki mentiones that matrix-auth was split of from the 
Jenkins core, but the only rpm we ever used is the one I mentioned above. 
Any suggestions?

Regards,
Willem.

P.S. Upgrading Jenkins is not an option at this time.

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


Re: jenkins building when it shouldn't

2014-10-29 Thread Mark Waite
Were you using multiple repositories in the job?

Had the job been through any special changes which might be relevant to
understand why the code which asks the question what needs to be built to
decide that more than one SHA1 needed to be built?

Mark Waite

On Wed, Oct 29, 2014 at 8:15 AM, michaelw michael.wi...@gmail.com wrote:

 Thanks...

 So I think I've solved it...

 The message : *Scheduling another build to catch up with XXX *crept into
 the build logs.

 This of course was scheduling a build (and doing it on _every_ build).

 The branch to build is */master and this is what it has been for a while
 but at some point having this branch spec caused multiple builds to be
 registered.

 I removed the * and made it remotes/origin/master and now I only get ONE
 build.

 I am very glad I have solved the problem.

 It would be nice to know why this *Scheduling another build to catch up
 with XXX *occurs (for what use case) because it only caused me major
 headaches.

 On Tuesday, 28 October 2014 22:09:36 UTC+2, michaelw wrote:

 Wow... that would be great. I'm busy confirming it is unique to
 bitbucket. I suspect it is.

 When I've narrowed it down I'll submit.

 Thanks

 On 28 October 2014 13:24, Mark Waite mark.earl.wa...@gmail.com wrote:

 I'm not sure what else could be happening in that job. Could you submit
 a bug report, and attach the job definition for the failing job, and the
 build logs for the cases where multiple jobs are being executed to catch
 up, yet the same SHA1 is used in each case during the catch up?

 Thanks,
 Mark Waite

 On Tue, Oct 28, 2014 at 1:45 AM, michaelw michael.wi...@gmail.com
 wrote:

 Sha1's for all the builds are exactly the same.

 On Tuesday, 21 October 2014 22:34:47 UTC+2, Mark Waite wrote:

 If polling is not configured, then you'll need to read the build log
 of each job that was run, and extract the differences between those jobs.

 Usually, changes detected means that the git plugin believes that
 the remote repository includes a branch which matches the branches to
 build in the job definition and which points to a SHA1 which has not yet
 been built.  It queues a build to run a job using that SHA1.

 Thanks,
 Mark Waite

 On Tue, Oct 21, 2014 at 4:43 AM, michaelw michae...@gmail.com wrote:

 There is nothing in my polling log and I have no polling configured.

 On Monday, 6 October 2014 18:26:21 UTC+2, Mark Waite wrote:

 If you've configured branches to build to use a wild card, and if
 there are changes on those branches compared to the last time they were
 built, then a bunch of builds will be queued for the changes on those
 branches.

 You might post your git polling log to show what changes it has
 detected, or the early part of the build log to show the state of the
 repository.

 Mark Waite

 On Mon, Oct 6, 2014 at 9:55 AM, michaelw michae...@gmail.com
 wrote:

 Hi All...

 Whenever I kick off a build in jenkins it queues up a bunch of
 builds claiming that it is doing so because changes are detected.

 I have disabled all polling etc.

 I did have the commit hook on but is also disabled.

 The only change is that we have moved our git repositories to bit
 bucket... again no commit hook configured there.

 I have also monitored the logs during a build and I don't see
 anything unusual...

 Please can someone help me trouble shoot this. Maybe I can dial up
 the logging so that I can work out why jenkins is behaving like this?

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




 --
 Thanks!
 Mark Waite

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




 --
 Thanks!
 Mark Waite

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




 --
 Thanks!
 Mark Waite

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




 --
 see my blog:
 http://analysis102.blogspot.com
 http://audiblethoughts.blogspot.com
 http://outsideofficehours.blogspot.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, 

Re: ssh slaves connection timeout

2014-10-29 Thread Andras Bartl
Hi,

thank you! Yes I can confirm that using the 3.4.x kernel on the master it 
works!

Br,
Andras

On Wednesday, October 22, 2014 10:26:24 PM UTC-7, Guillaume Boucherie wrote:

 For me it was link to linux kernel used. See this bug for more information 
 : https://issues.jenkins-ci.org/browse/JENKINS-14332

 Regards

 Guillaume Boucherie

 Guillaume

 2014-10-22 23:05 GMT+02:00 Kanstantsin Shautsou kanstan...@gmail.com 
 javascript::

 Do you have any logs? In http://your_jenkins_url/log and jenkins.log ?

 On Friday, May 23, 2014 6:07:17 PM UTC+3, Guillaume Boucherie wrote:

 Hi,

 I made more tests and I find something very interesting.
 When I launch the slave with a custom script the communication between 
 master and slave never stopped.
 But when I launch the slave with Jenkins buit in ssh connection I have 
 problems.

 So maybe there is a problem in trilead-ssh2 library ?
 Anyone as an idea about this ?

 Thanks

 Guillaume


 2014-05-23 10:24 GMT+02:00 Guillaume Boucherie guillaume...@gmail.com:

 Hi,

 My slaves are on the same VPC as my master.
 I try with a very low restricted Security Group that allow all traffic 
 from all port and protocol without success.
 Anyway I will try to fixed the tcp port used as you say.
 Thanks

 Guillaume


 2014-05-22 18:32 GMT+02:00 Gareth Bowles gbo...@gmail.com:

 We have masters and slaves set up in VPC at my job.  The only thing to 
 make sure of is that the master / slave communication port is open in 
 your 
 security groups; this should be set to a fixed value via the TCP port 
 for 
 JNLP slave agents field in http://yourjenkins/configureSecurity 
 (even though the field description mentions JNLP, this port is used for 
 SSH 
 connection as well).  

 Are your slaves running in the same VPC as your master (this is the 
 case for me) ?  If not, there might be some additional network access 
 issues.


 On Thursday, May 22, 2014 5:05:25 AM UTC-7, Guillaume Boucherie wrote:

 After more research and test I find that the problem is link to AWS 
 VPC.
 I'm did a simple test, running two instance in AWS (one for master 
 and one for slave) and create a job that simply echo 1000 times Lorem 
 ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et..
 When I did this on AWS VPC I can reproduce the problem after 2-3 job 
 execution, on classic EC2 its never failed.

 Does anyone have already trying to setup a Jenkins master/slave in 
 AWS VPC ?

 Thanks

 Guillaume Boucherie


 Le lundi 5 mai 2014 11:32:23 UTC+2, Guillaume Boucherie a écrit :

 Hi,

 I'm facing very unstable ssh connection between master/slaves on my 
 Jenkins installation.
 Both master and slaves are AWS instance that run on AWS Linux system.
 After some time the ssh connection stop, current job that run are 
 freeze and failed after 15min.
 I attached the stacktrace from jenkins.log

 Does anybody face the same problem ?
 Maybe its related to ssh configuration ?
 I'm running Jenkins 1.554.1 and salve version used is 2.36.

 Thanks
 Guillaume Boucherie

  -- 
 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/hWNTI4xRy_A/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 jenkinsci-use...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



  -- 
 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/hWNTI4xRy_A/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 jenkinsci-use...@googlegroups.com javascript:.
 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.
For more options, visit https://groups.google.com/d/optout.