Re: How to implement to reboot the slave node

2013-06-25 Thread Daniel Beck
Jenkins Enterprise has the VMware Autoscaling plugin that might work for you.

http://www.cloudbees.com/jenkins-enterprise-by-cloudbees-features-vmware-auto-scaling-plugin.cb

> A very typical example of this functionality is to have Jenkins revert the VM 
> to the golden snapshot and power on in the beginning of the build, then have 
> Jenkins shut down the VM at the end of it. This allows you to always run your 
> tests in a consistently clean state.



On 25.06.2013, at 05:08, Zhouping Liu  wrote:

> Hello Everyone,
> 
> I'd like to do some special tests using jenkins-ci tool, which are executed 
> on slaves, and have the requirement to reboot the testing slaves each time, 
> as the tests need a fresh-install OS.
> 
> But I can't find any plugins to do this, my workaround is to split the job 
> into three jobs:
> 1. pre_job - dedicate to prepare the testing environment - trigger reboot_job
> 2. reboot_job - dedicate to reboot the slave - trigger post_job
> 3. post_job - dedicate to run tests
> 
> as server can't control 'reboot_job' when 'reboot_job' is running, so 
> reboot_job is always failed.
> 
> Does anyone know other methods or more better workarounds?
> 
> Thanks,
> Zhouping
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Problems trying delete project

2013-06-27 Thread Daniel Beck
Even an eager virus scanner could cause this issue.

FWIW this is the main reason my Jenkins masters are running on Linux. On 
Windows it was just too annoying, especially with job renames.

On 26.06.2013, at 19:56, "Mandeville, Rob"  wrote:

> I’m guessing that Jenkins is trying to delete a file (like the project 
> config), but Windows refuses to delete it because another process has it 
> open.  If you had the project config open in Notepad, for instance, Jenkins 
> would not be allowed to delete it.  Even if you had a window open looking to 
> see what was in the directory, you would be unable to delete the directory, 
> possibly causing this problem.
>  
> --Rob
>  
> From: jenkinsci-users@googlegroups.com 
> [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Nayana ABREU
> Sent: Wednesday, June 26, 2013 12:47 PM
> To: jenkinsci-users@googlegroups.com
> Subject: Problems trying delete project
>  
> Hi, when I try to delete a project in jenkins, the following message appears
> 
>  
> 
> 
> 
>  
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> The information in this message is for the intended recipient(s) only and may 
> be the proprietary and/or confidential property of Litle & Co., LLC, and thus 
> protected from disclosure. If you are not the intended recipient(s), or an 
> employee or agent responsible for delivering this message to the intended 
> recipient, you are hereby notified that any use, dissemination, distribution 
> or copying of this communication is prohibited. If you have received this 
> communication in error, please notify Litle & Co. immediately by replying to 
> this message and then promptly deleting it and your reply permanently from 
> your computer.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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




Re: Version Number Plugin question

2013-07-01 Thread Daniel Beck
Try clicking the question mark next to the 'Version Number Format String' text 
field, the behavior is well documented.

> The version number format string is used to generate the version number. It 
> will be passed through unaltered, except that any expression of the form 
> ${variable_name, argument} will be replaced according to the table below.


The format string '${BUILDS_ALL_TIME, }' works beautifully.

0001
0002
0003
etc.

On 01.07.2013, at 22:04, DaveS  wrote:

> Jenkins ver. 1.509.1
> Version Number Plug-In1.4.1
> 
> I am sure that the answer to this is easy, but I just haven't got it figured 
> out.  I can't get the version number to increment.  I am trying to use the 
> number to create directories to store files from the different builds.
> 
> Environment Variable Name  =  TestVersion
> Version Number Format String  =  0001
> Don't increment failed builds.
> 
> mkdir -p C:/NewBuilds/${TestVersion}
> 
> 
> TestVersion is always 0001.  Tell me what I am setting incorrectly.  Thanks.
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: EnvInject Access to Manager

2013-07-02 Thread Daniel Beck
If by 'manager' you mean the object that gives you access to the Jenkins/Hudson 
instance, the current build, and the build listener, it's specific to Groovy 
Postbuild and doesn't exist in EnvInject.

https://github.com/jenkinsci/groovy-postbuild-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/groovypostbuild/GroovyPostbuildRecorder.java

On 02.07.2013, at 13:33, Eyal  wrote:

> So.. there's no access to manager?
> 
> On Saturday, December 22, 2012 4:37:32 AM UTC+2, Matt Felzani wrote:
> Wow, talk about service. Thanks a lot for adding that ... I'm using it 
> already and loving it.
> 
> On Friday, December 21, 2012 6:52:15 PM UTC-5, gboissinot wrote:
> From EnvInject 1.75, you are able to use currentJob and currentBuild 
> variables in order to access respectively to Job and Run instances. 
> 
> On Wed, Dec 19, 2012 at 3:58 PM, Matt Felzani  wrote: 
> > Hi, 
> > 
> > I'm trying to use the EnvInject plugin. Specifically in the "Prepare an 
> > environment for the run" > "Evaluated Groovy script" I want to be able to 
> > get access to the job's BUILD_NUMBER so that I can inject a variable that 
> > is 
> > partly composed of that value. 
> > 
> > I've tried code like: 
> > def manager = binding.getVariable("manager") 
> > def buildNumber = 
> > manager.build.getEnvironment(manager.listener)['BUILD_NUMBER'] 
> > 
> > But I get an error of: 
> > [EnvInject] - [ERROR] - SEVERE ERROR occurs: No such property: manager for 
> > class: groovy.lang.Binding 
> > 
> > I've tried code like: 
> > def buildNumber = 
> > manager.build.getEnvironment(manager.listener)['BUILD_NUMBER'] 
> > 
> > But I get an error of: 
> > 
> > [EnvInject] - [ERROR] - SEVERE ERROR occurs: No such property: manager for 
> > class: Script1 
> > 
> > 
> > Is the manager - via any API call - available at the time that script runs? 
> > 
> > The following code works (and it returns the correct value), but i'm just 
> > trying to avoid having the Job's name (i.e. - "BnL Build") be hard-coded in 
> > the script: 
> > def env = Jenkins.instance.getItem("BnL 
> > Build").getLastBuild().getEnvironment() 
> > def buildNumber = env['BUILD_NUMBER'] 
> > 
> > Thanks in advance, 
> > Matt 
> 
> Attention:
> This e-mail and any files transmitted with it are confidential and intended 
> solely for the use of the individual or entity to whom they are addressed. If 
> you have received this email in error, please notify the sender immediately 
> by replying to this message, and delete the original message from your system 
> without making a copy. This e-mail is attributed to the sender and does not 
> necessarily reflect the view of Markets Pulse P.S. Ltd. or any affiliate.
>  
> Please consider the environment before printing this email.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: How to announce a plug in update for a "private" plug in?

2013-07-04 Thread Daniel Beck
You can do this using Jenkins Enterprise. It includes a 'Custom Update Center' 
plugin that can be used to distribute all (or only sanctioned) plugins 
internally, and also allows distributing your own plugins.

http://release-notes.cloudbees.com/product/Custom+Update+Center+Plugin
http://jenkins-enterprise.cloudbees.com/docs/user-guide-bundle/uc-using.html#d0e6064

AFAIK pricing is based on number of executors and masters, so if you don't have 
JE anyway, setting up a separate Jenkins instance just for update distribution 
should be pretty cheap.

On 04.07.2013, at 10:26, Steffen Breitbach  wrote:

> Hi everyone!
> 
> We have written a plug in that makes use of our company wide
> authentication infrastructure. As it will work in our company only, it
> would't be of use for anyone else and so we haven't published it.
> 
> However, as several departments in our company use this plug in, it
> would be really handy if Jenkins would look for an update as soon as it
> is release just as it does with all the other "official" plug ins.
> 
> Is there a way to do so? How can we achieve that?
> 
> Regards
>  Steffen
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 

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




Re: buildflow: node selection

2013-07-05 Thread Daniel Beck
Sounds like the default scheduler behavior. There's some information on how it 
works, but it's a bit inconsistent:

"Try to use the last used node": 
https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-Schedulingstrategy
"Prefer a specific node": 
http://jenkins-enterprise.cloudbees.com/docs/user-guide-bundle/even-scheduler.html#d0e271

But let's just say, regular jobs stick to a specific node unless they can't. 
Build flows don't use regular executors (that can be in use) so they can always 
run on the same node.

There are other scheduler implementations that might change the behavior you 
see here:

https://wiki.jenkins-ci.org/display/JENKINS/Least+Load+Plugin
http://jenkins-enterprise.cloudbees.com/docs/user-guide-bundle/even-scheduler.html

Regards,
Daniel

On 05.07.2013, at 19:16, Tom Deblauwe  wrote:

> hello list,
> 
> We are using the buildflow plugin succesfully. We have one job with 
> parameters and also associated with a label, and italso has the enable 
> concurrent builds option set. We also have multiple buildslaves with the same 
> label. We expected   that the buildflow jobs are scheduled evenly across the 
> buildslaves. however, always the same buildnode is used. with regular 
> freestyle jobs we do not have this issue. Is there a solution?
> 
> thanks,
> best regards
> Tom
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 

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




Re: Read only Configuration plugin

2013-07-05 Thread Daniel Beck
You could also skip the plugin altogether and use 
-Dhudson.security.ExtendedReadPermission=true as described here:

https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties

On 05.07.2013, at 20:14, Andrei Ababei  wrote:

> Hello,
> 
> You are not the only one. I have submitted the issue to JIRA yesterday. Here 
> is the link :
> 
> https://issues.jenkins-ci.org/browse/JENKINS-18623
> 
> Meanwhile i have switched to using the Extended Read Permision pluggin :
> 
> https://wiki.jenkins-ci.org/display/JENKINS/Extended+Read+Permission+Plugin
> 
>  It does prety much the same thing except that all the input fields and 
> controls are not disabled. It might be confusing but it is still safe to use 
> since you cannot actually save the changes.
> 
> Regards,
> AAA.
> 
> On Friday, July 5, 2013 8:25:50 PM UTC+3, Rahul k a wrote:
> Hello,
> 
> We are using Jenkins Read only configuration plugin in Jenkins v1.518 and 
> seems to be working fine. But when upgraded to v1.519 and v1.521, the plugin 
> seems to be giving below error.
> 
> Could anyone please help with this issue.
> 
> Thanks,
> Rahul
> 
> 
> java.lang.NullPointerException at 
> org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
>  at 
> org.jenkinsci.plugins.readonly.JobConfiguration.transformToReadOnly(JobConfiguration.java:113)
>  at 
> org.jenkinsci.plugins.readonly.JobConfiguration.doIndex(JobConfiguration.java:99)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:601) at 
> org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288) at 
> org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151) at 
> org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90) 
> at org.kohsuke.stapler.MetaClass$2.dispatch(MetaClass.java:156) at 
> org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at 
> org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at 
> org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384) at 
> org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at 
> org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at 
> org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241) at 
> org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) 
> at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at 
> org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at 
> org.kohsuke.stapler.Stapler.invoke(Stapler.java:583) at 
> org.kohsuke.stapler.Stapler.service(Stapler.java:214) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at 
> winstone.ServletConfiguration.execute(ServletConfiguration.java:248) at 
> winstone.RequestDispatcher.forward(RequestDispatcher.java:333) at 
> winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376) at 
> hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95) at 
> net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206) at 
> net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179) at 
> net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:86)
>  at 
> org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
>  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98) 
> at 
> hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58) 
> at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98) at 
> hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:66)
>  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98) 
> at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87) at 
> winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at 
> winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at 
> hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at 
> winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at 
> winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) 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 
> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
>  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.aceg

Re: How to announce a plug in update for a "private" plug in?

2013-07-05 Thread Daniel Beck
Just remember that the next time you're dealing with one of my support requests 
;-)

Seriously though, you guys are doing a great job.

On 04.07.2013, at 21:09, Stephen Connolly  
wrote:

> Happy to see a customer recommending us... We must be doing something right 
> ;-)
> 
> On Thursday, 4 July 2013, Daniel Beck wrote:
> You can do this using Jenkins Enterprise. It includes a 'Custom Update 
> Center' plugin that can be used to distribute all (or only sanctioned) 
> plugins internally, and also allows distributing your own plugins.
> 
> http://release-notes.cloudbees.com/product/Custom+Update+Center+Plugin
> http://jenkins-enterprise.cloudbees.com/docs/user-guide-bundle/uc-using.html#d0e6064
> 
> AFAIK pricing is based on number of executors and masters, so if you don't 
> have JE anyway, setting up a separate Jenkins instance just for update 
> distribution should be pretty cheap.
> 
> On 04.07.2013, at 10:26, Steffen Breitbach  wrote:
> 
> > Hi everyone!
> >
> > We have written a plug in that makes use of our company wide
> > authentication infrastructure. As it will work in our company only, it
> > would't be of use for anyone else and so we haven't published it.
> >
> > However, as several departments in our company use this plug in, it
> > would be really handy if Jenkins would look for an update as soon as it
> > is release just as it does with all the other "official" plug ins.
> >
> > Is there a way to do so? How can we achieve that?
> >
> > Regards
> >  Steffen
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Jenkins Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to jenkinsci-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
> >
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> 
> -- 
> Sent from my phone
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: matrix job axis with parameter

2013-07-08 Thread Daniel Beck
The best I could come up with:

try {
  context.build.buildVariables.collect { k, v -> v } + [ 'fixed' ]
} catch (Exception e) { return [ 'fixed' ] }

Seems to trigger the correct axes (in my case, the ones named for the 
parameters' values + one named 'fixed'). Note that the UI seems wrong between 
saving and the first build, showing only 'default'.

---

Note that the plugin is not sandboxed. Anyone who can configure jobs can run 
arbitrary code in the context of your Jenkins.

On 08.07.2013, at 20:23, Noah Gradovitch  wrote:

> Hi All,
> 
> I am trying to create a matrix job. 
> But while for one axis my values are predefined for the other axis my value 
> depends on 
> a parameter that the job that triggers my job pass.
> I have tried using groovy axis plugin and read this parameter by using:
> def build = Thread.currentThread().executable
> Now I get this error:
> Caught: groovy.lang.MissingPropertyException: No such property: executable 
> for class: java.lang.Threa
> From reading in google
> I guess I'm not in the right context.
> So my question is am I missing something? How can I set axis that depends on 
> a parameter from the job that trigger my job?
> 
> Thanks,
> Noa
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Template Project plugin

2013-07-10 Thread Daniel Beck
In a similar situation I defined one job ("Configuration") that created a 
.properties file with the relevant options based on job paraemters and archived 
it as artifact.

The other jobs then used the Copy Artifact plugin to get the file ("Copy from 
last successful build" uses the current option set), and a build step defined 
in Env-Inject to inject those options into the environment for subsequent build 
steps. For more flexibility, use a build selector parameter, or specify a build 
number as string parameter and copy artifacts from a 'specific build'.

On 10.07.2013, at 11:13, Maureen Barger  wrote:

> Right, thanks, we do use that and it works well. But this works best
> when one job triggers another.
> In my case the processes are fired off at different times. The same
> parameters have to be set on each top job which seems like too many
> moving parts to me.
> Ideally I could set up a job which only defines the release number and
> a couple other parameters that would be referenced by each kickoff of
> the process (ie build, deploy, test, package).
> 
> On Tue, Jul 9, 2013 at 9:52 PM, syl20bnr  wrote:
>> You should be able to do this with the Parameterized Build plugin 
>> (https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build). At work 
>> we use Perforce and we use this plugin to pass the variable P4_CHANGELIST to 
>> downstream job (with the perforce plugin configured with P4_CHANGELIST as a 
>> label). It works fine.
>> 
>> Now you write that you have several build parameters. Depending on how you 
>> use them it may lead to mess your build history with the same job called 
>> with different parameters.
>> You may want to look at Job Generation plugins like JobCopy Builder, Job DSL 
>> and Job Generator. I'm the author of the last one. :-)
>> 
>> Cheers,
>> syl20bnr
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>> 
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 

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




Re: Template Project plugin

2013-07-10 Thread Daniel Beck
How would this solve the complexity problem of manually triggering downstream 
jobs? Quoting Maureen:

> In my case the processes are fired off at different times. The same 
> parameters have to be set on each top job which seems like too many moving 
> parts to me.


---

Adding an Env-Inject build step (or build wrapper) also adds a page called 
'Environment Variables' to each build listing all defined environment variables 
for that build. It includes the ones loaded from the properties file. Of 
course, they're among 50 or so others, but it's not like that information is 
just gone.

The one advantage of actual build parameters is that they're set before SCM, so 
you can add some variables there. OTOH my approach allows triggers e.g. based 
on SCM changes without maintaining default job arguments for several different 
jobs.

---

Another option would be to register with Cloudbees (it's free) and get the 
Folders Plugin. It allows defining environment variables that are made 
available for place holders in the configuration of child jobs.

Example 1: In the folder, define 'RELEASE_NAME=foo'. In the job within the 
folder, specify the SCM URL 
'https://server/svn/branches/$RELEASE_NAME/subproject'
Example 2: In the folder, define 'RELEASE_NAME=foo'. In the job within the 
folder, specify the Env-Inject 'Inject environment variables to the build 
process' as 'RELEASE_NAME=$RELEASE_NAME' (yes, really). Then you can access the 
environment variable RELEASE_NAME from build steps.

This works best for static configuration though, like folders specific to 
branches defining the branch name to be inserted in SCM configuration. Just 
wanted to mention that option, even though the copyartifact/env-inject 
combination actually seems more appropriate.

On 10.07.2013, at 20:08, syl20bnr  wrote:

> You can also use the build parameterized trigger plugin you already use to 
> read from the property file using "Parameters from properties file". The plus 
> sides are that build parameters are recorded in build histories and the 
> values will be set before that the SCM step occurs.
> 
> Cheers,
> syl20bnr
> 
> Le mercredi 10 juillet 2013 06:16:19 UTC-4, MoBarger a écrit :
> I like it! I was thinking about a properties file but never thought of 
> creating it as an artifact! Thanks for the idea! 
> 
> On Wed, Jul 10, 2013 at 6:09 AM, Daniel Beck  wrote: 
> > In a similar situation I defined one job ("Configuration") that created a 
> > .properties file with the relevant options based on job paraemters and 
> > archived it as artifact. 
> > 
> > The other jobs then used the Copy Artifact plugin to get the file ("Copy 
> > from last successful build" uses the current option set), and a build step 
> > defined in Env-Inject to inject those options into the environment for 
> > subsequent build steps. For more flexibility, use a build selector 
> > parameter, or specify a build number as string parameter and copy artifacts 
> > from a 'specific build'. 
> > 
> > On 10.07.2013, at 11:13, Maureen Barger  wrote: 
> > 
> >> Right, thanks, we do use that and it works well. But this works best 
> >> when one job triggers another. 
> >> In my case the processes are fired off at different times. The same 
> >> parameters have to be set on each top job which seems like too many 
> >> moving parts to me. 
> >> Ideally I could set up a job which only defines the release number and 
> >> a couple other parameters that would be referenced by each kickoff of 
> >> the process (ie build, deploy, test, package). 
> >> 
> >> On Tue, Jul 9, 2013 at 9:52 PM, syl20bnr  wrote: 
> >>> You should be able to do this with the Parameterized Build plugin 
> >>> (https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build). At 
> >>> work we use Perforce and we use this plugin to pass the variable 
> >>> P4_CHANGELIST to downstream job (with the perforce plugin configured with 
> >>> P4_CHANGELIST as a label). It works fine. 
> >>> 
> >>> Now you write that you have several build parameters. Depending on how 
> >>> you use them it may lead to mess your build history with the same job 
> >>> called with different parameters. 
> >>> You may want to look at Job Generation plugins like JobCopy Builder, Job 
> >>> DSL and Job Generator. I'm the author of the last one. :-) 
> >>> 
> >>> Cheers, 
> >>> syl20bnr 
> >>> 
> >>> -- 
> >>> You received this message because you are subscribed to the Google 

Re: Fingerprinting performance

2013-07-11 Thread Daniel Beck
How big are these artifacts?

At /threadDump, you can access live stack traces. Maybe look for something 
fingerprint related during those 5 minutes, it could give you a hint what is 
taking so long.

Copy artifact works without fingerprinting in the source project, but always 
calculates its own when copying. See JENKINS-12134 and JENKINS-18653.

On 11.07.2013, at 15:06, John Vacz  
wrote:

> Recently the fingerprinting of our jubs is becoming very slow.Per build we 
> have 16 artifacts to be fingerprinted, now that alone lasts ~5 minutes. Since 
> we are using copy artifact plugin very heavily, the situation is becoming 
> even worse - the slowness adds up.
> 
> Unfortunately I cannot tell from which Jenkins version this happens, I only 
> noticed this slowness in several weeks ~ around version 1.51x, but the 
> problem might well be irrelevant to the jenkins version.
> 
> Some more background information:
> Jenkins 1.518 on Debian 6 64bit and built-in Winstone
> we have a standard job template, each git branch has one jenkins job 
> respectively, at the moment we have ~240 jobs (active + disabled). If one 
> branch is done, the jenkins job is disabled but not deleted. So we have many 
> jobs with multiple builds, and we do limit the perserved artifacts (max. 2 
> builds per job). Beside that, we have 2 long-live jobs, together ~ 700 
> builds. The number of artifacts sum up could be quite large. Although I do 
> delete (linux shell) the artifacts periodically (every several months to ~1 
> year) , I didnt touch the fingerprints/ directory ever since we first adopted 
> Hudson (5+ years). Now the fingerprints/ contains 245M data.
> 
> I suspect that the size of the fingerprint database may be the main culprit, 
> but thats only my speculation without any hard evidence. It seems that 
> Jenkins garbage collects them [1] if builds are deleted within/through 
> Jenkins. But is the fingerprint database being generally maintained?
> 
> Does the size of the fingerprint database really matter? If yes, can I just 
> delete the whole fingerprints/ without breaking the copy-artifact plugin (the 
> ability to deploy a previous build using copy-artifact is crucial for us)? Or 
> how can I reduce the size?
> 
> I might be looking at a complete wrong direction, so any help/idea is very 
> much appreciated.
> 
> -jv
> 
> [1] https://issues.jenkins-ci.org/browse/JENKINS-18417
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 

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




Re: Creating a Global View For Use as New Default View

2013-07-16 Thread Daniel Beck
You need to create new views from the home page, not the 'My Views' page. 
(Click the '+' button in the view tab bar, but you already know that)

On 16.07.2013, at 15:54, "Gottfried, Brian"  wrote:

> I’ve been attempting to change the default view in Jenkins from the “All” 
> view to  a custom view that I’ve created, but the “Configuration Settings” in 
> “Manage Jenkins” does not have the drop-down box for “default view.” After 
> some searching, I think I’ve figured out that it’s because I still only have 
> one global view and all the views I’ve created are only visible by me. 
> However, I cannot find any documentation on HOW to create a global view: 
> there is no option in the “edit view” section to make it visible to everyone. 
> Am I missing something really obvious here?
>  
> --Brian
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Help to find a log parser

2013-07-17 Thread Daniel Beck
Use https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin

Look for BUILD_LOG_REGEX in the 'Content Token Reference' of the post-build 
action.

On 16.07.2013, at 23:57, Eduardo Dias  wrote:

> Hi All,
> 
> I am trying to find an example to get a part of console log based on a regex 
> to send by email.
> 
> who can help me?
> 
> Thanks
> 
> Eduardo
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: SEVERE: The server rejected the connection: SSH-2.0-OpenSSH_5.3

2013-07-17 Thread Daniel Beck
"SSH-2.0-OpenSSH_5.3" is the return message the server sends to the slave when 
it attempts to handshake. It's part of the error message because it's 
unexpected, and to give you an idea what's going on.

For some reason, on the port the node tries to connect to, an SSH Server is 
running. It's not the internal Jenkins SSH server, it'd send 
'SSH-2.0-SSHD-CORE-0.8.0' instead (on 1.509.2).

Are other slaves able to connect? What happens when you change the TCP port for 
JNLP slaves?

On 17.07.2013, at 00:04, Sameh Tawfik  wrote:

>  
> We're using Jenkins 1.522, both the master and the slave are linux systems. 
> When, I try launch the salve node from the command line I get an error "The 
> server rejected the connection: SSH-2.0-OpenSSH_5.3"
>  
> I can  successfully ssh to the master server from the slave system.
>  
> I verified we do not have firewall issue to cause this problem, so is this a 
> specific port issue? 
> •
> • Run from slave command line:
> java -jar slave.jar -jnlpUrl 
> http://node20v:8080/computer/build1/slave-agent.jnlp -secret 
> c55ae2703cc4b8a4364738a78dba820db2fcb11580314b1917e4fcbcb4b8458f
> • .
> • .
> • INFO: Handshaking
> Jul 16, 2013 2:41:57 PM hudson.remoting.jnlp.Main$CuiListener error
> SEVERE: The server rejected the connection: SSH-2.0-OpenSSH_5.3
> java.lang.Exception: The server rejected the connection: SSH-2.0-OpenSSH_5.3
> at hudson.remoting.Engine.onConnectionRejected(Engine.java:274)
> at hudson.remoting.Engine.run(Engine.java:249)
> •  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Subversion null pointer exception integrating feature branch

2013-07-18 Thread Daniel Beck
svnmerge plugin relies[1] on behavior of SVNKit that was changed[2]. It can no 
longer handle a null SVNErrorMessage argument.

1: 
https://github.com/jenkinsci/svnmerge-plugin/blob/master/src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java#L273
2: 
https://github.com/jenkinsci/svnkit/commit/a0db9106742de1411a673625e56a4c784b0986da

You should probably file a bug against the svnmerge component in Jira (or fix 
it yourself).

On 18.07.2013, at 04:45, gilbertc...@gmail.com wrote:

> Hi all,
> 
> I am new to using Jenkins.
> 
> I am working to automate my puppet module builds and wanted to be able to 
> allow integration from my feature branches to my trunk.
> 
> However, the first integration works perfectly.  After that, subsequent 
> integration attempts fail with the following:
> 
> java.lang.NullPointerException
> at org.tmatesoft.svn.core.SVNException.(SVNException.java:50)
> at org.tmatesoft.svn.core.SVNException.(SVNException.java:37)
> at 
> jenkins.plugins.svnmerge.FeatureBranchProperty$2.invoke(FeatureBranchProperty.java:273)
> at 
> jenkins.plugins.svnmerge.FeatureBranchProperty$2.invoke(FeatureBranchProperty.java:247)
> at hudson.FilePath.act(FilePath.java:906)
> at hudson.FilePath.act(FilePath.java:879)
> at 
> jenkins.plugins.svnmerge.FeatureBranchProperty.integrate(FeatureBranchProperty.java:247)
> at 
> jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:141)
> at 
> jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:130)
> at 
> jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:34)
> at 
> jenkins.plugins.svnmerge.AbstractSvnmergeTaskAction$WorkerThread.perform(AbstractSvnmergeTaskAction.java:105)
> at hudson.model.TaskThread.run(TaskThread.java:127)
> at 
> jenkins.plugins.svnmerge.AbstractSvnmergeTaskAction$TaskImpl$1.run(AbstractSvnmergeTaskAction.java:161)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:247)
> 
> Thanks for the 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/groups/opt_out.
>  
>  

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




Re: Subversion null pointer exception integrating feature branch

2013-07-18 Thread Daniel Beck
... or just vote for or sponsor the existing 
https://issues.jenkins-ci.org/browse/JENKINS-16723

On 18.07.2013, at 23:28, Daniel Beck  wrote:

> svnmerge plugin relies[1] on behavior of SVNKit that was changed[2]. It can 
> no longer handle a null SVNErrorMessage argument.
> 
> 1: 
> https://github.com/jenkinsci/svnmerge-plugin/blob/master/src/main/java/jenkins/plugins/svnmerge/FeatureBranchProperty.java#L273
> 2: 
> https://github.com/jenkinsci/svnkit/commit/a0db9106742de1411a673625e56a4c784b0986da
> 
> You should probably file a bug against the svnmerge component in Jira (or fix 
> it yourself).
> 
> On 18.07.2013, at 04:45, gilbertc...@gmail.com wrote:
> 
>> Hi all,
>> 
>> I am new to using Jenkins.
>> 
>> I am working to automate my puppet module builds and wanted to be able to 
>> allow integration from my feature branches to my trunk.
>> 
>> However, the first integration works perfectly.  After that, subsequent 
>> integration attempts fail with the following:
>> 
>> java.lang.NullPointerException
>>at org.tmatesoft.svn.core.SVNException.(SVNException.java:50)
>>at org.tmatesoft.svn.core.SVNException.(SVNException.java:37)
>>at 
>> jenkins.plugins.svnmerge.FeatureBranchProperty$2.invoke(FeatureBranchProperty.java:273)
>>at 
>> jenkins.plugins.svnmerge.FeatureBranchProperty$2.invoke(FeatureBranchProperty.java:247)
>>at hudson.FilePath.act(FilePath.java:906)
>>at hudson.FilePath.act(FilePath.java:879)
>>at 
>> jenkins.plugins.svnmerge.FeatureBranchProperty.integrate(FeatureBranchProperty.java:247)
>>at 
>> jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:141)
>>at 
>> jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:130)
>>at 
>> jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:34)
>>at 
>> jenkins.plugins.svnmerge.AbstractSvnmergeTaskAction$WorkerThread.perform(AbstractSvnmergeTaskAction.java:105)
>>at hudson.model.TaskThread.run(TaskThread.java:127)
>>at 
>> jenkins.plugins.svnmerge.AbstractSvnmergeTaskAction$TaskImpl$1.run(AbstractSvnmergeTaskAction.java:161)
>>at hudson.model.ResourceController.execute(ResourceController.java:88)
>>at hudson.model.Executor.run(Executor.java:247)
>> 
>> Thanks for the 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/groups/opt_out.
>> 
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 

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




Re: strange heap space

2013-07-19 Thread Daniel Beck
IIRC a few years ago I experienced an issue with very large artifacts being 
uploaded to an artifact repository. maven-deploy-plugin couldn't handle files 
larger than one third of the available heap space.

On 19.07.2013, at 12:09, Raouf  wrote:

> Hi there,
> 
> I'm getting a java heap space that i can't really explain. i tried to 
> increase the memory allocated to jenkins, but that doesn't change a thing
> 
> The most strange thing, is that i configured jenkins to not launch sonar 
> analysis if the build fails, but sonar analysis is launched anyway, goes 
> sucessful, and then the build is red !
> 
> I even tryied to montir the execution of this build with visual VM remotely 
> connected to jenkins, but didn't see any heap space error at any moment.
> 
> here's the corresponding log
> 
> Uploading: 
> http://server/archiva/repository/snapshot/project-SNAPSHOT/project-SNAPSHOT-bin.tar.gz
> 
> [JENKINS] Archiving /basepath/hudson/workspace/
> project/package/pom.xml to 
> /basepath/hudson/jobs/project/modules/package$module/builds/2013-07-18_14-08-50/archive/package/module/version-SNAPSHOT/module-version-
> SNAPSHOT.pom
> [JENKINS] Archiving /basepath/hudson/workspace/
> project/package/targetproject-version-SNAPSHOT.jar to 
> /basepath/hudson/jobs/project/modules/package$module/builds/2013-07-18_14-08-50/archive/package/module/version-SNAPSHOT/project-version-
> SNAPSHOT.jar
> [JENKINS] Archiving /basepath/hudson/workspace/
> project/package/target/project-version-SNAPSHOT-bin.tar.gz to 
> /basepath/hudson/jobs/project/modules/package$module/builds/2013-07-18_14-08-50/archive/package/module/version-SNAPSHOT/project-version-
> SNAPSHOT-bin.tar.gz
> [INFO] --
> --
> 
> 
> [ERROR] FATAL ERROR
> 
> [INFO] 
> 
> [INFO] Java heap space
> [INFO] --
> --
> 
> [INFO] Trace
> java.lang.OutOfMemoryError: Java heap space
>   at java.util.Arrays.copyOf(
> Arrays.java:2786)
>   at java.io.ByteArrayOutputStream.
> write(ByteArrayOutputStream.
> java:94)
>   at sun.net.www.http.
> PosterOutputStream.write(
> PosterOutputStream.java:61)
>   at org.apache.maven.wagon.
> AbstractWagon.transfer(
> AbstractWagon.java:338)
>   at org.apache.maven.wagon.
> AbstractWagon.transfer(
> AbstractWagon.java:305)
>   at org.apache.maven.wagon.
> AbstractWagon.transfer(
> AbstractWagon.java:267)
>   at org.apache.maven.wagon.
> AbstractWagon.putTransfer(
> AbstractWagon.java:238)
>   at org.apache.maven.wagon.
> StreamWagon.put(StreamWagon.
> java:143)
>   at org.apache.maven.wagon.
> providers.http.LightweightHttpWagon.put(
> LightweightHttpWagon.java:148)
>   at org.apache.maven.artifact.
> manager.DefaultWagonManager.putRemoteFile(
> DefaultWagonManager.java:244)
>   at org.apache.maven.artifact.
> manager.DefaultWagonManager.putArtifact(
> DefaultWagonManager.java:160)
>   at org.apache.maven.artifact.
> deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:
> 80)
>   at org.apache.maven.plugin.
> deploy.DeployMojo.execute(
> DeployMojo.java:169)
>   at org.apache.maven.plugin.
> DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:451)
>   at hudson.maven.agent.
> PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:
> 182)
>   at org.apache.maven.lifecycle.
> DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
> 558)
>   at org.apache.maven.lifecycle.
> DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:
> 499)
>   at org.apache.maven.lifecycle.
> DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:
> 478)
>   at org.apache.maven.lifecycle.
> DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:
> 330)
>   at org.apache.maven.lifecycle.
> DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:
> 291)
>   at org.apache.maven.lifecycle.
> DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:
> 142)
>   at org.apache.maven.lifecycle.
> LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.
> java:65)
>   at org.apache.maven.DefaultMaven.
> doExecute(DefaultMaven.java:
> 336)
>   at org.apache.maven.DefaultMaven.
> execute(DefaultMaven.java:129)
>   at org.apache.maven.cli.MavenCli.
> main(MavenCli.java:287)
>   at sun.reflect.
> NativeMethodAccessorImpl.
> invoke0(Native Method)
>   at sun.reflect.
> NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>   at sun.reflect.
> DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
> java:25)
>   at java.lang.reflect.Method.
> invoke(Method.java:597)
>   at org.codehaus.classworlds.
> Launcher.launchEnhanced(
> Launcher.java:315)
>   at org.codehaus.classworlds.
>

Re: Tying upstream/downstream projects execution nodes by name?

2013-07-21 Thread Daniel Beck
The combination Parameterized Trigger plugin + NodeLabel Parameter plugin might 
work. The environment variable 'NODE_NAME' stores the name of the node.

On 21.07.2013, at 04:59, Olexij Tkatchenko  
wrote:

> How to implement a dynamic selection of a node for downstream project based 
> on name of the node of upstream project? For example, if the node for the 
> upstream project is called "node1" then the node for the downstream project 
> should be called "node11", for "node2" - "node21" and so on.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Readonly job parameters

2013-07-21 Thread Daniel Beck
envinject plugin does this. But not visible as 'fake' job parameters.

On 21.07.2013, at 15:49, Pete  wrote:

> No, that I am aware of.  I've been kind of thinking about something similar 
> but more of like a set of variables that can be defined with the job, and 
> then referenced in multiple places within the job configuration.
> 
> 
> On Sun, Jul 21, 2013 at 1:17 AM, Thomas Fields  
> wrote:
> Hi there,
> 
> In my job configs I've been ticking the "This build is parameterized" box and 
> then using the String parameter option. I can then use my new parameter 
> through most of my job setup and so far this has been working great.
> 
> I'm now in a situation where I want my String parameter to be uneditable. So 
> when the user clicks the Build Now link, I want to display what the parameter 
> is set to but not let the user change it. Is it possible to do this?
> 
> Cheers,
> Tom
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Readonly job parameters

2013-07-22 Thread Daniel Beck
An actual use case for this might be helpful. Right now, this looks a lot like 
an XY problem [1].

Also, a possible solution is a Choice parameter with only one value to select. 
But note that e.g. Parameterized Trigger will just override this when you 
specify a different value there, so it's on the UI only.

1: http://www.perlmonks.org/?node_id=542341

On 21.07.2013, at 22:53, Thomas Fields  wrote:

> >>No, that I am aware of. I've been kind of thinking about something similar
> but more of like a set of variables that can be defined with the job, and
> then referenced in multiple places within the job configuration.
> Yeah, something like this would be perfect for my needs. 
> 
> Surely it's not too difficult to add a new "read only string parameter" to 
> the parameter options in the job description then display it but obviously 
> don't let the user edit it. Did you enter this in Jira already?
> 
> Cheers
> Tom
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Including changelog

2013-07-22 Thread Daniel Beck
You could use emailext to record changes in the actual build:
1. Create an email with the changes on build success, and check to store the 
email in the workspace ("Save Generated E-mail to Workspace"). Not sure whether 
you need actual recipients if you check that option.
2. Copy that with the build results to the upload job, and use the ${FILE} 
macro in the upload job's emailext.

Alternatively, you can probably use the Any Build Step plugin to add a shell 
script builder to your job as a post-build action (since you mentioned that).

On 22.07.2013, at 17:08, Maureen Barger  wrote:

> We have a maven build of several artifacts. These artifacts are FTP'd
> nightly at 9pm as a separate job from the build. We would like to
> include the changes since last build with our upload.
> 
> Issues:
> Since it's a maven job, I can't execute a shell command at build.
> I've installed Changes Since Last Success Plugin but I am not seeing
> it in the build menu of any new job I create, and since this is a
> maven job, I don't have the build option anyway.
> I have the mail-ext plugin installed and it does great to send out the
> email to interested parties when the FTP upload is complete. And it
> even has a changelog feature but since the build job (which would
> actually contain the changes) and the FTP job are separate, the
> changelog feature is meaningless here.
> 
> Ideally I would like to send a changelog since last upload but a
> changelog of that release, just added on to the file as we go, would
> suffice as well.
> 
> Any suggestions?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 

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




Re: [1.509.2 LTS] Job changing oprations take ages to finish

2013-07-23 Thread Daniel Beck
Try accessing /threadDump in another browser tab while it's saving, and search 
for '/configSubmit' -- it'll give you an idea why it takes so long.

I was experiencing a similar issue a few days ago. Are you using Job Config 
History plugin, maybe Copy Artifact plugin as well? There's a bug in Copy 
Artifact's current release that was fixed in 
https://github.com/jenkinsci/copyartifact-plugin/commit/f149daaaf26d83c4126f13b41e4965997ed3c45a
 which caused all projects to be saved whenever one was renamed.

Job Config History's implementation of 'Do not save duplicate history' is 
rather inefficient, as it checks every existing history entry of the item 
you're saving. If your instance has a few thousand history entries for the 
global config.xml, that'll cause saving that to take quite long. And if you 
rename jobs, with Copy Artifact causing all jobs to be saved... well...

If it's indeed the save listener in Job Config History, consider one or more of 
the following:

- Limit history to fewer entries than you have now (check the folders on disk 
for the number of saved states)
- Update Copy Artifact to a snapshot with the linked fix
- Disable 'Do not save duplicate history'

On 23.07.2013, at 14:22, Steffen Breitbach  wrote:

> Hi everyone!
> 
> We're running 1.509.2 LTS inside a Tomcat 6.0.36 with Java 7u25-b15
> (altough we also had this problem with 1.509.1 and 7u09) on a Linux
> machine.
> 
> Operations that change jobs like changing the configuration or renaming
> take ages to finish. Eventually the action will terminate, but it takes
> 10 minutes or more to finish.
> 
> There is no evidence in the Jenkins logs, System load is reasonalby low
> and I can't detect any deadlocked threads.
> 
> I already tried to get a full heap dump but this will crash the VM after
> only a few megabytes.
> 
> Do you have any idea what might be happening?
> 
> Regards
>  Steffen
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 

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




Re: Alter/Remove "All" view in "My Views"

2013-07-26 Thread Daniel Beck
> The strange thing is that people seem to be able to access "Configure"
> only when being an Admin user. "Normal" users aren't allowed to do so
> (we're running 1.509.2 LTS).

I just set up a 1.509.2 test instance from scratch. My 'reader' user 
(permisisons Overall/Read, Job/Read when using Matrix-based security) can 
create new views for himself and has access to configuring himself (including 
the default 'My View') at /user/username/configure. Are you sure they're not 
clicking on 'My Views' instead of their user name?

> Apart from that this enables you only to choose the default view but not
> to change or even delete the "All" view.

It's similar to the global 'All' view: Configure a different one as default to 
be able delete it afterwards. To rename, delete 'All' and then add it again. 
Apart from that, 'All' has no configuration. 

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




Re: Reconfiguring JDK oracle account/pass

2013-07-27 Thread Daniel Beck
You could try changing it where you first set it: 
http://hostname/descriptorByName/hudson.tools.JDKInstaller/enterCredential

On 27.07.2013, at 17:38, mylif...@gmail.com wrote:

> Does anyone know of a way to reconfigure the oracle account/pass combination 
> when adding JDKs automatically via the Jenkins configuration interface once 
> they've been set?  I had to update my Oracle info and can't seem to find any 
> mechanism that allows me to re-enter the info inside Jenkins configuration, 
> and subsequently all the JDK installs in my builds fail as a result.  Jenkins 
> appears to be storing this information somewhere on the first input and never 
> allowing me to re-access it.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Block upstream parameterized jobs, but don't trigger a new job?

2013-07-29 Thread Daniel Beck
You could also set up slave nodes specific to these jobs and give them only one 
executor each, preventing parallel execution of jobs. I've been using this 
approach for more than two years on a number of systems for preventing parallel 
executions of tools that couldn't handle that.

On 29.07.2013, at 15:48, Andreas Ebbert-Karroum  wrote:

> Hi,
> 
> I am out of ideas at the moment. I am replacing a home-grown build solution, 
> that had the unique capability of only running one job at any given time. The 
> first step is to get rid of that home-grown system, changes and improvements 
> to the build process will surely follow. 
> 
> Since only one build can run at any given time, there are tools, that 
> schedule many parameterized jobs that depend on each other. To compensate for 
> that feature there are three paralell (home-grown) build servers available.
> 
> I have a problem to simulate that with jenkins. I do have parameterized jobs. 
> First I thought that I model the dependencies via up-/downstream projects and 
> just use "Block build when upstream project is building", but this has the 
> effect, that the downstream-project is built twice. First with the correct 
> parameters, triggered by the external tool. The second time, after the 
> upstream project finished.
> 
> So, another solution could be the Locks & Latches plugin, but that either 
> ends up in a) a lock that blocks each and every related job or b) a very 
> difficult lock setup (basically a lock for every library, like lock_library, 
> which is then used in every job that produces or depends on library_foo)
> 
> To end in a specific question: is it possible to block a downstream, 
> parameterized job, while the upstream job is still running, without 
> triggering a new instance of that job?
> 
> Thanks for your help,
> Andreas
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Log message missing correct SVNExternalDetails.toString() information

2013-07-31 Thread Daniel Beck
This was fixed a month ago in the Subversion plugin:

https://github.com/jenkinsci/subversion-plugin/commit/5dce1f171869ade40d3558dc187a1cdf246f3d32

No release since, so you could use a snapshot build to fix it in your Jenkins.

On 31.07.2013, at 16:52, Hartmut Kühn  wrote:

> Hi all,
>  
> I don’t know, if this is the right place to send this.
>  
> I am missing correct SVNExternalsDetails.toString() information in my build 
> logs, when using SVN externals:
>  
> AUtools\SetupTools\lib\jdom\jdom-1.1.1.jar
> AUtools\SetupTools\lib\jdom\jdom-1.1.1.zip
> Hole 
> 'hudson.scm.subversion.SubversionUpdateEventHandler$SVNExternalDetails@6156d8'
>  aus Revision 627 in Datei 'D:\Programme\Jenkins\jobs\...
> At revision 627
> AUtools\SetupTools\lib\jtds\jtds-1.2.5.jar
> Hole 
> 'hudson.scm.subversion.SubversionUpdateEventHandler$SVNExternalDetails@11d1c59'
>  aus Revision 627 in Datei 'D:\Programme\Jenkins\jobs\...
> At revision 627
> AUtools\SetupTools\lib\ojdbc\ojdbc6.jar
> Hole 
> 'hudson.scm.subversion.SubversionUpdateEventHandler$SVNExternalDetails@1e4d80b'
>  aus Revision 627 in Datei 'D:\Programme\Jenkins\jobs\...
> At revision 627
>  
> I am using Jenkins 1.518.
>  
> I was not sure which component to use in Jenkins JIRA. Maybe someone familiar 
> with this can post this into the right section.
>  
> Best regards
> 
> i.A. Hartmut Kühn
> Software Developer
> Product Development
>  
> OPTIMAL SYSTEMS GmbH
> - Unternehmenszentrale -
> Cicerostraße 26, 10709 Berlin
> Tel.: +49 30 895708-0
> E-Mail: ku...@optimal-systems.de
> Web: www.optimal-systems.de
>  
> 
> Alle Informationen zum Award finden Sie in unserem Newsroom.
>  
> Lesen Sie den aktuellen OPTIMAL SYSTEMS Newsletter – hier können Sie ihn 
> abonnieren:
> http://www.optimal-systems.de/newsletter
>  
> Folgen Sie uns auf twitter und werden Sie Facebook-Freund:
> Twitter: www.twitter.com/optimalsystems
> Facebook: www.facebook.com/optimalsystems
>  
> Sitz der Gesellschaft: Berlin 
> HRB 38 560 Amtsgericht Charlottenburg - USt-IdNr.: DE 136 722 551 
> Geschäftsführer: Karsten Renz
>  
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Plugin installation by hand doesn't work

2013-08-01 Thread Daniel Beck
What's in the log (/var/log/jenkins/jenkins.log probably)?

Did you get the permissions of the files right?

On 01.08.2013, at 18:13, Avihay Eyal  wrote:

> Hi, I copied mercurial and xunit hpi files to /var/lib/Jenkins/plugins as a 
> manual installation (I'm working in a private network - no access to the 
> internet),
> and I restarted Jenkins. 
> 
> It seems that the new plugins aren't used by Jenkins, since I don't see them 
> in the "pluginManager/available" tab, and
> I also don't see the mercurial SCM option when I'm trying to choose SCM for 
> my software project.
> 
> Any ideas? 
> 
> 
> Thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Jenkins multi-configuration project

2013-08-01 Thread Daniel Beck
You have no slaves, so there's no reason to present this option (or 'Label 
expression').

On 01.08.2013, at 20:02, Laura McCord  wrote:

> I have been looking at examples on setting up multi-configuration projects. 
> What I have seen is the use of "Slave axis" under the Configuration Matrix 
> but I don't have that option under the drop-down menu. I also can't seem to 
> find it under the plugins to add it. 
> 
> Any suggestions?
> 
> Laura
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Newbie question: Build Flow Plugin and Multiple Nodes

2013-08-01 Thread Daniel Beck
AFAICT your syntax is wrong. From the Wiki:

parallel (
// job 1, 2 and 3 will be scheduled in parallel.
{ build("job1") },
{ build("job2") },
{ build("job3") }
)

Note the extra braces. That's probably why it's not actually parallel.

The build flow itself is "lightweight", which means it uses a dynamically 
created executor. There should be no number next to the flow in the executors 
list. If there is, that's a bug (it happens to me when I set a label expression 
while the flow is in the queue, waiting for a matching executor).

On 01.08.2013, at 16:17, Bob Bick  wrote:

> Hi,
>  
> We have a Build Flow that runs two jobs in parallel.
>  
> DSLè
>  
>   parallel {
>  build('job1’)
>  build('job2’)
>   }
>  
> When I run the build flow, it always runs the jobs on the same node. Since 
> each node has a max executors equal to 2, job1 and job2 execute serially 
> (i.e. the Build Flow job and one of the sub-jobs run at the same time).
>  
> Since we have idle nodes, I was expecting job1 and job2 to run on different 
> nodes.
>  
> Any ideas why these two jobs would run on the same node? Maybe I am missing 
> something here?
>  
> Thanks,
> Bob
> 
> *** *** ***
> This message contains information which may be confidential and privileged. 
> Unless you are the addressee (or authorized to receive for the addressee), 
> you may not use, copy or disclose to anyone the message or any information 
> contained in the message. If you have received the message in error,  please 
> advise the sender by reply e-mail and delete the message.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Newbie question: Build Flow Plugin and Multiple Nodes

2013-08-01 Thread Daniel Beck
Figured it out. You specified one parallel 'lane' that executes two builds in 
sequence.

The example from the wiki has three 'lanes', with one job each.

Something like the following is also possible:

parallel (
{
 build('j1')
 build('j2')
}, {
 build('j3')
})

... which builds three jobs in two 'lanes', j1 before j2.

On 01.08.2013, at 20:26, Daniel Beck  wrote:

> AFAICT your syntax is wrong. From the Wiki:
> 
> parallel (
> // job 1, 2 and 3 will be scheduled in parallel.
>{ build("job1") },
>{ build("job2") },
>{ build("job3") }
> )
> 
> Note the extra braces. That's probably why it's not actually parallel.
> 
> The build flow itself is "lightweight", which means it uses a dynamically 
> created executor. There should be no number next to the flow in the executors 
> list. If there is, that's a bug (it happens to me when I set a label 
> expression while the flow is in the queue, waiting for a matching executor).
> 
> On 01.08.2013, at 16:17, Bob Bick  wrote:
> 
>> Hi,
>> 
>> We have a Build Flow that runs two jobs in parallel.
>> 
>> DSLè
>> 
>>  parallel {
>> build('job1’)
>> build('job2’)
>>  }
>> 
>> When I run the build flow, it always runs the jobs on the same node. Since 
>> each node has a max executors equal to 2, job1 and job2 execute serially 
>> (i.e. the Build Flow job and one of the sub-jobs run at the same time).
>> 
>> Since we have idle nodes, I was expecting job1 and job2 to run on different 
>> nodes.
>> 
>> Any ideas why these two jobs would run on the same node? Maybe I am missing 
>> something here?
>> 
>> Thanks,
>> Bob
>> 
>> *** *** ***
>> This message contains information which may be confidential and privileged. 
>> Unless you are the addressee (or authorized to receive for the addressee), 
>> you may not use, copy or disclose to anyone the message or any information 
>> contained in the message. If you have received the message in error,  please 
>> advise the sender by reply e-mail and delete the message.
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>> 
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 

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




Re: CI usability - isn't there a problem that tests are executed only after a developer pushed his changed to the repsitory?

2013-08-01 Thread Daniel Beck
There's a commercial plugin that does this if you're using Git:

http://www.cloudbees.com/jenkins-enterprise-by-cloudbees-features-validated-merge-plugin.cb

Developers push to Jenkins' repository, and if that's successful, Jenkins 
pushes to your actual repo.

On 01.08.2013, at 09:16, Avihay Eyal  wrote:

> I mean, If I'm a developer, I would prefer to somehow run the automated tests 
> before I push to the repository, cause
> if an automated test failed and there's a bug in my code, I want to know that 
> before pushing my change...
> 
> How do you approach this problem?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Jenkins server will not start after upgrade to 1.524 or 1.525, would appreciate any help.

2013-08-04 Thread Daniel Beck
See e.g.

https://issues.jenkins-ci.org/browse/JENKINS-18922
https://issues.jenkins-ci.org/browse/JENKINS-19000

Did you disable bundled plugins, like e.g. the Maven plugin?

On 04.08.2013, at 23:15, Stuart Whelan  
wrote:

> Hi folks,
> 
> I was/am running 1.522 on a windows server 2008R2 64bit system using winstone.
> 
> Last week I tried to upgrade to 524, and had to roll back as jenkins wouldn't 
> start afterwards.
> 
> Today I tried 525 and the same thing happened. 
> 
> A gist of the error log is: 
> https://gist.github.com/StuartWhelan/2822683c9293f6b00c89
> 
> Can anyone help?
> 
> Thanks!
> Stuart
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Build Flow DSL parallel

2013-08-05 Thread Daniel Beck
Read the exception carefully: It's simply a typo in 'paralllel'. Please also 
consider providing a actual, complete, minimal example next time. The syntax 
errors in what you called "snippet" were a bit confusing.

For reference, the following complete DSL works like a charm ('empty' and 
'empty2' are projects that just run 'sleep 10' or something similar):
-
def myBuild(def b, def skip, def ign) {
if (skip) {
println "Skipping "+b
} else {
println "Building "+b
if (ign) {
ignore(FAILURE) {
build(b)
}
} else {
build(b)
}
}
}

parallel (
  { myBuild('empty2', true, false) },
  { myBuild('empty', false, true) },
  { myBuild('empty2', false, false) }
)
-

On 05.08.2013, at 16:39, Bob Bick  wrote:

> Hi,
>  
> When running a Build Flow DSL with parallel jobs, I am getting the following 
> error message:
>  
> ERROR: Failed to run DSL Script
> groovy.lang.MissingMethodException: No signature of method: 
> com.cloudbees.plugins.flow.FlowDelegate.paralllel() is applicable for 
> argument types: (Script1$_executeBuild_closure4, 
> Script1$_executeBuild_closure5) values: 
> [Script1$_executeBuild_closure4@71be63, 
> Script1$_executeBuild_closure5@18a621e]
> Possible solutions: parallel([Lgroovy.lang.Closure;), 
> parallel(java.util.Collection), parallel(java.util.Map)
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>  at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>  at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>  at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
>  
> I understand why I am getting this error… it makes total sense… but let me 
> explain what I am trying to do…
>  
> I encapsulated builds in a method named ‘myBuild’ so that I did not have to 
> repeat DSL logic (i.e. I can skip and ignore steps based on properties).
>  
> myBuild(projectMap,releaseBuild) {
> if (projectMap['skip']) {
> println "Skipping "+projectMap['name']+" "+projectMap
> } else {
> println "Building "+projectMap+" ; releaseBuild=${releaseBuild}"
> if (projectMap['ignore']) {
> ignore(FAILURE) {
> build(projectMap['jenkinsProject'], 
> GIT_BRANCH_OR_TAG:projectMap['branch'], RELEASE_BUILD: releaseBuild)
> }
> } else {
> build(projectMap['jenkinsProject'], 
> GIT_BRANCH_OR_TAG:projectMap['branch'], RELEASE_BUILD: releaseBuild)
> }
> }
> }
>  
> Then, my DSL was very simple:
>  
> // set up a project Map that specifies whether to ignore failures or skip 
> steps. Also, set up the releseBuild Boolean parameter.
> …
> // Here is a snippet of DSL code that “blows up” with 
> groovy.lang.MissingMethodException
> parallel {
>   { myBuild(projectMap[‘project1’],releaseBuild) },
>   { myBuild(projectMap[‘project2’],releaseBuild) },
>   { myBuild(projectMap[‘project3’],releaseBuild) }
> }
>  
> Using my technique, the DSL is concise and very flexible. This is my first 
> time using the Build Flow Plugin so I am wondering whether anyone else had 
> tried to do this type of thing and whether they found a workaround… I know I 
> can get it to work without using the myBuild method; however, if I could make 
> use of that method, it would greatly simplify the DSL and make it much more 
> maintainable.
>  
> Any ideas?
>  
> Thanks for taking the time to read this.
>  
> Bob
> 
> *** *** ***
> This message contains information which may be confidential and privileged. 
> Unless you are the addressee (or authorized to receive for the addressee), 
> you may not use, copy or disclose to anyone the message or any information 
> contained in the message. If you have received the message in error,  please 
> advise the sender by reply e-mail and delete the message.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Automatically creating a job inside a folder

2013-08-06 Thread Daniel Beck
Try http://jenkins/job/foldername/createItem.

On 06.08.2013, at 17:17, Jacob Schlather  wrote:

> I'm working on a script right now to create a new job whenever a new branch 
> is added to our git repo. I have the python code that will post a job, but I 
> would like to post a job inside a folder because our Jenkins CI is already 
> fairly cluttered at the moment due to the large number of projects we 
> currently have running. The code I currently have is:
> 
> import requests
> 
> xml_data=open("config_template.xml",'r').read()
> headers = {'Content-Type': 'text/xml'}
> jenkins_url="http://jenkins_server/createItem";
> keyargs= {'params':{'name': 'TEST_JOB_2.0'}, "headers" : 
> headers,"auth":('user','password'),"data":xml_data}
> 
> response=requests.post(jenkins_url,**keyargs)
> 
> This works fine to post a job, but I couldn't find any parameters I could 
> pass to create it inside a folder. Is there another rest command that will 
> move a job to a folder that I could execute afterwards.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Cancel a Queue via Jenkins API

2013-08-06 Thread Daniel Beck
Send a POST request.

https://en.wikipedia.org/wiki/POST_%28HTTP%29

How this works depends on how you send the requests in the first place. Example 
using the `curl` command line program:

curl --data '' 'http://jenkins/queue/cancelItem?id=65'

`--data` causes the request to be sent as POST, '' means simply that we send an 
empty POST body.

On 06.08.2013, at 20:37, tiago fernandez  wrote:

> Hello,
>  
> I want to cancel a queue item in a Job that has permissions set.
> I have tried for example to cancel a queue item with ID 65 (I get the ID from 
> the Queue Api: queue/api/json?pretty=true):
>  
> http:///queue/cancelItem?id=65
>  
> or using the token that job has set:
>  
> http:///queue/cancelItem?token=myToken&id=65
>  
> but both throws an error:
>  
> javax.servlet.ServletException: java.lang.IllegalAccessException: POST is 
> required for public org.kohsuke.stapler.HttpResponse 
> hudson.model.Queue.doCancelItem(int) throws 
> java.io.IOException,javax.servlet.ServletException at 
> org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:693)
> 
>  
> How should I use the API to cancel an specific item of a Queue?
> Is token necessary since is Jenkins with permissions set?
>  
> Thanks for the 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/groups/opt_out.
>  
>  

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




Re: Automatically creating a job inside a folder

2013-08-06 Thread Daniel Beck
Can't think of a reason other than possibly 'true' in your 
template.

Are your template file and the config.xml of the created job different in any 
way?

What happens when you create a new freestyle job using the UI, get its 
config.xml after it's saved, and post that? Still disabled?

On 06.08.2013, at 21:05, Jacob Schlather  wrote:

> Great. That worked. 
> 
> Do you by chance know why my jobs would spawn as disabled rather than enabled?
> 
> On Tuesday, August 6, 2013 2:59:18 PM UTC-4, Daniel Beck wrote:
> Try http://jenkins/job/foldername/createItem. 
> 
> On 06.08.2013, at 17:17, Jacob Schlather  wrote: 
> 
> > I'm working on a script right now to create a new job whenever a new branch 
> > is added to our git repo. I have the python code that will post a job, but 
> > I would like to post a job inside a folder because our Jenkins CI is 
> > already fairly cluttered at the moment due to the large number of projects 
> > we currently have running. The code I currently have is: 
> > 
> > import requests 
> > 
> > xml_data=open("config_template.xml",'r').read() 
> > headers = {'Content-Type': 'text/xml'} 
> > jenkins_url="http://jenkins_server/createItem"; 
> > keyargs= {'params':{'name': 'TEST_JOB_2.0'}, "headers" : 
> > headers,"auth":('user','password'),"data":xml_data} 
> > 
> > response=requests.post(jenkins_url,**keyargs) 
> > 
> > This works fine to post a job, but I couldn't find any parameters I could 
> > pass to create it inside a folder. Is there another rest command that will 
> > move a job to a folder that I could execute afterwards. 
> > 
> > -- 
> > 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/groups/opt_out. 
> >   
> >   
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Checkstyle apparently totally broken

2013-08-06 Thread Daniel Beck
According to the wiki [1, 2], Maven plugin is an _optional_ dependency of both 
Checkstyle and its (only, besides Ant) mandatory dependency, Analysis Core. Is 
this information correct?

So far, JENKINS-18922/19000 seemed to only happen when missing mandatory 
dependencies, like jobConfigHistory -> Maven...

1: 
https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin#CheckstylePlugin-PluginInformation
2: 
https://wiki.jenkins-ci.org/display/JENKINS/Static+Code+Analysis+Plug-ins#StaticCodeAnalysisPlug-ins-PluginInformation

On 06.08.2013, at 19:30, Ulli Hafner  wrote:

> Is your maven plugin installed and enabled?
> 
> Am 06.08.2013 um 15:06 schrieb fREW Schmidt :
> 
>> Hey guys,
>> 
>> All of my projects are showing stack traces on the Post-build Actions.
>> If I uninstall Checkstyle the problem goes away.  Here is the Stack
>> trace:
>> 
>> javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: 
>> jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-1.526.jar!/lib/form/block.jelly:32:22:
>>   hudson/maven/AbstractMavenProject
>>  at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:103)
>>  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:684)
>>  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:777)
>>  at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:239)
>>  at 
>> org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
>>  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:684)
>>  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:777)
>>  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:586)
>>  at org.kohsuke.stapler.Stapler.service(Stapler.java:217)
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
>>  at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
>>  at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
>>  at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
>>  at 
>> hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
>>  at 
>> hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
>>  at 
>> hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
>>  at 
>> hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:66)
>>  at 
>> hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
>>  at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
>>  at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
>>  at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
>>  at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
>>  at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
>>  at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
>>  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 
>> org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
>>  at 
>> hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
>>  at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64)
>>  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:164)
>>  at winstone.FilterConfiguration.execute(FilterConfiguration.java:194

Re: hopefully simple pipeline question

2013-08-06 Thread Daniel Beck
You could use the parameterized trigger plugin and use the build step as the 
first action in the upstream build.

That way, B will be queued before A polls SCM again. If necessary, add a Quiet 
Period to A in its advanced project options for the time it takes A to check 
out from SCM (or rather, to offset the delay from build start to first build 
step).

On 06.08.2013, at 22:55, Mishael Kim  wrote:

> Hi All,
> 
> Job A is a build job that is triggered by SCM changes, and Job B is a 
> downstream test job configured to use the same node and same workspace.
> 
> If Job A #1 is currently running, and Job A receives another trigger from SCM 
> (Job A #2), how do I ensure that Job B #1 (which hasn't been triggered yet) 
> takes precedence over Job A #2 for that one executor spot available on the 
> machine?
> 
> Thanks,
> Mishael
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Is there a way to make "discard old builds" happen right now?

2013-08-07 Thread Daniel Beck
What version of Jenkins are you using?

On 07.08.2013, at 06:24, David Vree  wrote:

> This worked for me except for one thing.  In a multi-module Maven project the 
> child modules still have all their builds on the filesystem, even though they 
> are gone in the UI.
> 
> On Friday, October 7, 2011 6:58:50 PM UTC-4, jdhein wrote:
> 
> 
> On Oct 7, 4:11 am, Christopher Orr  wrote: 
> > On 06/10/11 21:19, jdhein wrote: 
> > 
> > > My organization has just tons of projects in Jenkins, many of which 
> > > are not active and have not built in some time, some of them haven't 
> > > built in over 17 months. I have gone through and turned on "discard 
> > > old builds" with a max of 10 builds. However, it has been weeks since 
> > > changing this setting and Jenkins has not deleted the excess builds. I 
> > > am guessing I have to poke the bear by kicking off a build... only, I 
> > > don't want to do this for projects I am not directly involved with. 
> > 
> > > Is there a way to tell Jenkins to go ahead and discard the old builds 
> > > right now? 
> > 
> > You can use the Script Console to fetch the jobs you want, and then call 
> > logRotate() on each of them. 
> > 
> > Probably something like this should work, not that I've tested it: 
> > 
> > for(job in Hudson.instance.items) { 
> >job.logRotate() 
> > 
> > } 
> > 
> > Take a look at the examples on the wiki for more info, and if you come 
> > up with something good, you can add it to the 
> > list:https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console 
> > 
> > Regards, 
> > Chris 
> 
> Thanks, the groovy script you gave me worked like a champ with the 
> only change I made being to add an import: 
> 
> import hudson.model.* 
> for(job in Hudson.instance.items) { 
>job.logRotate() 
> } 
> 
> Honestly, without the groovy script you gave me I would not have been 
> able to come up with this without investing a bunch of time 
> researching how Jenkins works and how to write groovy scripts. So 
> thanks a bunch!
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: User account considered for execution

2013-08-07 Thread Daniel Beck
You configured authentication to the Jenkins UI. It has nothing to do with the 
user account jobs are run as, which is the same account who is running Jenkins' 
java process.

If you installed it as a service on Windows and didn't change it in Computer 
Management, Jenkins is running as SYSTEM.

As to access permissions for the files created by Jenkins -- it's basic Windows 
NTFS permissions.

On 07.08.2013, at 06:58, Raghava Rudrakanth P V  wrote:

> Hi Richard,
> Thanks for reply, I am bit confused again. 
> - Consider I Logged-In to Jenkins with User account "Test1" (this account is 
> not existed on network).
> - When job is called, batch script will create folders & remove. But "Test1" 
> doesn't have permissions (this user itself not existed on the system).
> Will this be successful execution if yes considering which user Jenkins 
> created the folders?
> 
> I tried this on windows, but who ever user logged in the create and deletion 
> of folders is successful.
> -
> Started by user test user
> 
> Building in workspace C:\Program Files 
> (x86)\Jenkins_1\jobs\TestCallByTestUser\workspace
> [workspace] $ cmd /c call C:\Windows\TEMP\hudson7256762012989360322.bat
> 
> C:\Program Files (x86)\Jenkins_1\jobs\TestCallByTestUser\workspace>echo "Test 
> Call from Jenkins" 
> "Test Call from Jenkins"
> 
> C:\Program Files (x86)\Jenkins_1\jobs\TestCallByTestUser\workspace>echo user 
> executing -  
> user executing - 
> 
> C:\Program Files (x86)\Jenkins_1\jobs\TestCallByTestUser\workspace>mkdir 
> c:\JenkinsCreatedFolder 
> 
> C:\Program Files (x86)\Jenkins_1\jobs\TestCallByTestUser\workspace>rmdir 
> c:\JenkinsCreatedFolder1 
> 
> C:\Program Files (x86)\Jenkins_1\jobs\TestCallByTestUser\workspace>exit 0 
> Finished: SUCCESS
> 
> 
> -
> 
> Thanks,
> Rudra
> 
> 
> 
> On 7 August 2013 10:16, Richard Bywater  wrote:
> If you are referring to which user will the shell execution happen under, it 
> will be the user which Jenkins is running as.
> 
> Richard.
> 
> 
> On Wed, Aug 7, 2013 at 4:32 PM, Raghava Rudrakanth P V 
>  wrote:
> Hi Team,
> I am new user of Jenkins and have a question.
> 
> 1. I created job which executes the shell script. 
> 2. Configured users using Jenkins own database and was able to login to 
> Jenkins and execute the job.
> 
> Now when the shell execution is happening which User is considered for 
> execution?
> - Is this going to be login user? if yes do this user credentials 
> should match the credentials of the enterprise user.?
> - Is this going to be the user who installed Jenkins? or by default 
> will it be administrator.
> 
> Thanks in advance for help.
> 
> Thanks,
> Rudra
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> 
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/jenkinsci-users/tqc-8EytDmc/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/groups/opt_out.
>  
>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Checkstyle apparently totally broken

2013-08-07 Thread Daniel Beck
Could you please explain what was fixed? I checked hudson.ClassicPluginStrategy 
on master, no relevant changes since JENKINS-18654 was integrated in 1.524, 
probably causing the issues I linked.

This thread started on Aug 6 with "Jenkins is at the latest version as is 
Checkstyle and all of my other plugins", which was at least 1.525.

I assumed JENKINS-18654 _caused_ issues like this, but this seemed to be the 
first case it happened with a plugin missing that isn't a mandatory dependency 
of the plugin throwing.

On 07.08.2013, at 10:23, Ulli Hafner  wrote:

> I think the root cause is https://issues.jenkins-ci.org/browse/JENKINS-18654
> 
> It is already fixed in Jenkins core.
> 
> Ulli
> 
> Am 07.08.2013 um 00:43 schrieb fREW Schmidt :
> 
>> Right, I have not instaled Maven, though I'll try it tomorrow and see
>> if it fixes the problem I guess.
>> 
>> On Tue, Aug 06, 2013 at 09:37:46PM +0200, Daniel Beck wrote:
>>> According to the wiki [1, 2], Maven plugin is an _optional_ dependency of 
>>> both Checkstyle and its (only, besides Ant) mandatory dependency, Analysis 
>>> Core. Is this information correct?
>>> 
>>> So far, JENKINS-18922/19000 seemed to only happen when missing mandatory 
>>> dependencies, like jobConfigHistory -> Maven...
>>> 
>>> 1: 
>>> https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin#CheckstylePlugin-PluginInformation
>>> 2: 
>>> https://wiki.jenkins-ci.org/display/JENKINS/Static+Code+Analysis+Plug-ins#StaticCodeAnalysisPlug-ins-PluginInformation
>>> 
>> 
>> --
>> fREW Schmidt
>> http://blog.afoolishmanifesto.com
> 

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




Re: Build Flow Plugin - reporting capability

2013-08-07 Thread Daniel Beck
Build flows are arbitrary Groovy code (hence JENKINS-16980, which will break 
this solution if ever properly implemented). So just add log parsing and such 
to the end of your build flow. The following minimal example takes the current 
build's log so far, and writes it into a file in a new folder in the workspace:

def reportsDir =Thread.currentThread().currentWorkspace.child('reports')
reportsDir.mkdirs()
reportsDir.child('index.html').write('' + 
Thread.currentThread().currentExecutable.log  + '', 'UTF-8')

There might even be nicer solutions for determining information about what 
was(n't) built, like using FlowRun's getJobsGraph().

Now, publish that folder's contents using the HTML Publisher plugin's "Publish 
HTML Reports" post-build step.

On 07.08.2013, at 18:03, Bob Bick  wrote:

> After doing some playing with the Jenkins Script Console, I think the best 
> approach is to use Groovy scripting.
>  
> The Jenkins FreeStyleBuild class has a getLog() method that returns a string 
> of the log.
>  
> This is the first time that I have used the Script Console, and it seems to 
> be a nice tool. I’d like to expose the information as a nice web page in 
> Jenkins, but assume that is not really feasible. So, right now, I am thinking 
> to just have a the users run a groovy script with text output.
>  
> From: jenkinsci-users@googlegroups.com 
> [mailto:jenkinsci-users@googlegroups.com] On Behalf Of nicolas de loof
> Sent: Wednesday, August 07, 2013 2:56 AM
> To: jenkinsci-users@googlegroups.com
> Subject: Re: Build Flow Plugin - reporting capability
>  
> you probably can use jenkins REST API to retrieve the list of executed jobs 
> from a build flow execution, not sure yet
>  
> 
> 2013/8/6 Bob Bick 
> Hi,
>  
> The Jenkins Build Flow Plugin is replacing our “massive” home grown build 
> system.
>  
> A couple of times a year, our build team will create a Build Flow job from a 
> template to perform the “massive” build which can last for several days.
>  
> The build team will execute the Build Flow job until all sub-jobs have been 
> successfully built. The build team can choose to build 50% of the jobs on a 
> given day and then build the other 50% the next day (or however they decide 
> to break it up)… That leads to my question…. I’d like to be able to inform 
> the builders which sub-jobs have been completed within the context of the 
> massive Build Flow job. Currently, that information is written to the Console 
> Log  as shown below:
>  
> ##
> ###RESULTS ###
> ##
> SUCCESS  : JOB1 JOB2 JOB3
> SKIPPED  : NAF_WPF_NET
> ABORTED  :
> FAILURE  : GERMAINE
> UNSTABLE :
> NOT BUILT: MIDTIER ESL XRDS1 RULES NAF_NET
> ##
> ###END RESULTS ###
> ##
>  
> Currently, the build team must scan all the console logs in order  to 
> determine what has/has not been built, and to figure out what they still need 
> to build. This is difficult for them since there are about 50 different 
> projects that must be built. I am trying to find a solution that would allow 
> them to determine what still needs to be built. Here are a couple of ideas:
>  
> 1)  In the “Build History”, change the job names to include all of the 
> sub-jobs that were successfully built for that job run (e.g. change “#21” to 
> “#21 JOB1 JOB2 JOB3”). But, I don’t think there is a way to do that for Build 
> Flow jobs. Does anyone know if this is possible?
> 
> 2)  Write a shell script that reads the console log files. However, this 
> is a poor solution since it does not integrate with Jenkins (i.e. run some 
> script outside of Jenkins).
> 
> 3)  Other???
> 
>  
> Q. Can anyone think of a good way to report all of the sub-jobs that have 
> successfully completed within the context of multiple Build Flow job runs?
>  
> Thank you for taking the time to read this.
>  
> Bob
> 
> *** *** ***
> This message contains information which may be confidential and privileged. 
> Unless you are the addressee (or authorized to receive for the addressee), 
> you may not use, copy or disclose to anyone the message or any information 
> contained in the message. If you have received the message in error,  please 
> advise the sender by reply e-mail and delete the message.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>  
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> *** *** ***
> T

Re: Jenkins + UiAutomator Always Green

2013-08-07 Thread Daniel Beck
Jenkins marks a build as failed if a shell script step returns an error exit 
code (anything but 0).

Failing tests aren't errors in the test executor, so these calls probably 
return 0 (successful), and are interpreted by the shell as such.

You need to parse the output in some way, and, if it matches your error 
condition, `exit 1`.

If `adb` writes something useful to standard out, you could use something like 
the following (assuming `bash`):

adb ... | tee tmp.log
[[ -z "$( grep 'Test failed' tmp.log )" ]] || exit 1

Otherwise, you'll need to parse your test reports. There might be addons 
helping you with that, e.g. the xUnit plugin. It'd also allow you to 
distinguish between failed executions, and test failures (marking the build as 
'unstable').

On 07.08.2013, at 21:14, Lin Chen  wrote:

> So I defined many UiAutomatorTestCase classes, each has 1 or 2 test cases at 
> the most.
> Then I use Shell script on Jenkins to string these test cases into a series 
> of tests, for example:
> 
> adb shell uiautomator runtest myTest.jar -c com.myTest.TestClass1
> adb shell uiautomator runtest myTest.jar -c com.myTest.TestClass2
> adb shell uiautomator runtest myTest.jar -c com.myTest.TestClass3
> adb shell uiautomator runtest myTest.jar -c com.myTest.TestClass4
> ...
> so on so forth.
> 
> one of the two (1/2) problems I have is that with Jenkins builds, it doesn't 
> matter if any of these test fails, Jenkins always shows up as green, I need 
> Jenkins stop and shows red for the build.
> 
> the other (2/2) problem is that if the app crashes in one of the tests, say, 
> TestClass2, the script will try to pick up and continue executing. What would 
> be the best method to make the script stop?
> 
> Any suggestions?
> Thanks
>  
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Slow loading and large memory usage after 1.480.3 to 1.509.2 migration

2013-08-07 Thread Daniel Beck
This could be the following issue, that'll be fixed in 1.509.3:

https://issues.jenkins-ci.org/browse/JENKINS-16023

On 07.08.2013, at 12:48, Christopher Tarento  wrote:

> Hello guys,
> 
> I used to run a Jenkins server with about 10 jobs with full history (~ 500 
> builds).
> Debian Wheezy
> OpenJDK 1.7b25
> Tomcat 6
> 
> 
> In 1.480.3
> 
> Loading time was decent (<1min) and memory usage as 1GB.
> 
> Server start -> wait for 1 min -> login -> dashboard
> 
> 
> 
> After updating WAR to 1.509.2 and all plugins to latest version (like 
> dashboard to 2.8)
> 
> Loading time is horrible (10min) and memory usage is about 4.5GB
> 
> Server start -> wait for 5 sec -> login -> wait for 10 min -> dashboard
> Navigation is faster, it seems that all data is in memory ...
> 
> 
> I have to get back to 1.480.3 because such loading time and memory 
> consumption is not acceptable.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Problem with build from Checkout Strategy

2013-08-07 Thread Daniel Beck
Anything interesting in the build logs when this occurred?

How do you know the file wasn't updated, did you view the file in the workspace?

On 07.08.2013, at 21:50, DAVID HO  wrote:

> Hi all,
> 
> I am very new to Jenkins and also to the build process. I have just started 
> using Jenkins at my workplace. For our build process, we have the source code 
> store in a remote SVN server and use Maven for the build. For the build 
> configuration, we had Checkout Strategy as "Use SVN update as much as 
> possible" to save time. 
> 
> Recently, we ran into the problem when updating the POM file. For some 
> reasons, the new POM files, which located on SVN, was not updated in the 
> Jenkins' work space even though the source code was. So, to fixed this 
> problem, I have to clear out the work space folder and start the build again. 
> This fixed the problem. To prevent this problem from happening in the future, 
> I have set Checkout Strategy to "Always check out a fresh copy". Does anyone 
> know why this happens? 
> 
> Thanks,
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Remove a Queue item through a Groovy script

2013-08-07 Thread Daniel Beck
There is no output. It just sends a redirect to the referer location. In your 
case. that's undefined, which probably causes it to fail this way. Just ignore 
any non-error response (or at least, any redirects).

On 07.08.2013, at 23:04, tiago fernandez  wrote:

> Hello,
>  
> I want to cancel a Queue item through a groovy script.
> The script I have is something like this   (I do a post because it is 
> specified that to remove an queue item. And queue item id I obtain it from 
> another part of the code using json api):
>  
> def urlString = 'http:///queue/cancelItem'
> def queryString = "id=" + item.id
> def url = new URL(urlString)
> def connection = url.openConnection()
> connection.setRequestMethod("POST")
>  
> connection.setDoInput(true);
> connection.setDoOutput(true);
> connection.connect()
>   
> def writer = new OutputStreamWriter(connection.outputStream)
> writer.write(queryString)
> writer.flush()
> writer.close()
>  
> def inStream = new DataInputStream(connection.getInputStream())
> def buffer
> while((buffer = inStream.readLine()) != null) {
>println(buffer);
> }
>  
> inStream.close()
> connection.close()
>  
>  
>  
>  
> When I execute this script the item is deleted from the queue, but I get the 
> following error, I think it is because in some point of the code it 
> 'executes' the url deleting the item from the queue, so then it doesn't exist 
> anymore, so when it tries to do the getInputStream it throws the error 
> because the Source URL doesn't exist anymore
> Someone has any alternative idea I could implement for this?:
> Thanks for the help.
>  
>  
> java.io.FileNotFoundException: http://localhost:8080/queue/item/18/
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
> at java.net.URLConnection.getContent(Unknown Source)
> at java_net_URLConnection$getContent.call(Unknown Source)
> at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
> at Script1.run(Script1.groovy:23)
> at groovy.lang.GroovyShell.evaluate(GroovyShell
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Build Flow Plugin - reporting capability

2013-08-07 Thread Daniel Beck
Pin build flows to a slave the same way you pin jobs to slaves -- using labels. 
And FWIW, since build flows are light-weight tasks that use one-off executors 
(i.e. it creates its own temporary executor that has no number in the list), it 
can always execute on the same node. Unless the node is unavailable or 
(possibly) you're using a different executor assignment strategy (e.g. Even 
Load Strategy plugin), it will always execute on the same node. But I don't 
know whether the node makes any difference for file accesses anyway (or just 
for scheduling), the DSL could actually be evaluated on the master every time.

Regarding the second question: You can run arbitrary code. Jenkins and its 
plugins are open source. You're a developer. Go nuts. The following example 
simply adds the previous flow run's HTML report to the current one (a simpler 
example might have been to just use `.previousBuild.logFile.text`):

def reportsDir =Thread.currentThread().currentWorkspace.child('reports')
def previousPublisher = 
Thread.currentThread().currentExecutable.previousBuild.actions.find { 
it.class.name == 'htmlpublisher.HtmlPublisherTarget$HTMLBuildAction' }
def oldText = new File(previousPublisher.dir(), 'index.html').text
reportsDir.mkdirs()
reportsDir.child('index.html').write('' + 
Thread.currentThread().currentExecutable.log + '' + oldText, 'UTF-8')

On 07.08.2013, at 23:19, Bob Bick  wrote:

> Daniel,
> 
> We run Jenkins in a multi-node environment. If the Build Flow job always runs 
> on the same Jenkins node, then I think your solution will work fine. But, if 
> they do not run on the same node, then I will not have the history of 
> previous job runs in order to generate a comprehensive report. 
> 
> Is there a way to pin a Build Flow job to a specific node? Or, perhaps I 
> could publish results after each run to the master Jenkins node, that could 
> then be downloaded to the currently running slave (i.e. the master node keeps 
> the history)? I have no clue if that is even possible...
> 
> Sorry for all these newbie questions.
> 
> Thanks,
> 
> Bob
> 
> -Original Message-
> From: jenkinsci-users@googlegroups.com 
> [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Daniel Beck
> Sent: Wednesday, August 07, 2013 2:52 PM
> To: jenkinsci-users@googlegroups.com
> Subject: Re: Build Flow Plugin - reporting capability
> 
> Build flows are arbitrary Groovy code (hence JENKINS-16980, which will break 
> this solution if ever properly implemented). So just add log parsing and such 
> to the end of your build flow. The following minimal example takes the 
> current build's log so far, and writes it into a file in a new folder in the 
> workspace:
> 
>   def reportsDir =Thread.currentThread().currentWorkspace.child('reports')
>   reportsDir.mkdirs()
>   reportsDir.child('index.html').write('' + 
> Thread.currentThread().currentExecutable.log  + '', 'UTF-8')
> 
> There might even be nicer solutions for determining information about what 
> was(n't) built, like using FlowRun's getJobsGraph().
> 
> Now, publish that folder's contents using the HTML Publisher plugin's 
> "Publish HTML Reports" post-build step.
> 
> On 07.08.2013, at 18:03, Bob Bick  wrote:
> 
>> After doing some playing with the Jenkins Script Console, I think the best 
>> approach is to use Groovy scripting.
>> 
>> The Jenkins FreeStyleBuild class has a getLog() method that returns a string 
>> of the log.
>> 
>> This is the first time that I have used the Script Console, and it seems to 
>> be a nice tool. I'd like to expose the information as a nice web page in 
>> Jenkins, but assume that is not really feasible. So, right now, I am 
>> thinking to just have a the users run a groovy script with text output.
>> 
>> From: jenkinsci-users@googlegroups.com 
>> [mailto:jenkinsci-users@googlegroups.com] On Behalf Of nicolas de loof
>> Sent: Wednesday, August 07, 2013 2:56 AM
>> To: jenkinsci-users@googlegroups.com
>> Subject: Re: Build Flow Plugin - reporting capability
>> 
>> you probably can use jenkins REST API to retrieve the list of executed 
>> jobs from a build flow execution, not sure yet
>> 
>> 
>> 2013/8/6 Bob Bick 
>> Hi,
>> 
>> The Jenkins Build Flow Plugin is replacing our "massive" home grown build 
>> system.
>> 
>> A couple of times a year, our build team will create a Build Flow job from a 
>> template to perform the "massive" build which can last for several days.
>

Re: hopefully simple pipeline question

2013-08-07 Thread Daniel Beck
Yeah. I don't like this behavior either. It's 'wait for people to get their 
non-atomic SCM commits right', rather than 'prevent back-to-back executions' 
(the clock starts ticking when it enters the queue, not when the previous build 
is finished) -- I'd need the latter more than the former...

On 08.08.2013, at 01:13, Mishael Kim  wrote:

> Daniel,
> 
> Slight problem with adding a quiet period to A... the first manually 
> triggered job will have to wait for that quiet period as well, even if 
> there's nothing running in the pipeline.  Not a deal breaker, but I could see 
> this being pretty annoying.
> 
> 
> On Wed, Aug 7, 2013 at 10:39 AM, Mishael Kim  wrote:
> Great idea.  Thanks, that sounds like it would work!
> 
> 
> On Tue, Aug 6, 2013 at 2:28 PM, Daniel Beck  wrote:
> You could use the parameterized trigger plugin and use the build step as the 
> first action in the upstream build.
> 
> That way, B will be queued before A polls SCM again. If necessary, add a 
> Quiet Period to A in its advanced project options for the time it takes A to 
> check out from SCM (or rather, to offset the delay from build start to first 
> build step).
> 
> On 06.08.2013, at 22:55, Mishael Kim  wrote:
> 
> > Hi All,
> >
> > Job A is a build job that is triggered by SCM changes, and Job B is a 
> > downstream test job configured to use the same node and same workspace.
> >
> > If Job A #1 is currently running, and Job A receives another trigger from 
> > SCM (Job A #2), how do I ensure that Job B #1 (which hasn't been triggered 
> > yet) takes precedence over Job A #2 for that one executor spot available on 
> > the machine?
> >
> > Thanks,
> > Mishael
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Jenkins Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to jenkinsci-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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


Re: [POLL] how addicted are you to the current Subversion plugin's authentication model?

2013-08-08 Thread Daniel Beck
This would be really awesome. Right now, credentials handling in Subversion 
plugin is rather intransparent. Reusing known credentials (unless they're a 
repo's default) isn't easy either.

HOWEVER this needs a better upgrade path than SSH credentials. I can deal with 
a dozen duplicates of the same three SSH credentials, but creating one 
credential per Subversion job (or remote URL) would be absolute madness.

On 08.08.2013, at 14:02, Stephen Connolly  
wrote:

> In working on integrating with the Credentials plugin there is, from my point 
> of view, a lot of insanity and crazy ways of doing auth.
> 
> How attached are people to the existing way?
> 
> The way I want to deliver is that you have a drop down underneath any of the 
> module remote url fields which lists the relevant credentials for that URL 
> (including none) and you would always make a selection (even if that 
> selection is leaving the default of "none" selected)
> 
> I would like to ditch entirely the existing model of credentials and go 
> straight for this simplified model.
> 
> What do people think?
> 
> 
> 
> -- 
> Sent from my phone
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: Jenkins + UiAutomator Always Green

2013-08-08 Thread Daniel Beck
It basically means "Check whether the output of grep when searching for 'Test 
failed' is empty; it it's not, fail the script".

On 08.08.2013, at 21:58, Lin Chen  wrote:

> Thanks for your reply.
> But can you explain what is the double bracket, [[ -z "$( grep 'Test failed' 
> tmp.log )" ]] ?
> 
> On Wednesday, 7 August 2013 15:31:16 UTC-4, Daniel Beck wrote:
> Jenkins marks a build as failed if a shell script step returns an error exit 
> code (anything but 0). 
> 
> Failing tests aren't errors in the test executor, so these calls probably 
> return 0 (successful), and are interpreted by the shell as such. 
> 
> You need to parse the output in some way, and, if it matches your error 
> condition, `exit 1`. 
> 
> If `adb` writes something useful to standard out, you could use something 
> like the following (assuming `bash`): 
> 
> adb ... | tee tmp.log 
> [[ -z "$( grep 'Test failed' tmp.log )" ]] || exit 1 
> 
> Otherwise, you'll need to parse your test reports. There might be addons 
> helping you with that, e.g. the xUnit plugin. It'd also allow you to 
> distinguish between failed executions, and test failures (marking the build 
> as 'unstable'). 
> 
> On 07.08.2013, at 21:14, Lin Chen  wrote: 
> 
> > So I defined many UiAutomatorTestCase classes, each has 1 or 2 test cases 
> > at the most. 
> > Then I use Shell script on Jenkins to string these test cases into a series 
> > of tests, for example: 
> > 
> > adb shell uiautomator runtest myTest.jar -c com.myTest.TestClass1 
> > adb shell uiautomator runtest myTest.jar -c com.myTest.TestClass2 
> > adb shell uiautomator runtest myTest.jar -c com.myTest.TestClass3 
> > adb shell uiautomator runtest myTest.jar -c com.myTest.TestClass4 
> > ... 
> > so on so forth. 
> > 
> > one of the two (1/2) problems I have is that with Jenkins builds, it 
> > doesn't matter if any of these test fails, Jenkins always shows up as 
> > green, I need Jenkins stop and shows red for the build. 
> > 
> > the other (2/2) problem is that if the app crashes in one of the tests, 
> > say, TestClass2, the script will try to pick up and continue executing. 
> > What would be the best method to make the script stop? 
> > 
> > Any suggestions? 
> > 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/groups/opt_out. 
> >   
> >   
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: enhancement: allow setting of common/global parameters via API

2013-08-08 Thread Daniel Beck
What are you actually trying to accomplish? I mean, if you're starting with a 
fresh instance (or at least set most of the settings) anyway, what's wrong with 
checking it out from SCM, rsyncing, or cloning a template VM?

On 08.08.2013, at 22:51, J Arrizza  wrote:

> I currently have a set of scripts that I use to get/set all of the job 
> parameters/settings/configuration. This means that I can take a machine with 
> vanilla jenkins on it and pretty much recreate everything I care about in all 
> the jobs.
> 
> But there seems to be a few things missing to make this 100% automated:
> - getting a list of plugins and their versions;  being able to install 
> plugins from the API
> - setting up views
> - setting Global Properies (e,g Environment Variables)
> - setting Locks (for the locks and latches plugin) on the "Manage Jenkins" 
> page
> - setting Xnvc (for the xvnc plugin) on the "Manage Jenkins" page
> - setting Jenkins Location information and admin email info
> - setting email notification information
> - setting up Nodes
> 
> I can take the "low road" and use scp to get the config.xml, modify it and 
> push it back, but before I do that, is there any chance this kind of access 
> is in future plans for Jenkins?
> 
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Re: cronjob monitoring question

2013-08-11 Thread Daniel Beck
Don't use Jenkins to schedule it, but actually use cron.

If Jenkins is available, you can send the logs and result to it using the 
'monitor external job' job type.

On 11.08.2013, at 17:26, rmorgan...@gmail.com wrote:

> if the jenkins server is down my cronjob won't run. Is there a way for the 
> job to still run even if jenkins is down?
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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


Re: Set limit on number of threads

2013-08-11 Thread Daniel Beck
Check out http://yourjenkins/threadDump -- the threads mostly have nice names 
that explain what they're for.

Maybe you have some success changing --handlerCountStartup if you're using 
winstone (http://winstone.sourceforge.net/#commandLine) to reduce the number of 
initial request handlers.

On 12.08.2013, at 08:04, Justinas Urbanavicius  wrote:

> Hi, 
> 
> I was wondering, if there is a way to limit the number of threads that 
> jenkins uses, at start-up i see that there are ~28 threads running 
> jenkins.war, and they use a lot of memory.
> Don't know why there should be a need for that much threads
> 
> Platform Linux debian x64
> Java version "1.6.0_27"
> OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1~deb7u1)
> OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
> Jenkins v1.526
> 
> any help or info would be appreciated
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 

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


Re: How to run a build step from the master and not the slave?

2013-08-11 Thread Daniel Beck
Instead I'd try to download it to the job's WORKSPACE on the slave during the 
build and run it from there, if possible.

On 12.08.2013, at 08:19, Avihay Eyal  wrote:

> Hi, I have a job running on a dedicated slave. This job should run unittests 
> and regression tests via robot framework.
> 
> The thing is, that I want to run the robot framework from the master, and not 
> the slave, as I want to install the robot framework only 
> once on the master.
> 
> 
> According to the robot framework plugin 
> (https://wiki.jenkins-ci.org/display/JENKINS/Robot+Framework+Plugin), in 
> order to run robot framework
> I have to add a build step, the problem is that the build step are executed 
> on the slave, and not the master. How can I run from a job a build step on 
> the master?
> 
> 
> I can create another job and run it on the master, but I'm not sure that's 
> the best practice for this scenario
> 
> 
> Thanks.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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




Re: Why is my Jenkins logging in german?

2013-08-12 Thread Daniel Beck
Is there anything language-related in /systemInfo or 
/computer/slavename/systemInfo, e.g. in environment variables?

On 12.08.2013, at 11:21, Steffen Breitbach  wrote:

> And how do I stop it?
> 
> Hi everyone!
> 
> Jenkins os logging in german, mostly events related to slaves. Here are
> some examples:
> 
> SEVERE: Kann keinen Slave-Agenten starten für bsjenkinsslave02
> WARNING: Node monitoring bsjenkinsslave01 for Antwortzeit aborted.
> Exception in thread "Monitoring bsjenkinsslave01 for Freier TEMP-Platz"
> Exception in thread "Monitoring bsjenkinsslave01 for Freier
> Plattenplatz" java.lang.reflect.UndeclaredThrowableException
> 
> Why is it logging in german and how do I change it to english?
> 
> Most users use the frontend with a browser that is set to a german
> locale, but that shouldn't affect the logging, should it?
> 
> Regards
>  Steffen
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 

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




Re: Why is my Jenkins logging in german?

2013-08-13 Thread Daniel Beck
Are you sure? The UI usually is whatever the browser requests. Big parts of 
Jenkins (plugins!) are mostly unlocalized (or localized only to English + 
developer's native language). What do build logs look like? If you use Copy 
Artifact plugin check those jobs; I remember its build log messages are 
available in German as well.

On 13.08.2013, at 10:14, Steffen Breitbach  wrote:

> Hi Daniel!
> 
> On Mon, 2013-08-12 at 19:55 +0200, Daniel Beck wrote: 
>> Is there anything language-related in /systemInfo or 
>> /computer/slavename/systemInfo, e.g. in environment variables?
> 
> Apparently in a startup configuration there was "-Duser.language=de".
> I've set it to "-Duser.language=en" which seems to do the trick.
> 
> Thank you and Eduardo for pointing this out. However, I'm still a bit
> puzzled why this affected slave event logging only?!
> 
> Regards
>  Steffen
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 

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


Re: Conditional buildstep plugin regex match not working as expected?

2013-08-13 Thread Daniel Beck
There are essentially two options, let's call them 'match' and 'search':

- Match: Check for exact match (essentially `equals`), and require expression 
to be wrapped in "any sequence of characters" using `.*` if you want to search 
instead.
- Search: Only check presence of the search expression anywhere in the string 
(like `substring`), and requires explicitly matching start and end positions (^ 
and $ respectively) if you want an exact match.

The plugin matches (and the ^Example$ in the docs is really redundant then).

On 13.08.2013, at 13:33, LarsR  wrote:

> Thanks to both of you, ".*B.*" is the magical expression! :D
> 
> What puzzles me though, is that the documentation I found on the web as well 
> as the online expression testers all pointed in the direction that "B" should 
> be enough to do the test?!
> 
> Anyway, problem solved!
> 
> / Lars 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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


Re: Help with Windows slave configuration

2013-08-13 Thread Daniel Beck
Create a job.

Enter the Windows node's name as 'Label expression' after you check 'Restrict 
where this project can be run'.

For build steps, use something Visual Studio specific, or start with a 'Execute 
Windows batch command' builder.

Now this job will run on your Windows node and execute your batch commands.

On 13.08.2013, at 23:54, keith.ouellettte  wrote:

> I am setting up Jenkins for the first time. It is installed on a Linux server
> (OpenSuSE 12.2) and we have a requirement to build an application using
> Visual Studio. We configured a windows slave and have it configured as a
> node in Jenkins. It is configured to use JNLP and we see it connected in the
> Nodes list. Now for the hard part. How do I use that connection to kick off
> a build?
>  
>  I have been searching for a HOWTO or any documentation out there,
> but have not seen anything that really explains its use. I see some SSH
> stuff, but that means I need to install Cygwin and get the authentication
> stuff going. That seemed more complex. Is there anything out there that
> provides a good example of using JNLP?
>  
> Thanks,Keith
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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


Re: Help with Windows slave configuration

2013-08-14 Thread Daniel Beck
gt; hudson.AbortException
> 
>   at hudson.tools.JDKInstaller.install(JDKInstaller.java:248)
> 
>   at 
> hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:132)
> 
>   at 
> hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
> 
>   at 
> hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
> 
>   at 
> hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:203)
> 
>   at 
> hudson.model.JDK.forNode(JDK.java:122)
> 
>   at 
> hudson.model.AbstractProject.getEnvironment(AbstractProject.java:348)
> 
>   at 
> hudson.model.Run.getEnvironment(Run.java:2058)
> 
>   at 
> hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:933)
> 
>   at 
> hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:84)
> 
>   at 
> hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:60)
> 
>   at 
> hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> 
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
> 
>   at 
> hudson.model.Build$BuildExecution.build(Build.java:199)
> 
>   at 
> hudson.model.Build$BuildExecution.doRun(Build.java:160)
> 
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
> 
>   at 
> hudson.model.Run.execute(Run.java:1593)
> 
>   at 
> hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> 
>   at 
> hudson.model.ResourceController.execute(ResourceController.java:88)
> 
>   at 
> hudson.model.Executor.run(Executor.java:247)
> 
> Build step 'Execute Windows batch command' marked build as failure
> Finished: FAILURE
> 
> 
> 
> On Tue, Aug 13, 2013 at 5:58 PM, Daniel Beck  wrote:
> Create a job.
> 
> Enter the Windows node's name as 'Label expression' after you check 'Restrict 
> where this project can be run'.
> 
> For build steps, use something Visual Studio specific, or start with a 
> 'Execute Windows batch command' builder.
> 
> Now this job will run on your Windows node and execute your batch commands.
> 
> On 13.08.2013, at 23:54, keith.ouellettte  wrote:
> 
> > I am setting up Jenkins for the first time. It is installed on a Linux 
> > server
> > (OpenSuSE 12.2) and we have a requirement to build an application using
> > Visual Studio. We configured a windows slave and have it configured as a
> > node in Jenkins. It is configured to use JNLP and we see it connected in the
> > Nodes list. Now for the hard part. How do I use that connection to kick off
> > a build?
> >
> >  I have been searching for a HOWTO or any documentation out there,
> > but have not seen anything that really explains its use. I see some SSH
> > stuff, but that means I need to install Cygwin and get the authentication
> > stuff going. That seemed more complex. Is there anything out there that
> > provides a good example of using JNLP?
> >
> > Thanks,Keith
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Jenkins Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to jenkinsci-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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


Re: Checkstyle apparently totally broken

2013-08-14 Thread Daniel Beck
pache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
>  at 
> org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
>  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>  at 
> org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
>  at 
> org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
>  at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
>  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>  at 
> org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
>  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>  at 
> org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
>  at 
> org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
>  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>  at 
> org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
>  at 
> org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
>  at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
>  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>  at 
> org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
>  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>  at 
> org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
>  at 
> org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
>  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>  at 
> org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
>  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>  at 
> org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
>  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>  at 
> org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
>  at 
> org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
>  at 
> org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
>  at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
>  at 
> org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
>  at 
> org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
>  at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95)
>  ... 61 more
>   Caused by: java.lang.NoClassDefFoundError: hudson/maven/AbstractMavenProject
>  at 
> hudson.plugins.analysis.core.PluginDescriptor.isApplicable(PluginDescriptor.java:215)
>  at hudson.tasks.BuildStepDescriptor.filter(BuildStepDescriptor.java:84)
>  at hudson.Functions.getPublisherDescriptors(Functions.java:813)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:616)
>  at 
> org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)
>  at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104)
>  at 
> org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
>  at 
> org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
>  at 
> org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
>  at 
> org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
>  at 
> hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
>  at 
> org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:58)
>  at 
> org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
>  at 
> org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
>  at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
>  ... 132 more
> 
> 
> On Wed, Aug 07, 2013 at 08:27:10PM +0200, Daniel Beck wrote:
>> Could you please explain what was fixed? I checked 
>> hudson.ClassicPluginStrategy on master, no relevant changes since 
>> JENKINS-18654 was integrated in 1.524, probably causing the issues I linked.
>> 
>> This thread sta

Re: How to send an email summarizing few projects (chained together)?

2013-08-14 Thread Daniel Beck
Your syntax is wrong (while the linked thread got it right). Quoting the first 
line in the 'Content Token Reference' (which should probably be bold and 
blinking):

> All arguments are optional. Arguments may be given for each token in the form 
> name="value" for strings and in the form name=value for booleans and numbers.

So you should try ${SCRIPT, script="send_email.groovy", template="template"} 
instead.

Regarding templates provided with email-ext:

- In older Jenkins versions, they're in 
$JENKINS_HOME/plugins/email-ext/WEB-INF/classes/hudson/plugins/emailext/templates/
- In newer Jenkins versions, they're in the archive at 
$JENKINS_HOME/plugins/email-ext/WEB-INF/lib/classes.jar (it's just a zip file, 
extract it somewhere) in hudson/plugins/email-ext/templates/

On 15.08.2013, at 07:07, Avihay Eyal  wrote:

> Hi, I saw the following posts:
> https://groups.google.com/forum/#!searchin/jenkinsci-users/slide$20groovy$20template/jenkinsci-users/Juu2LfRkgck/G091xZI24UgJ
> 
> So what I did:
> 
> 1. create a directory named email-templates under /var/lib/jenkins (wasn't 
> there suppose to be a email-template dir already?)
> 2. Renamed the script you wrote to send_email.groovy, and copied it to 
> /var/lib/jenkins/email-templates
> 3. replaced the Default content with ${SCRIPT, "send_email.groovy", 
> "template=template"}.(ddin't copy any template to email-template dir, as I 
> didn't find none under my ext-email plugin.
> 
> When I ran it, all I got was ${SCRIPT, "send_email.groovy", 
> "template=template"} as the email content...That's the same as the guy that 
> asked you before, but I don't know how to solve it...
> 
> 
> Thanks.
> 
> 
> On Wednesday, August 14, 2013 6:40:38 PM UTC+3, slide wrote:
> I believe I posted on this before, the easiest thing might be to have a job 
> that runs after project C that follows the upstream chain and just summarizes 
> via a groovy template. If you search the archives, I think I've posted the 
> code on how to access upstream builds and so forth.
> 
> slide
> 
> 
> On Wed, Aug 14, 2013 at 7:22 AM, Avihay Eyal  wrote:
> Hi, I'm using Email-ext to send email once a job is done.
> 
> I would like that email to have results of the upstream projects as well 
> (project A->project B->project C, ad I want
> an email summarizing A,B,C). I could send three emails from the three 
> different projects, but that seems messy to me...
> 
> 
> What's the best way to go about it?
> 
> 
> 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/groups/opt_out.
>  
>  
> 
> 
> 
> -- 
> Website: http://earl-of-code.com
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: How to send an email summarizing few projects (chained together)?

2013-08-15 Thread Daniel Beck
Groovy files aren't Groovy embedded in HTML/XML and don't use <% %>.

On 15.08.2013, at 11:53, Avihay Eyal  wrote:

> Thanks a lot, it helped. My default content now is:
> ${SCRIPT, script="send_email.groovy",template="groovy-html.template"}
> 
> But it seems that I have an error in my groovy, cause in the email I receive 
> the following error:
> 
> Error in script or template: 
> org.codehaus.groovy.control.MultiplrComplicatioErroresException: startup 
> failed: Script1.groovy: 1: unexpected token:<@line 1, column 1.<%^1 error
> 
> I'm not familiar with groovy at all, so if you can help with that it would be 
> great.
> 
> This is the code I copied from you:
> 
> <%
> // the goal is to find the top level job which should contain the 
> changelist
> def upstreamBuild = null
> def cause = build.causes.find {
> if(it instanceof hudson.model.Cause.UpstreamCause) {
> return true
> }
> return false
> }
> 
> while(cause != null) {
> upstreamBuild =
> hudson.model.Hudson.instance.getItem(cause.upstreamProject).getBuildByNumber(cause.upstreamBuild)
> cause = upstreamBuild.causes.find {
> if(it instanceof hudson.model.Cause.UpstreamCause) {
> return true
> }
> return false
> }
> }
> %>
> 
> <%
> if(upstreamBuild != null) {
>// now do stuff with that upstream build
>}
> %>
> 
> On Thursday, August 15, 2013 9:42:38 AM UTC+3, Daniel Beck wrote:
> Your syntax is wrong (while the linked thread got it right). Quoting the 
> first line in the 'Content Token Reference' (which should probably be bold 
> and blinking): 
> 
> > All arguments are optional. Arguments may be given for each token in the 
> > form name="value" for strings and in the form name=value for booleans and 
> > numbers. 
> 
> So you should try ${SCRIPT, script="send_email.groovy", template="template"} 
> instead. 
> 
> Regarding templates provided with email-ext: 
> 
> - In older Jenkins versions, they're in 
> $JENKINS_HOME/plugins/email-ext/WEB-INF/classes/hudson/plugins/emailext/templates/
>  
> - In newer Jenkins versions, they're in the archive at 
> $JENKINS_HOME/plugins/email-ext/WEB-INF/lib/classes.jar (it's just a zip 
> file, extract it somewhere) in hudson/plugins/email-ext/templates/ 
> 
> On 15.08.2013, at 07:07, Avihay Eyal  wrote: 
> 
> > Hi, I saw the following posts: 
> > https://groups.google.com/forum/#!searchin/jenkinsci-users/slide$20groovy$20template/jenkinsci-users/Juu2LfRkgck/G091xZI24UgJ
> >  
> > 
> > So what I did: 
> > 
> > 1. create a directory named email-templates under /var/lib/jenkins (wasn't 
> > there suppose to be a email-template dir already?) 
> > 2. Renamed the script you wrote to send_email.groovy, and copied it to 
> > /var/lib/jenkins/email-templates 
> > 3. replaced the Default content with ${SCRIPT, "send_email.groovy", 
> > "template=template"}.(ddin't copy any template to email-template dir, as I 
> > didn't find none under my ext-email plugin. 
> > 
> > When I ran it, all I got was ${SCRIPT, "send_email.groovy", 
> > "template=template"} as the email content...That's the same as the guy that 
> > asked you before, but I don't know how to solve it... 
> > 
> > 
> > Thanks. 
> > 
> > 
> > On Wednesday, August 14, 2013 6:40:38 PM UTC+3, slide wrote: 
> > I believe I posted on this before, the easiest thing might be to have a job 
> > that runs after project C that follows the upstream chain and just 
> > summarizes via a groovy template. If you search the archives, I think I've 
> > posted the code on how to access upstream builds and so forth. 
> > 
> > slide 
> > 
> > 
> > On Wed, Aug 14, 2013 at 7:22 AM, Avihay Eyal  wrote: 
> > Hi, I'm using Email-ext to send email once a job is done. 
> > 
> > I would like that email to have results of the upstream projects as well 
> > (project A->project B->project C, ad I want 
> > an email summarizing A,B,C). I could send three emails from the three 
> > different projects, but that seems messy to me... 
> > 
> > 
> > What's the best way to go about it? 
> > 
> > 
> > Thanks. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Jenkins Users"

Re: SECURITY-47 with xpath

2013-08-16 Thread Daniel Beck
Not sure what the problem is with text() either, but both were changed in the 
same commit -- the advisories are probably just incomplete regarding impact on 
API users:

https://github.com/jenkinsci/jenkins/commit/0de3e9b14ed75f70279435e78eb9f6a3a1a179df

Unfortunately JENKINS-16936 is still open, so you either don't get these 
features, or are running in a completely vulnerable mode.

On 16.08.2013, at 12:42, teilo  wrote:

> Hi all,
> 
> After a lot of head scratching[1] I found that you can no longer (by default) 
> use "text()" in an xpath  in api/xml/xpath=blah.
> 
> The associated commit references SECURITY-47 - which I can't see but from the 
> other commit would seem to be related only to jsonp[2]?
> 
> What I'm finding hard to work out is what the attack vector is for xpath 
> primatives?  the content is returned as text/plain so should not be 
> interpreted by any browser.  Anyone any pointers?
> 
> enabling hudson.model.Api.INSECURE=true to get xpath primatives would expose 
> jsonp which is not something that I would want to do as the attack vector 
> there is well understood.
> 
> Regards,
> 
> /James
> 
> [1] https://issues.jenkins-ci.org/browse/JENKINS-19221
> [2] 
> http://www.cloudbees.com/jenkins-advisory/jenkins-security-advisory-2013-02-16.cb
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Prevent job from when a particular job is running

2013-08-19 Thread Daniel Beck
Yes, it's the number of executors. Of course, this requires jobs a and b to run 
on the same node, and prevents jobs c, d, ... from running on that node (or 
they'll block/be blocked by a and b).

On 19.08.2013, at 18:35, Jared Griffith  wrote:

> Isn't there already a native configuration option that works per node on how 
> many concurrent builds each can run?
> 
> 
> On Mon, Aug 19, 2013 at 12:29 AM, Steffen Breitbach 
>  wrote:
> Hi Jared!
> 
> > Is there a way to prevent job b from running if job a is running?
> 
> Beside the other solution you might want to give the "Throttle Concurrent 
> Builds" plugin a look.
> 
> Regards
>   Steffen
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> -- 
> Jared Griffith
> Linux Administrator, PICS Auditing, LLC
> P: (949) 936-4574
> C: (909) 653-7814
> 
> 
> 17701 Cowan #140 | Irvine, CA | 92614
> 
> Join PICS on LinkedIn and Twitter!  
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: How to download plugins from Linux shell

2013-08-19 Thread Daniel Beck
You could create a custom jenkins.war that bundles the plugins you want in the 
versions you want.

https://wiki.jenkins-ci.org/display/JENKINS/Bundling+plugins+with+Jenkins

On 19.08.2013, at 19:31, Christopher Carlson  wrote:

> Is it possible to download plugins using a bash shell script?
> 
> Our company would like to be able to automate setting up a build machine, and 
> we want to limit the amount of steps required.  They want something like:
>   • Install Jenkins
>   • svn co .../stable/jenkins
>   • ./InstallPlugins
> This way, the only things maintained in subversion are the jobs, scripts and 
> anything that can't be downloaded from the Internet.
> 
> Thanks for any assistance you can provide.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Set Jenkins slave system home directory to something other than $HOME

2013-08-20 Thread Daniel Beck
Go to http://jenkins/computer/slavename/configure and change 'Remote FS root'. 
Make sure no two slaves use the same one.

You can still use a shared directory in the $HOME for tools etc -- you could 
define an environment variable TOOLS_DIR that points there, and use it in the 
job scripts. There's no reason to put that into the slave's root dir, which 
should probably be left alone to be managed by Jenkins anyway.

On 20.08.2013, at 19:38, Matt Schuckmann  wrote:

> Is there a way to set the working directory for slave systems to something 
> other than $HOME/workspace
> 
> I ask because I would like to have my jenkins user directory (~jenkins) NFS 
> mounted and shared between the master and all the slaves so it's easy to 
> share scripts and tools etc, but have the actual job build directories on 
> drives local to each machine. 
> 
> Thanks, 
> Matt 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.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Set Jenkins slave system home directory to something other than $HOME

2013-08-20 Thread Daniel Beck
Of course, I didn't intend this to mean 'the strings configured here must be 
unique among all slaves'. Just, you know, different directories. It doesn't 
help to use different paths and have symlinks and mount points result in two 
slaves sharing the same directory either.

On 20.08.2013, at 21:58, "Kevin Fleming (BLOOMBERG/ 731 LEXIN)" 
 wrote:

> You only need to be concerned about multiple slaves having the same 'Remote 
> FS root' if they are located on the same computer :-) I have all of my slaves 
> configured with '/jenkins' for their remote FS and they work fine, because 
> they are all one slave per computer.
> 
> - Original Message -
> From: jenkinsci-users@googlegroups.com
> To: jenkinsci-users@googlegroups.com
> At: Aug 20 2013 14:31:13
> Go to http://jenkins/computer/slavename/configure and change 'Remote FS 
> root'. Make sure no two slaves use the same one.
> 
> You can still use a shared directory in the $HOME for tools etc -- you could 
> define an environment variable TOOLS_DIR that points there, and use it in the 
> job scripts. There's no reason to put that into the slave's root dir, which 
> should probably be left alone to be managed by Jenkins anyway.
> 
> On 20.08.2013, at 19:38, Matt Schuckmann  wrote:
> 
> > Is there a way to set the working directory for slave systems to something 
> > other than $HOME/workspace
> > 
> > I ask because I would like to have my jenkins user directory (~jenkins) NFS 
> > mounted and shared between the master and all the slaves so it's easy to 
> > share scripts and tools etc, but have the actual job build directories on 
> > drives local to each machine. 
> > 
> > Thanks, 
> > Matt 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.
> > For more options, visit https://groups.google.com/groups/opt_out.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Extra "Build with Params" menu ... where is it coming from?

2013-08-23 Thread Daniel Beck
'Build with Params' in the plugin. You can see it in the breadcrumb trail in 
the plugin screenshot. Here's the corresponding source:
https://github.com/jenkinsci/build-with-parameters-plugin/blob/master/src/main/java/org/jenkinsci/plugins/buildwithparameters/BuildWithParametersAction.java#L63

'Build with Parameters' was introduced for regular parameterized builds to 
Jenkins core to distinguish between 'Build now' (you click it and a build 
starts) and 'Build after filling out a form'.

On 23.08.2013, at 00:03, Jeff  wrote:

> 
> On Thu, Aug 22, 2013 at 1:21 PM, William Soula 
>  wrote:
> Parameterized
> 
> Are you sure?  It's referenced here 
> https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build  and I don't 
> see any mention of the "Build with Parameters" link on the plugin page.
> 
> 
> -- 
> Jeff Vincent
> See my LinkedIn profile at:
> http://www.linkedin.com/in/rjeffreyvincent
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: "Build after other projects are built" question

2013-08-26 Thread Daniel Beck
'Build after other projects are built' is actually stored in the _triggering_ 
job as a post-build action. Check the config.xml's of the triggering and 
triggered jobs. It's just a UI trick that you're able to configure this from 
the downstream job.

Any of the following will cause a job's template transformation to run again:
- Changing the template, even those parts that aren't related to the 
transformation, like the name of the template, its description, or the 
description of the attributes
- Saving the config page of a templated job

Performing these action will override the entire job configuration on the 
affected templated jobs, including the following parts, unless specifically 
accounted for in the template transformation:
- enabled/disabled status of the job (as this can be changed outside /config 
page)
- job description (can also be changed outside /config page)
- RBAC permissions (!)
- 'Build other projects' (the inverse of 'Build after other projects are built')
- ...

To circumvent this, you need to specifically account for all of these in your 
template transformation. For example, the following Groovy template snippet 
keeps the job description during transformation: 
${instance.job?.description?:""}

Related RM entries:
https://rm.cloudbees.com/issues/2016 (make it easier to keep previous job 
values)
https://rm.cloudbees.com/issues/1780 (make it easier to serialize more complex 
structures, like e.g. a hudson.tasks.BuildTrigger publisher)
https://rm.cloudbees.com/issues/1979 (don't save all jobs when changing parts 
of the template that don't affect the templates jobs at all)

On 26.08.2013, at 19:47, Bob Bick  wrote:

> Hi,
>  
> We are using the "Build after other projects are built" feature…
>  
> Job B is triggered to run after Job A runs. Job A is based on a CloudBees 
> Template. The build trigger is set on Job B, not Job A.
>  
> Sometimes it works correctly (i.e. Job A runs and Job B is triggered. When it 
> works correctly, I will see something like this on a Job B run:
>  
> Started by upstream project flight-review/weather-review-application-ci build 
> number 308
> originally caused by:
>   • Started by an SCM change
> However, a lot of times, Job B does not get triggered when Job A runs 
> successfully.
>  
> Has anyone else ran into this issue? If so, any ideas what might be the 
> problem?
>  
> Thanks,
> Bob
> 
> *** *** ***
> This message contains information which may be confidential and privileged. 
> Unless you are the addressee (or authorized to receive for the addressee), 
> you may not use, copy or disclose to anyone the message or any information 
> contained in the message. If you have received the message in error,  please 
> advise the sender by reply e-mail and delete the message.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: "Build after other projects are built" question

2013-08-26 Thread Daniel Beck
Right, my examples would remove the build trigger completely until added again 
in the config of downstream projects.

Have you tried viewing the config.xml of 'A' to see whether the post-build 
action is always in there?

When triggering a downstream job, there should be an entry in the build log of 
A. Maybe an error message or explanation is added when it's not triggering?

Is B ever disabled, or is it frequently waiting in the queue?

What version of Jenkins are you using?

(Since you have Jenkins Enterprise, consider opening a support request with 
Cloudbees.)

On 26.08.2013, at 21:45, Bob Bick  wrote:

> Daniel, Thank You for the quick response.
> 
> We are seeing "seemingly random" behavior. Sometimes the downstream Job B is 
> triggered and other times it is not.
> 
> If we needed to change the template as you stated, wouldn't the downstream 
> job never get triggered? Why would it work sometimes but not others?
> 
> -Original Message-
> From: jenkinsci-users@googlegroups.com 
> [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Daniel Beck
> Sent: Monday, August 26, 2013 3:34 PM
> To: jenkinsci-users@googlegroups.com
> Subject: Re: "Build after other projects are built" question
> 
> 'Build after other projects are built' is actually stored in the _triggering_ 
> job as a post-build action. Check the config.xml's of the triggering and 
> triggered jobs. It's just a UI trick that you're able to configure this from 
> the downstream job.
> 
> Any of the following will cause a job's template transformation to run again:
> - Changing the template, even those parts that aren't related to the 
> transformation, like the name of the template, its description, or the 
> description of the attributes
> - Saving the config page of a templated job
> 
> Performing these action will override the entire job configuration on the 
> affected templated jobs, including the following parts, unless specifically 
> accounted for in the template transformation:
> - enabled/disabled status of the job (as this can be changed outside /config 
> page)
> - job description (can also be changed outside /config page)
> - RBAC permissions (!)
> - 'Build other projects' (the inverse of 'Build after other projects are 
> built')
> - ...
> 
> To circumvent this, you need to specifically account for all of these in your 
> template transformation. For example, the following Groovy template snippet 
> keeps the job description during transformation: 
> ${instance.job?.description?:""}
> 
> Related RM entries:
> https://rm.cloudbees.com/issues/2016 (make it easier to keep previous job 
> values)
> https://rm.cloudbees.com/issues/1780 (make it easier to serialize more 
> complex structures, like e.g. a hudson.tasks.BuildTrigger publisher)
> https://rm.cloudbees.com/issues/1979 (don't save all jobs when changing parts 
> of the template that don't affect the templates jobs at all)
> 
> On 26.08.2013, at 19:47, Bob Bick  wrote:
> 
>> Hi,
>> 
>> We are using the "Build after other projects are built" feature...
>> 
>> Job B is triggered to run after Job A runs. Job A is based on a CloudBees 
>> Template. The build trigger is set on Job B, not Job A.
>> 
>> Sometimes it works correctly (i.e. Job A runs and Job B is triggered. When 
>> it works correctly, I will see something like this on a Job B run:
>> 
>> Started by upstream project 
>> flight-review/weather-review-application-ci build number 308 originally 
>> caused by:
>>  * Started by an SCM change
>> However, a lot of times, Job B does not get triggered when Job A runs 
>> successfully.
>> 
>> Has anyone else ran into this issue? If so, any ideas what might be the 
>> problem?
>> 
>> Thanks,
>> Bob
>> 
>> *** *** ***
>> This message contains information which may be confidential and privileged. 
>> Unless you are the addressee (or authorized to receive for the addressee), 
>> you may not use, copy or disclose to anyone the message or any information 
>> contained in the message. If you have received the message in error,  please 
>> advise the sender by reply e-mail and delete the message.
>> 
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> --
> You received this message beca

Re: Getting Error while trying to rebuil a project in Jenkins...

2013-08-27 Thread Daniel Beck
Try to update rebuild plugin to version 1.15.

https://wiki.jenkins-ci.org/display/JENKINS/Rebuild+Plugin#RebuildPlugin-Version1.15%28Oct12%2C2012%29

On 27.08.2013, at 13:11, Manjunath DG  wrote:

> Hello!
> 
> Hello!
> I'm getting following below error while trying to rebuild a project,This is 
> not the case with all othere projects when i do rebuild.
>  
> 
>   • Jenkins
>   •
>   • BAT_Win7_Task
>   •
>   • #1128
>   •
>   • Rebuild
>  Back to Dashboard
> Skip to content
>   ccs_inst_path   
> 
> ccs_inst_path
>   
>  
>  log in
>   • Jenkins
>   •
>  Jenkins project
>  Bug tracker
>  Mailing Lists
>  https://twitter.com/jenkinsci
>   Oops!
> 
> 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: org.apache.commons.jelly.JellyTagException: 
> jar:file:/data/JENKINS/swcoe/jenkins/plugins/rebuild/WEB-INF/lib/classes.jar!/com/sonyericsson/rebuild/RebuildAction/index.jelly:54:63:
>   No page found 'TextParameterValue.jelly' for class 
> com.sonyericsson.rebuild.RebuildAction
>   at 
> org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:117)
>   at 
> org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127)
>   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:673)
>   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:777)
>   at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:381)
>   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:684)
>   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:777)
>   at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:381)
>   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:684)
>   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:777)
>   at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:239)
>   at 
> org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
>   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:684)
>   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:777)
>   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:586)
>   at org.kohsuke.stapler.Stapler.service(Stapler.java:217)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
>   at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
>   at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
>   at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
>   at 
> hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
>   at 
> net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
>   at 
> net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
>   at 
> net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:86)
>   at 
> org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
>   at 
> hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
>   at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
>   at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
>   at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
>   at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
>   at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
>   at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
>   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:118)
>   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.doFil

Re: job level permissions not taking precidence over global permissions

2013-08-29 Thread Daniel Beck
This is desired behavior in Project-based Matrix security. Try adding a 
user/group with no permissions on a specific job. This no-op entry will simply 
disappear when saving. Permissions granted globally cannot be revoked on 
specific jobs using this security strategy.

You could use Role Strategy Plugin, and specify the 'global level' using a 
regular expression with negative lookahead, thereby matching all projects 
except a few.

Alternatively, commercial Jenkins Enterprise has Role-based Access Control, 
which allows you to filter (global) roles so they don't apply to a specific 
project.

On 29.08.2013, at 22:01, Maven User  wrote:

> Hi all - 
> 
> I want to allow all users at the global level to do a few things BUT for a 
> particular job, I only want a few people to be able to run it.
> 
> I seems like once at a global level, if "authenticated users" have been 
> granted access to run a job then on a per job basis, I can't specify a subset.
> 
> Is this the desired behaviour or am I missing the boat a bit?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: rsync instead of archiving?

2013-08-29 Thread Daniel Beck
You could trigger the test/coverage build using Parameterized Trigger plugin, 
specifying the node name and workspace path the compilation ran on (i.e. the 
rsync source host and folder) as parameters.

If you're using host names for node names, you're done, otherwise, you need to 
do a little mapping in your script (or otherwise specify the host name as 
parameter).

Another option might be to try creating an archive (tar, zip, ...) from the 
sources before archiving, or using the commercial Cloudbees Fast Archiving 
plugin.

On 28.08.2013, at 23:10, Avihay Eyal  wrote:

> Hi, I have a job that builds a debug version, and a job that runs regression 
> tests and publish code coverage. The code coverage (gcovr) needs access to 
> the code base itself,
> which is close to 3 GB. I've tried archiving the workspace in the build job, 
> and using that archive in the regression job, but the archiving takes 
> forever...
> 
> So I want to use rsync from the build machine to the regression machine, is 
> that the best practice for the situation I described? To me it seems that the 
> drawback is that I'm using the actual
> machine names, when doing the rsync, therefor eliminating the abstraction of 
> jobs and nodes...
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Updated free cloubbees folders plugin, now folders don't appear, NoClassDefFoundError in log.

2013-09-03 Thread Daniel Beck
On 03.09.2013, at 20:26, "Haszlakiewicz, Eric"  wrote:

> Suggestions of what to try to fix this would be appreciated.

Try downgrading the folders plugin. They changed something related to RBAC that 
might cause this:

http://release-notes.cloudbees.com/release/Folders/3.10

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


Re: Job Parameters used in Build Steps question

2013-09-16 Thread Daniel Beck
Use a simple script (e.g. Windows batch) build step instead. Then you'll have 
full control over your build tool invocation.

On 16.09.2013, at 23:01, Bob Bick  wrote:

> Hi,
>  
> Our Jenkins jobs have various command line parameters which apply to various 
> build steps. Some build steps (e.g. Top-level Maven build, Grails build step) 
> add all of the jobs input parameters to its command line.
>  
> Q. Is there a way to limit the command line parameters that are applied to 
> the various build steps? That is, I don’t want every job input parameter to 
> be passed to the Grails and/or Maven command line.
>  
> Thanks for any help in advance,
> Bob
> 
> *** *** ***
> This message contains information which may be confidential and privileged. 
> Unless you are the addressee (or authorized to receive for the addressee), 
> you may not use, copy or disclose to anyone the message or any information 
> contained in the message. If you have received the message in error,  please 
> advise the sender by reply e-mail and delete the message.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Build Flow Plugin and artifacts management in the DSL

2013-09-19 Thread Daniel Beck
On 19.09.2013, at 20:47, nicolas de loof  wrote:

> it's just about using the adequate jenkins API
> Jenkins.instance.getItemByFullName("job").scheduleBuild(...)

Let's make this into a real example. Execution of two other jobs (in parallel 
even) below, plus copying their artifacts, all within a Groovy system build 
step.



hudson.model.queue.QueueTaskFuture build(String fullName) {
  def p = jenkins.model.Jenkins.instance.getItemByFullName(fullName)
  def thisR = Thread.currentThread().executable
  def f = p.scheduleBuild2(p.quietPeriod, new 
hudson.model.Cause.UpstreamCause(thisR))
  return f
}

def f1 = build('test-artifact-source-1')
def f2 = build('test-artifact-source-2')

// wait for both builds to finish
def b1 = f1.get()
def b2 = f2.get()

println b1.id
println b2.id

// added 'copy artifacts' because it was so easy -- not tested with execution 
on slave though, but it should work
b2.builtOn.createPath(b2.artifactsDir.canonicalPath).copyRecursiveTo(Thread.currentThread().executable.workspace)
b1.builtOn.createPath(b1.artifactsDir.canonicalPath).copyRecursiveTo(Thread.currentThread().executable.workspace)

return 0



http://javadoc.jenkins-ci.org is a great resource for stuff like this. And if 
you want to see how others accomplished something, well, almost all plugins, 
including build flow, are open source...

Regards
Daniel

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


Re: Jenkins using wrong JDK

2013-09-20 Thread Daniel Beck
Known issue: https://issues.jenkins-ci.org/browse/JENKINS-17373

On 20.09.2013, at 18:31, Geoff Cummings  wrote:

> You will only see the JDK list box in the job config if you have more
> than one JDK installation configured in your main jenkins config page
> 
> On 20 Sep 2013, at 17:16, Les Mikesell  wrote:
> 
> On Fri, Sep 20, 2013 at 8:39 AM, Farrukh Najmi  wrote:
>> Hi Guys,
>> 
>> Initially all was well and my Jenkins config.xml was configured for just
>> JDK7.
>> I then added a JDK6 installation to Jenkins config and did a new build
>> manually.
>> The build failed and on examination I realized my project requires JDK7 to
>> build.
>> So I edited my Jenkins config to delete the JDK6 installation I had added
>> prior to previous build that had failed.
>> Now only the JDK7 installation was left in Jenkins config.
>> 
>> I did another build but now I see that it is still trying to build with JDK6
>> only instead of the JDK6 installation I had added from Oracle it is now
>> using the JDK 6 that is part of my Ubuntu setup.
>> 
>> What am I doing wrong and how can I make Jenkins only use the JDK7 that I
>> have configured?
> 
> You should be able to use multiple JDK versions and select them by
> job.   In the global jenkins configuration under JDK installations,
> give each JDK a name, then in the node configurations under tool
> locations, add the appropriate path to each named JDK installation.
> And in the job, pick the JDK version by name.
> 
> -- 
> Les Mikesell
>lesmikes...@gmail.com
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 

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


Re: Jenkins (UnitTest with xUnit Plugin)

2013-09-21 Thread Daniel Beck
Did you specify a pattern relative to the workspace root where the plugin can 
find your test reports? If so, di you verify that your pattern actually matches 
the location where the files are created?

On 21.09.2013, at 16:16, sagar g  wrote:

> Hi All,
> 
> I am a scala developer i am using SBT Build tool and SVN Sub Version , Now i 
> have installed the xUnit plugin i Jenkins
> 
> I added a post-build action : "Publish xUnit test result report" Then, in 
> this post-build step I added :UnitTest-1.4(default)
> 
> While Building the Job i Struck with the Error Below:
> 
> Build step 'Build using sbt' changed build result to SUCCESS
> Archiving artifacts
> [xUnit] [INFO] - Starting to record.
> [xUnit] [INFO] - Setting the build status to FAILURE
> [xUnit] [INFO] - Stopping recording.
> Build step 'Publish xUnit test result report' changed build result to FAILURE
> Recording fingerprints
> Finished: FAILURE 
> 
> 
> Please give me suggestions
> 
> Best Regards,
> Sagar. 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Jenkins Automatically Deleting Build Logs

2013-09-23 Thread Daniel Beck
Did you rename these projects since the last Jenkins restart?

https://issues.jenkins-ci.org/browse/JENKINS-18678

On 23.09.2013, at 12:42, Manjunath DG  wrote:

> 
> Hi All,
> There are three projects for which Jenkins is automatically deleting the logs 
> despite the fact settings are otherwise, The logs are getting deleted hourly 
> only specific to those 3 projects. Rest all other projects are not having any 
> concern.Unable to find the root cause of this issue. Can someone please help 
> us to fix this and if noticed the same in past.
> Our environment is with Jenkins version 1.522 and running on Ubuntu Os.
> I have all set with Discard Old Builds, But still noticing the logs are not 
> stored. This is not the case with other projects. I have almost 100 projects 
> and out of this only 3 projects are having issue.
>  
> Discard Old Builds
>  
> Strategy
> 
>  
>  
> Days to keep builds
> if not empty, build records are only kept up to this number of days
>  
> Max # of builds to keep
> if not empty, only up to this number of build records are kept
>  
>  
> Thank  you and Best Regards,
> Manjunath D G
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Can't hg clone my Kiln repository from Jenkins running on Ubuntu

2013-09-24 Thread Daniel Beck
I'm not sure about Mercurial specifically, but it's complaining about the 
_host_ key. Run some hg command against that repo from the Jenkins node 
interactively once, you'll probably be prompted to confirm the host key 
fingerprint. This'll get stored in ~/.ssh/known_hosts for future executions. 
Then try again.

On 22.09.2013, at 01:49, bluntcoder  wrote:

> Hi there,
> 
> I'm trying to get my new project setup on a new Jenkins build, installed on 
> Ubuntu Linux. I use Kiln by FogBugz. I've tried many different solutions 
> based on tons of research on the net. But still this is my output:
> 
> $ hg clone --rev default --noupdate 
> ssh://mikut...@mikutech.kilnhg.com/Repositories/Group/Corpsite 
> /var/lib/jenkins/jobs/Corpsite/workspace
> remote: Host key verification failed.
> abort: no suitable response from remote hg!
> 
> 
> At first I tried doing it with https, but that wouldn't work for writing to 
> the repo, so I switch to SSH.
> 
> The steps I took were as follows:
>   • Installed nginx, jenkins and hg on my Ubuntu machine with apt.
>   • Created an access token (a way of creating a username for Jenkins 
> access) in kiln.
>   • Added in to my /var/lib/jenkins/.hgrc file, since it looks like 
> running as the "jenkins" user in linux.
>   • Created an SSH key and placed the private key in the 
> /var/lib/jenkins/.ssh folder.
>   • Added the public key to my kiln configuration.
> I'm hoping someone here that's active uses Kiln and can help me. Otherwise if 
> people don't know what's going on could someone give me insight on how to 
> debug this? Maybe a way to write my own hg command in the Jenkins project so 
> I can force to use my ssh key? Or perhaps how to turn on debug/verbose mode 
> on logs so that I can figure out what's going on? Or where it's searching for 
> my keys?
> 
> Thanks,
>   Mark
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Problem creating view programatically

2013-09-25 Thread Daniel Beck
It helps if you mention the Jenkins version.

On 1.509.3, the following works:

def listView = new ListView("my-view", Jenkins.instance)
listView.includeRegex = "pattern"
listView.includePattern = java.util.regex.Pattern.compile("pattern")
Jenkins.instance.addView(listView)
Jenkins.instance.save()

While there's a ListView#setIncludeRegex(String) on master that does this 
automatically, it was only added in 1.526.

On 25.09.2013, at 23:23, Rui Fernando Hayashi  wrote:

> Hi
> 
> I'm trying to create a view programatically using code like this:
> 
> def listView = new ListView("my-view", Jenkins.instance)
> listView.includeRegex = "myregex"
> Jenkins.instance.addView(listView)
> Jenkins.instance.save()
> 
> The view is created, but the jobs that match the regex are not listed. The 
> jobs are only listed if I edit the view and save it (through the GUI).
> 
> Any ideas?
> 
> Tks
> 
> Rui
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: How can I view the pass/fail rate of a job

2013-09-26 Thread Daniel Beck
You could use the Project Statistics Plugin.

On 26.09.2013, at 14:18, Didac Herrera  wrote:

> I want to view the pass/fail rate of the jobs executions
> Example:
> 
> Task X
> 
> - Executed 12441 times
> - Pass 12000 times
> - Fail 441
> 
> Is there this posibility without counting executions results manually?
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Slave ${WORKSPACE} not set correctly

2013-10-05 Thread Daniel Beck

On 04.10.2013, at 22:24, Andrew Barber  wrote:

> Ok, after some testing with a newer release, I have narrowed it down to 
> Environment Injector Plugin.  When this plugin is enabled, WORKSPACE is 
> incorrect on slave nodes.  Disable it and everything is good.  I'll have to 
> move my bug over to the plugin.

Maybe it's https://issues.jenkins-ci.org/browse/JENKINS-13348 ?


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


Re: List Jobs by plugins used?

2013-10-07 Thread Daniel Beck
If you're a Jenkins Enterprise customer, check out 
http://release-notes.cloudbees.com/product/Plugin+Usage+Plugin

I also wrote a Groovy system script (Groovy plugin) a while back that generates 
an HTML report of all used builders, publishers, build wrappers, and project 
types. I just have to find it :-)

On 07.10.2013, at 10:54, Steffen Breitbach  wrote:

> Hi everyone!
> 
> Is there a way to list all jobs that use a certain plugin?
> 
> Scraping the config.xmls would be OK as a last resort.
> 
> Thans in advance
> 
> Steffen
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 

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


Re: LTS 1.509.3 -- Bad Fingerprint Invasion

2013-10-08 Thread Daniel Beck
It looks like you're referring to 
https://issues.jenkins-ci.org/browse/JENKINS-19515 which will be fixed in 
1.509.4. There's already an RC, so you could try upgrading.

Did you test the 1.509.3 RC when it was available for almost four weeks before 
the final version was released?

On 09.10.2013, at 04:21, jieryn  wrote:

> bash$ find /var/lib/jenkins/fingerprints/ -type f | while read fp ; do
> xmllint --format $fp >/dev/null ; if [[ "$?" == "1" ]] ; then echo
> stupid $fp ; rm $fp ; fi ; done
> 
> Why do I have to do this? This seems like a huge failure. Not sure how
> this got to LTS..
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 

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


Re: List Jobs by plugins used?

2013-10-09 Thread Daniel Beck
The following 'Groovy system' (requires Groovy plugin) build step script works 
for Project subclasses, i.e. freestyle projects. This works well enough for me, 
you might need to adapt for other project types (like Maven).

It prints lists of projects by publisher/build wrapper/builder/trigger, and 
provides both the builder/... name and the name of the plugin it came in. It 
assumes Jenkins context is at / (i.e. http://host/ , not http://host/jenkins/ ) 
for links to jobs. Sorted ascending by number of jobs.



def projects = 
jenkins.model.Jenkins.instance.getAllItems(hudson.model.Project.class)

def projectsByDescriptor = [:]

for (def p in projects) {
  def items = new ArrayList(p.publishers.values())
  items.addAll(p.builders)
  items.addAll(p.properties.values()) // haven't actually tried this line in an 
instance that has job properties
  items.addAll(p.triggers.values())
  items.addAll(p.buildWrappers.values())
  items.add(p)
  for (def item in items) {
def desc = item.descriptor
if (!projectsByDescriptor.containsKey(desc))
  projectsByDescriptor.put(desc, [])
if (!projectsByDescriptor[desc].contains(p))
  projectsByDescriptor[desc].add(p)
  }
}

def s = ''<<''
for (def desc in projectsByDescriptor.keySet().sort { 
projectsByDescriptor.get(it).size() }) {
  s << '' + desc.displayName + '\n' + 
(desc.plugin?.displayName?:'Core') + ''
  for (def proj in projectsByDescriptor.get(desc)) {
s << "${proj.fullDisplayName}\n"
  }
  s << '\n'
}

def ws = Thread.currentThread()?.executable.workspace
ws.child('report').mkdirs()
ws.child('report/usage.html').write(s.toString(), 'UTF-8')



This can be made available using the HTML Publisher plugin, folder is 'report', 
index page 'usage.html'.

WTFPL license if it matters.

On 07.10.2013, at 10:54, Steffen Breitbach  wrote:

> Hi everyone!
> 
> Is there a way to list all jobs that use a certain plugin?
> 
> Scraping the config.xmls would be OK as a last resort.
> 
> Thans in advance
> 
> Steffen
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 

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


Re: Attach report text files to build?

2013-10-09 Thread Daniel Beck
HTML Publisher, despite the name, can also publish text files to be displayed 
in the web browser. In fact, it'll archive anything in the directory you 
specify, so you should write those reports into a subdirectory.

Alternatively, Sidebar-Link Plugin and link to 
'lastSuccessfulBuild/archive/path/to/textfile.txt' (you need to archive the 
text files as artifacts).

On 09.10.2013, at 22:06, cmp...@gmail.com wrote:

> I cannot figure out if any of the existing plugins can do this:
> 
> I want to execute a job which generates a bunch of text files that should be 
> attached to the job.
> Is it possible to have a link to all report files when the job is finished?
> I can see that Junit can display report contents. 
> 
> Thanks,
> Christian
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Role Strategy Plugin - how to apply multiple patterns in project roles

2013-10-11 Thread Daniel Beck
There's no way to define multiple patterns for a given role (which would enable 
different permissions depending on the job for the same role).

But the pattern '(RB|HMI|JXE)_MIB.*' should do it. Maybe look up the 
java.util.regex.Pattern docs?

On 11.10.2013, at 13:25, Jan Seidel  wrote:

> 
> 
> Hi folks,
> 
> I am setting up Role Strategy as too many people can peek and poke in too 
> many jobs and mess around.
> We have many build jobs which leads me to a problem when assigning Roles in 
> Projects roles.
> 
> I need multiple patterns for a single role if possible.
> e.g. the role MIB admin must access all jobs starting with (?i)RB_MIB.*, 
> (?i)HMI_MIB.* and (?i)JXE_MIB.* but not (?i)MB_GUIDE_MIB.* nor any other job 
> that is outside of the scope of this project.
> So simply taking (?i).*MIB.* won't work.
> 
> Is it possible to use multiple patterns for one role and if yes, how?
> 
> Cheers
> Jan
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Job category-based security

2013-10-15 Thread Daniel Beck
You could use the Role Strategy Plugin, if your 'job categories' are reflected 
in the job names, as it uses regular expression pattern matching on the job 
name to assign permissions.

Alternatively, organize your jobs in folders (Cloudbees Folders plugin) and 
assign permissions based on these item groups. Could work with Project-based 
matrix, but I'm not sure. Requires the commercial RBAC plugin otherwise.

On 15.10.2013, at 20:57, Scott Danzig  wrote:

> Is there a way to specify security settings for a particular 
> category/group/type of job?  For instance, if I'd people from the QA LDAP 
> group to only be able to run "test-only" jobs, is there a way to easily 
> specify certain jobs as test jobs and then do a one time security setting for 
> all of them?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Jenkins 1.514 successfully uses explicitly told ANT version to build, but fails to find ANT when asking to use "Standard".

2013-10-18 Thread Daniel Beck
The 'default' tool version uses whatever is the preferred version on the node's 
PATH. In this case, there is none.

This can be useful when you don't care about the Java version used in a job, 
and have the executing node use its default installation without having to 
configure the path for every node, or an auto-installer.

On 18.10.2013, at 10:56, k...@quipsy.de wrote:

> I have installed Jenkins 1.514 and told it to automatically provide solely 
> ANT 1.9.2 from Apache. So there is only ANT 1.9.2 on Master and no other ANT 
> installation.
> Then I created a project with the "Run Ant" build task and explicitly 
> specified to use "ANT 1.9.2" in the "ANT version" configuration line.
> The project builds very well.
> 
> Then I removed "ANT 1.9.2" and replaced it by "Standard".
> The project does not build now. It says I have to configure the ANT version 
> in the job config.
> 
> This is weird. What is "Standard" good for, if it neither automatically 
> chooses the sole ANT installation found on Master, nor allows me to configure 
> "ANT 1.9.2" to be "Standard"?
> 
> Thanks!
> -Markus
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Jenkins 1.514 successfully uses explicitly told ANT version to build, but fails to find ANT when asking to use "Standard".

2013-10-22 Thread Daniel Beck
I used the tool whose version is least significant in most of my jobs as 
example, but as you're facing the exact same situation with Ant, it applies as 
well.

That's basically the use case: You install Ant system-wide (e.g. from your 
Linux distro's repository), it's put into your PATH (possibly automatically), 
and that'll get used by Jenkins as the default version. No matter what node you 
build on, it uses the system-wide default Ant installation.

If you still want Jenkins to install it, but still don't care about the 
version, just define an installation, call it 'Any Ant', and select _any_ of 
the auto-installer choices, configure your jobs to use it, and be done with it. 
Or redefine PATH (or even just ANT_HOME?) on the node level.

On 22.10.2013, at 12:24, k...@quipsy.de wrote:

> Are you sure you are talking about ANT? It sounds like you talk about JDK.
> 
> Am Freitag, 18. Oktober 2013 18:55:22 UTC+2 schrieb Daniel Beck:
> The 'default' tool version uses whatever is the preferred version on the 
> node's PATH. In this case, there is none. 
> 
> This can be useful when you don't care about the Java version used in a job, 
> and have the executing node use its default installation without having to 
> configure the path for every node, or an auto-installer. 
> 
> On 18.10.2013, at 10:56, ka...@quipsy.de wrote: 
> 
> > I have installed Jenkins 1.514 and told it to automatically provide solely 
> > ANT 1.9.2 from Apache. So there is only ANT 1.9.2 on Master and no other 
> > ANT installation. 
> > Then I created a project with the "Run Ant" build task and explicitly 
> > specified to use "ANT 1.9.2" in the "ANT version" configuration line. 
> > The project builds very well. 
> > 
> > Then I removed "ANT 1.9.2" and replaced it by "Standard". 
> > The project does not build now. It says I have to configure the ANT version 
> > in the job config. 
> > 
> > This is weird. What is "Standard" good for, if it neither automatically 
> > chooses the sole ANT installation found on Master, nor allows me to 
> > configure "ANT 1.9.2" to be "Standard"? 
> > 
> > Thanks! 
> > -Markus 
> > 
> > 
> > -- 
> > 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/groups/opt_out. 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Null pointer exception in ExtendedEmailPublisher after updated jenkins it's plugin and build script- Jenkins ver. 1.536 - Email Extension Plugin ver. 2.35.1

2013-10-22 Thread Daniel Beck
I think we had this just yesterday, try removing and adding the email-ext 
publisher, then make sure to add a trigger (e.g. 'Success').

On 22.10.2013, at 14:59, mubbashir  wrote:

> Hi guys, 
> 
> Today I had updated jenkins and it's plugin, after the update I am getting 
> some weird exception as soon as jenkins is done with scm This will only 
> happen if the build script of a job is updated.
> 
> After updating the build script I wasn't able to save the job (see below the 
> exception 1 )
> - I open the advance option of the editable email and there were couple of 
> empty values in the triggers advance option
> - I deleted all the triggers, added new triggers
> - I was able to save the the job
> - On  executing the build I got null pointer exception  (see below the 
> exception 2 , couldn't find the complete stack trace)
> 
> I removed the editable email notifications from post build actions run the 
> build it worked fine. 
> 
> I got the same null pointer exception on adding the editable email 
> notification again. 
> 
> Any thoughts?
> 
> _
> 
> 
> Exception 1 (unable to save the job):
> 
> Oops!
> 
> 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.RuntimeException: Failed to 
> instantiate class hudson.plugins.emailext.ExtendedEmailPublisher from 
> {"project_recipient_list":"$DEFAULT_RECIPIENTS","project_replyto":"$DEFAULT_RECIPIENTS","project_content_type":"default","project_default_subject":"$DEFAULT_SUBJECT","project_default_content":"$DEFAULT_CONTENT","project_attachments":"","project_attach_buildlog":"0","project_presend_script":"","project_save_output":false,"project_triggers":[{"stapler-class":"","kind":""},{"stapler-class":"","kind":""},{"stapler-class":"","kind":""},{"stapler-class":"","kind":""},{"stapler-class":"","kind":""}],"stapler-class":"hudson.plugins.emailext.ExtendedEmailPublisher","kind":"hudson.plugins.emailext.ExtendedEmailPublisher"}
> at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:777)
> at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
> at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
> at 
> org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
> at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:727)
> at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
> at org.kohsuke.stapler.Stapler.invoke(Stapler.java:630)
> at org.kohsuke.stapler.Stapler.service(Stapler.java:224)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
> at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
> at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
> at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 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.

Re: Different behavior while executing puppet lint through jenkins

2013-10-22 Thread Daniel Beck
You don't have your usual shell environment when running a command from 
Jenkins. Compare the output of the 'env' command.

>From the installation instructions at https://rvm.io/rvm/install, it looks 
>like you just need to add the command

source $HOME/.rvm/scripts/rvm

before your find command.

On 22.10.2013, at 17:15, Maneesh M P  wrote:

> Puppet-lint just works fine while executing the command from build server 
> console using the below command
> 
> find . -iname *.pp -exec puppet-lint --log-format 
> "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" {} \;
> 
> But gives all sorts of error while executing same command through jenkins 
> "execute shell" option
> 
> 
> + find . -iname '*.pp' -exec puppet-lint --log-format 
> '%{path}:%{linenumber}:%{check}:%{KIND}:%{message}' '{}' ';'
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
>  `to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
> bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
> rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
> (Gem::LoadError)
>   from 
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
>  `to_spec'
>   from 
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
>  `gem'
>   from /home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in 
> `'
>   from 
> /home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
> `eval'
>   from 
> /home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
> `'
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
>  `to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
> bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
> rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
> (Gem::LoadError)
>   from 
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
>  `to_spec'
>   from 
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
>  `gem'
>   from /home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in 
> `'
>   from 
> /home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
> `eval'
>   from 
> /home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
> `'
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
>  `to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
> bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
> rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
> (Gem::LoadError)
>   from 
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
>  `to_spec'
>   from 
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
>  `gem'
>   from /home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in 
> `'
>   from 
> /home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
> `eval'
>   from 
> /home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
> `'
> /home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
>  `to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
> bundler-unload-1.0.2, executable-hooks-1.2.6, 
> 
> 
> Why is the two different behavior? what is happening while executing through 
> jenkins? can anyone help?
> 
> Thanks,
> M
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Problems in login using LDAP server

2013-10-22 Thread Daniel Beck
What's shown on /whoAmI ?

On 22.10.2013, at 23:01, Mauricio Fuentes Montero  
wrote:

> Hi everyone,
> 
> I'm trying to configure security for a new instance of jenkins using LDAP. 
> Our LDAP server allows anonymous queries and I've set up all the needed 
> information on jenkins. When I try to login, I enter the username and 
> password and press the "log in", I understand that if the login went ok I 
> should see my username on the top-right corner of the next screen, but 
> nothing happened. I enabled the login for hudson.security.* and I saw the 
> following log, among others:
> ...
> 
> 21-Oct-2013 19:38:50.639 FINE [http-nio-8080-exec-6] 
> hudson.security.AuthenticationProcessingFilter2.successfulAuthentication 
> Authentication success: 
> org.acegisecurity.providers.UsernamePasswordAuthenticationToken@b475870f: 
> Username: org.acegisecurity.userdetails.ldap.LdapUserDetailsImpl@104c2b; 
> Password: [PROTECTED]; Authenticated: true; Details: 
> org.acegisecurity.ui.WebAuthenticationDetails@6a82: RemoteIpAddress: 
> 127.0.0.1; SessionId: 92846AB177A1833E208B166B7EFAE16E; Granted Authorities: 
> arquitectura, authenticated, all, ROLE_ARQUITECTURA, ROLE_ALL
> 21-Oct-2013 19:38:50.639 FINE [http-nio-8080-exec-6] 
> hudson.security.AuthenticationProcessingFilter2.successfulAuthentication 
> Updated SecurityContextHolder to contain the following Authentication: 
> 'org.acegisecurity.providers.UsernamePasswordAuthenticationToken@b475870f: 
> Username: org.acegisecurity.userdetails.ldap.LdapUserDetailsImpl@104c2b; 
> Password: [PROTECTED]; Authenticated: true; Details: 
> org.acegisecurity.ui.WebAuthenticationDetails@6a82: RemoteIpAddress: 
> 127.0.0.1; SessionId: 92846AB177A1833E208B166B7EFAE16E; Granted Authorities: 
> arquitectura, authenticated, all, ROLE_ARQUITECTURA, ROLE_ALL'
> 21-Oct-2013 19:38:50.640 FINE [http-nio-8080-exec-6] 
> hudson.security.AuthenticationProcessingFilter2.successfulAuthentication 
> Redirecting to target URL from HTTP Session (or default): /manage
> ...
> 
> This makes me think that everything is ok, but I'm not logged in.
> 
> Does anybody know why this happens?
> 
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Problems in login using LDAP server

2013-10-22 Thread Daniel Beck
On 22.10.2013, at 23:21, Mauricio  wrote:

> Are you refering to the *nix command or is that a Jenkins plugin?

That's a URL path to a Jenkins page with some diagnostic information about your 
user account. Open http://jenkinshost/whoAmI or 
http://jenkinshost/jenkins/whoAmI (depending on your configuration) in your 
browser after logging in.

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


Re: Different behavior while executing puppet lint through jenkins

2013-10-22 Thread Daniel Beck
So it's probably something in your /etc/profile or .bash_profile.

You can use a shebang line in 'Execute Shell' build steps to change how the 
shell is invoked (default is -xe), `#!/bin/bash -l` might work there as well.

On 23.10.2013, at 00:56, Maneesh M P  wrote:

> I solved this issue by launching the slave manually using the command ssh 
> bu...@3.ab.xy.com 'bash -l -c "java -jar /home/build/jenkins/slave.jar"'
> 
> 
> On Tuesday, October 22, 2013 11:17:10 AM UTC-7, Maneesh M P wrote:
> If i execute using ssh also I get the same error like jenkins
> 
>  ssh -l build 300.ab..xy.com "find . -iname *.pp -exec puppet-lint 
> --log-format "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" {} \;"
> 
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
>  `to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
> bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
> rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
> (Gem::LoadError)
> from 
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
>  `to_spec'
> from 
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
>  `gem'
> from /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in 
> `'
> from 
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `eval'
> from 
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
> `'
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
>  `to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
> bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
> rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
> (Gem::LoadError)
> from 
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
>  `to_spec'
> from 
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
>  `gem'
> from /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in 
> `'
> from 
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `eval'
> from 
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
> `'
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
>  `to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
> bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
> rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
> (Gem::LoadError)
> from 
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
>  `to_spec'
> from 
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
>  `gem'
> from /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in 
> `'
> from 
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `eval'
> from 
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
> `'
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
>  `to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
> bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
> rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
> (Gem::LoadError)
> 
> 
> Not getting any clue to fix this issue, any help please?
> 
> 
> On Tuesday, October 22, 2013 11:00:44 AM UTC-7, Maneesh M P wrote:
> I did that, I tried providing all path through slave properties as well. But 
> still no luck.
> Is there a way I can make jenkins use same shell environment? 
> 
> Thanks,
> M
> 
> On Tuesday, October 22, 2013 9:30:48 AM UTC-7, Daniel Beck wrote:
> You don't have your usual shell environment when running a command from 
> Jenkins. Compare the output of the 'env' command. 
> 
> From the installation instructions at https://rvm.io/rvm/install, it looks 
> like you just need to add the command 
> 
> source $HOME/.rvm/scripts/rvm 
> 
> before your find command. 
> 
> On 22.10.2013, at 17:15, Maneesh M P  wrote: 
> 
> > Puppet-lint just works fine while executing the command from build server 
> > console using the below command 
&

Re: Problems in login using LDAP server

2013-10-24 Thread Daniel Beck

On 22.10.2013, at 23:01, Mauricio Fuentes Montero  
wrote:

>  RemoteIpAddress: 127.0.0.1;

Is Jenkins behind a reverse proxy? What happens when you try to access it 
directly? When you go to 'Manage Jenkins', does an error about your reverse 
proxy setup appear? Did you configure the URL to Jenkins in the global 
configuration?

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


Re: Compiler warnings script in global configuration

2013-10-25 Thread Daniel Beck
Do you use the Timestamper plugin on the affected job? Does it work when you 
remove that feature from the job?

On 25.10.2013, at 02:12, Maneesh M P  wrote:

> I copied the error and paste to Example log file box and it just works fine 
> there. Even in the sample log box, I pasted with or without time stamp  and 
> my regular expression correctly identified the require fields.
> But then why is it not able to detect from console log?
> 
> Thanks,
> Maneesh
> 
> On Thursday, October 24, 2013 3:57:54 PM UTC-7, Ullrich Hafner wrote:
> 
> Am 25.10.2013 um 00:42 schrieb Maneesh M P :
> 
>> Yes, there is a [WARNINGS] line in the console 
>> 
>> 13:36:20 
>> Validating ./modules/xyxz/tests/init.pp ...
>> 
>> 13:36:20 [WARNINGS] Parsing warnings in console log with parser 
>> Puppet-Error-Parser
>> 
> 
> I see, i.e. the parser is running. Seems that no match is found. Did you 
> paste the conflicting line of console log into the example text box? Maybe 
> the expression is not exactly the same (note the timestamp is automatically 
> removed!)…
> 
> 
>> Sorry I could not understand "what is shown n the select page of a build", 
>> which page are you referring to ?
> 
> 
> You only show the overall job status. You can navigate to the results of each 
> build, there you will see a summary of the warnings plugin
> See right image in 
> https://wiki.jenkins-ci.org/display/JENKINS/Static+Code+Analysis+Plug-ins#StaticCodeAnalysisPlug-ins-summary
> 
> 
>> I am attaching the three screenshot of different pages
>> 
>> Thanks,
>> Maneesh
>> 
>> On Thursday, October 24, 2013 1:30:53 PM UTC-7, Ullrich Hafner wrote:
>> And are there messages in the console log from the warnings plugin? They 
>> start with [WARNINGS] in the console log.
>> And what is shown if you select the page of a build (not the job)?
>> 
>> Ulli
>> 
>> Am 24.10.2013 um 22:11 schrieb Maneesh M P :
>> 
>>> Yes, I did enable the post build option for compiler warnings. Please see 
>>> the attached images.
>>> 
>>> On Thursday, October 24, 2013 11:19:59 AM UTC-7, Ullrich Hafner wrote:
>>> Did you enable the collection of compiler warnings in your job?
>>>  
>>> Am 24.10.2013 um 02:23 schrieb Maneesh M P :
>>> 
 I did not get that question, there was nothing in the console output. I am 
 attaching the images, please take a look
 
 Thanks
 M
 
 On Wednesday, October 23, 2013 2:59:15 PM UTC-7, Ullrich Hafner wrote:
 But was is the output of the plugin in the console log?
 
 Am Mittwoch, 23. Oktober 2013 schrieb Maneesh M P :
 Yes, there is no side panel link. But the error Trend graph is displayed 
 on the right side with no "error" data. 
 Just wondering why it is not capturing the error, since my regexp detected 
 correctly from sample log
 
 On Wednesday, October 23, 2013 8:30:03 AM UTC-7, Ullrich Hafner wrote:
 What is in your console log? Is there no side panel link?
 
 Ulli
 
 Am 23.10.2013 um 10:19 schrieb Maneesh M P :
 
> Ok finally I am able to figure out the regular expression -> ^.*(err:) 
> (.*)at(.*\.pp):(\d+)$
> But I had to change the order of mapping script strings the way it is 
> assigned, that shouldnt be a problem i guess.
> 
> import hudson.plugins.warnings.parser.Warning
> 
> String category = matcher.group(1)
> String message = matcher.group(2)
> String fileName = matcher.group(3)
> String lineNumber = matcher.group(4)
> 
> 
> return new Warning(fileName, Integer.parseInt(lineNumber), "Dynamic 
> Parser", category, message);
> 
> Now I configure the job with Name I gave for parser, But i don't see any 
> "Link name" displayed in the build page :(
> any clue?
> 
> Thanks,
> M
> 
> On Tuesday, October 22, 2013 11:32:14 PM UTC-7, Maneesh M P wrote:
> Yeah, I found that now.. Thank you!! But I am not able to figure out a a 
> regular expression for below pattern
> 
> 19:35:11 err: Could not parse for environment production: Syntax error at 
> '{'; expected '}' at 
> /home/build/jenkins/workspace/puppet-parser-try/modules/profile/manifests/shard/master.pp:5
> 19:35:11 err: Try 'puppet help parser validate' for usage
> 
> Whatever I write, I get this error "The regular expression does not match 
> the example text."
> 
> Thanks,
> M
> 
> On Tuesday, October 22, 2013 10:31:49 PM UTC-7, Ullrich Hafner wrote:
> Isn't there an example in the help of the script and regular expression 
> text fields?
> 
> Ulli
> 
> Am Mittwoch, 23. Oktober 2013 schrieb Maneesh M P :
> I would like to add a "error" finding script for our project. I know I 
> can add a groovy script under compiler warning global configuration.
> Can anyone give me complete example of the global configuration and a 
> groovy script ?
> 
> Thanks,
> M
> 
> -- 
> You received this messa

Re: Setting "Started by" value?

2013-10-25 Thread Daniel Beck
Try this:

https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Pushnotificationfromrepository

Set the job to poll once a day or so ('H H * * *') to enable it to react to 
that call.

On 25.10.2013, at 22:23, cscooper  wrote:

> I have a post-commit hook in GIT that launches the associated Jenkins job by
> loading http://jenkins/job/buildWithParameters using cURL - the problem is
> that job says "Started by anonymous user" which, while accurate, is not
> entirely helpful.
> 
> Is there a way to pass information in the URL so that Jenkins can accurately
> say "Started due to a GIT change"?  Or any random "Started by XYZ"?
> 
> I have seen suggestions that I can put the information in the console log,
> or some other parameter, but those aren't going to be as obvious as if I can
> put it in the "Started by" line.
> 
> Thanks,
> Chris
> 
> 
> 
> 
> --
> View this message in context: 
> http://jenkins-ci.361315.n4.nabble.com/Setting-Started-by-value-tp4679454.html
> Sent from the Jenkins users mailing list archive at Nabble.com.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 

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


  1   2   3   4   5   6   7   8   9   10   >