get time of actual run

2012-11-27 Thread david michael gang
Hi all,

How do i get the time of actual run of a job.
I found just a function gettime in hudson.model.Run which returns the time 
of the scheduled build, but did not find a function when the actual build 
took place.
There could be a difference, for example when there was no idle executor.

Thanks,
David


Automating Jenkins with Rerun

2012-11-27 Thread Anthony Shortland
If you're anything like us you spend a lot of time installing and 
blowing-away Jenkins as well as setting up and maintaining sets of jobs.

It's a bit tedious to do this manually, of course, so we've put together a 
shell script-based module with the view of automating the whole process.

There's some way to go to make it really comprehensive, but its useful 
enough now that I feel ready to ask people on this list to take a look and 
give me feedback on how it might be improved.

You can fork rerun-modules 
/jenkins
 on 
GitHub if you're interested in experimenting with the source code, or just 
follow 
README.md if 
you just want to install it and take it for a spin.

A word to the wise: the jenkins:remove command *really* *does* blow-away 
Jenkins as easily and automatically as jenkins:deploy sets it up ... so be 
careful out there!

Anthony Shortland.



custom log formatter for hpi:run ?

2012-11-27 Thread Max Spring

I'm struggling getting a custom formatter to play under hpi:run.

I can pass my own logging.properties on the command line:

  mvn hpi:run -Djava.util.logging.config.file=my-logging.properties

but my formatter doesn't get used.

I can switch on/off the built-in XMLFormatter.
This proves that my-logging.properties are active:

  java.util.logging.ConsoleHandler.formatter = org.example.MyFormatter
  # java.util.logging.ConsoleHandler.formatter = java.util.logging.XMLFormatter

I suspect this is similar to this problem:

  
http://jenkins.361315.n4.nabble.com/how-to-set-logging-properties-td3479817.html

But I can't figure out how to make my formatter class visible.
Adding it to the Jenkins war doesn't do the trick here.

Has anyone solved this?

Thanks!
-Max


Pull: Use build parameters in combination filters

2012-11-27 Thread ogondza
Hi, it's been two months I proposed[1] a change that propagates build 
parameters to matrix combination filters.

Several people seemed to be interested in such behaviour in the past, but 
the pull request remains unnoticed.

[1] https://github.com/jenkinsci/jenkins/pull/584/

--
oliver


Re: Mutual usage of libraries between plugins

2012-11-27 Thread Jesse Glick

On 11/27/2012 10:14 AM, Uri Scheiner wrote:

No I do not want to share library among two plugin. I was just wondering if 
there is actually different class loader per plugin. is that correct?


Yes, each plugin gets its own class loader, so it should be fine to have two unrelated plugins using different versions of the same library. Just be careful that there is 
no compile-time reference between these plugins; and beware that the thread context class loader should not be used to load library classes.


Re: More sorting options for @Extension?

2012-11-27 Thread Jesse Glick

On 11/27/2012 12:32 PM, Jerome Lacoste wrote:

there should be a way to override the ordinal (or reorder the extensions) at 
either global jenkins configuration


This should be possible, though is there a known use case for it?


or job configuration level


Not possible—extensions are global singletons.


Re: request hosting for my plugins

2012-11-27 Thread Bap

Quoting dfeng :


Copy files plugin is used to copy files from master to slave, for any files,
in any directories


If [Copy To Slave Plugin][1] does not currently offer the  
functionality that you want, can you work with the author to add it?


[1]: https://wiki.jenkins-ci.org/display/JENKINS/Copy+To+Slave+Plugin





--
View this message in context:  
http://jenkins.361315.n4.nabble.com/request-hosting-for-my-plugins-tp4646325p4647340.html

Sent from the Jenkins dev mailing list archive at Nabble.com.






Re: request hosting for my plugins

2012-11-27 Thread dfeng
Copy files plugin is used to copy files from master to slave, for any files,
in any directories



--
View this message in context: 
http://jenkins.361315.n4.nabble.com/request-hosting-for-my-plugins-tp4646325p4647340.html
Sent from the Jenkins dev mailing list archive at Nabble.com.


Re: Request for hosting

2012-11-27 Thread phil soliz
so

can i get my plugin hosted?  

phil

On Tuesday, November 20, 2012 9:24:35 AM UTC-6, Lloyd wrote:
>
> Hi all,
>
> I'd like to request hosting for my jenkins plugin which posts a message to 
> a buddycloud channel. It is currently hosted in my github repo here: 
> https://github.com/lloydwatkin/buddycloud-for-jenkins
>
> Cheers, Lloyd.
>


Re: request hosting for my plugins

2012-11-27 Thread dfeng
The following git repo can be forked:
https://github.com/mstr-dfeng/mail-reminder-plugin
https://github.com/mstr-dfeng/copy-files-plugin

Thanks
Dfeng


domi wrote
> Best is, you send us the links to your GitHub repos and we will fork it
> and grant you the required permission after.
> Domi





--
View this message in context: 
http://jenkins.361315.n4.nabble.com/request-hosting-for-my-plugins-tp4646325p4647366.html
Sent from the Jenkins dev mailing list archive at Nabble.com.


Re: Jenkins selenium page object framework

2012-11-27 Thread R. Tyler Croy

On Mon, 26 Nov 2012, Kohsuke Kawaguchi wrote:

> 
> Hi,
> 
> Moving this conversations to jenkinsci-dev@googlegroups.com.
> 
> Yes, what you are talking about is [1], which is an attempt to
> define blackbox acceptance tests in a way that lets us test our
> final deliverables (rpm, deb, etc.) It contains the page objects,
> among other things.
> 
> I think having a java library that defines page objects for Jenkins
> is useful. Go for it!


When I first started working on the selenium-tests repo, I tried to come up
with some page-object abstractions that made sense but I just couldn't find
anything that I didn't find crappy. Some of the abstractions that I ended up
defining were more focused on logical objects (Job, Build, Slave, etc).


> There's also a conversation of adding another functionality (either
> in this plugin or another one) that exposes Groovy scripting console
> in a way that lets you verify side-effects that happen on the server
> more easily.


I'm not sure if you're alluding to hooking groovy-based validation into the
selenium-tests but I would caution against it. There be dragons! Such
functionality would start effectively breaking down the testing pyramid (unit,
integration, UI tests), and becomes a huge pain in the ass over time.


Integration testing to verify side effects of things internal to Jenkins, I'm
all for though :)


> And then maybe it's possible to run selenium-tests in JRuby so that
> we can run some Java-based selenium tests in the same environment,
> which allows you to leverage pluggable layers in the selenium-tests
> and VirtualBox integrations.

Ick, I'm not going to tell anybody that's volunteering to write tests how to do
it, but mixing different platforms is going to be a lot of work, even with
JRuby, it's no silver bullet.


Just my few cents :)

Cheers
- R. Tyler Croy
--
Code: https://github.com/rtyler
 Chatter: https://twitter.com/agentdero


signature.asc
Description: Digital signature


Re: Query about running different job steps on different slaves

2012-11-27 Thread Jason Swager
This SEEMS to be a pretty cool component, allowing for some features that 
I've been dying to have in Jenkins.  Unfortunately, I'm encountering a 
number of errors as I try to use the plugin.  I'll send those along 
directly rather than clutter up the group.

Also - I would strongly recommend publishing this component like other 
Jenkins components.  It would be a great component to have if it works like 
it seems to work.

On Sunday, November 25, 2012 2:08:21 PM UTC-8, Ivan Kalinin wrote:
>
> Sure, here it is:
> http://db.tt/reV8CziX
>
> On Sunday, November 25, 2012 8:07:15 PM UTC+4, Jason Swager wrote:
>>
>> Having troubles getting a build environment built up.  Could you publish 
>> the jpi so that it could be loaded directly into Jenkins?
>>
>> On Sunday, November 25, 2012 6:19:09 AM UTC-8, Ivan Kalinin wrote:
>>>
>>> Hi there! 
>>>
>>> So have u tried that thing? 
>>> If its broken or something is missing I can try 2 fix that.
>>>
>>> On Thursday, November 22, 2012 5:31:17 PM UTC+4, alok kumar wrote:

 Hey there,
 That would be great!! Can you please share it with me?
 Also, please let me know how to get it from github as I am new to this.

 Thanks a lot for the help.

 Alok

 On Thu, Nov 22, 2012 at 12:10 PM, Ivan Kalinin wrote:

> Hi!
>
> Actually, I've managed to develop a plugin for my own needs that 
> implements what you want. It allows to 'connect' a group of slaves to 
> form 
> a so-called 'compound slave' - a virtual entity, proxying Slave.doBuild() 
> (or wassitsname) to a different subslave of the group. It adds a build 
> step 
> 'run something on a sub-node' to delegate particular build step to a 
> sub-slave. The plugin even can create 'compound' slaves on-the-fly as a 
> cloud provider from real slaves provisioned in some other cloud.
>
> If that sounds promising to you, I can share it on github (currently 
> is privately-hosted) and you can try to tweak it up to you needs.
>
> Cheers,
> pupssman.
>
>
> On Wednesday, November 21, 2012 6:18:29 PM UTC+4, alok kumar wrote:
>>
>> Hi,
>> Can anyone let me know if it is possible to execute different build 
>> steps on different slaves from within a single job?
>> Is there any plugin that supports that? If not, what can be the 
>> workaround to achieve the same?
>>
>> Any help would be greatly appreciated.
>>
>> Thanks,
>> Alok
>>
>


Re: More sorting options for @Extension?

2012-11-27 Thread Jerome Lacoste
On Tuesday, November 27, 2012 3:27:57 PM UTC+1, Jesse Glick wrote:

> On 11/27/2012 08:38 AM, Sandell, Robert wrote: 
> > I think it would be great if I could annotate my RunListener with for 
> example 
> > 
> >   
>  @Extension(beforeClass=”org.jenkins-ci.plugins.someplugin.ThatRunListener”) 
> or 
> >   
>  @Extension(afterClass=”org.jenkins-ci.plugins.someplugin.ThatRunListener”) 
> >@Extension(beforePlugin=”some-plugin”) 
> >@Extension(afterPlugin=”some-plugin”) 
>
> My $0.02: I once created a scheme for another module system that worked 
> just like you describe. It was a usability disaster (e.g. cycles 
> encountered only when testing 
> novel combinations, extensions trying to arrange themselves between other 
> extensions in long-obsolete plugins) and eventually had to be simplified to 
> just use ordinals. 
>
> > I don’t know how to find and handle cyclic references 
>
> Finding them is easy enough with a topological sort. Reporting the minimal 
> cycles preventing a topological sort is harder but doable (as I found). As 
> to recovering from 
> the situation sensibly—well, I think you just load the affected extensions 
> in an arbitrary order and hope for the best. 
>
> If you want to run before the Gerrit trigger, then pick a smaller number. 
> That is about as loosely coupled as you can get. 
>

Simple numbers is how daemons are arranged in Unix rc.levels and are 
usually sufficient for most use cases. Yet this is often easier configured 
from a centralized place.
Which makes me think that in the worst case, there should be a way to 
override the ordinal (or reorder the extensions) at either global jenkins 
configuration or job configuration level.

J


Re: Jenkins-Repository plugin unattended pull request

2012-11-27 Thread Nigel Magnay
I have (literally!) just returned from vacation..

Patch looks good. I thought there was a jenkinci fork now - maybe the IRC
bot ignored me.


On Tue, Nov 27, 2012 at 2:47 PM, Jerome Lacoste wrote:

>
>
> On Tuesday, November 27, 2012 11:08:15 AM UTC+1, Victor Bronstein wrote:
>>
>> No reply from the maintainer :(
>> What would be the process to push this change? I'm not currently a
>> committer so "instructions for dummies" would be welcome!
>> Thanks!
>>
>
> pull request looks good.
>
> I would merge it but I can't: the project isn't hosted on the jenkinsci
> account.
>
> Jerome
>


Re: Mutual usage of libraries between plugins

2012-11-27 Thread Uri Scheiner
Hi Jesse,

No I do not want to share library among two plugin. I was just wondering if
there is actually different class loader per plugin. is that correct?

On Mon, Nov 26, 2012 at 7:59 PM, Jesse Glick  wrote:

> On 11/25/2012 11:16 AM, Ulli Hafner wrote:
>
>> I think Jenkins uses a different class loader for each plug-in.
>>
>
> Yes. If you want to share a library among two plugins, you need to factor
> it into a third plugin they can depend on.
>



-- 
*Uri Scheiner*
Functional Architect | *Nolio*

*O*:972 (9) 9597307
*E:*:u...@noliosoft.com

Find out more about Nolio:
Website  | Twitter
 | Youtube  |
LinkedIn


RE: Proof of Concept - Split Mailer Into Plugin

2012-11-27 Thread Alex Earl
I'll take a look, I was working on this, but had some major stuff come
up at work.

Sent from my Windows Phone
From: oliver gondža
Sent: 11/27/2012 7:57 AM
To: jenkinsci-dev@googlegroups.com
Subject: Re: Proof of Concept - Split Mailer Into Plugin
Hi,

Since no one seemed to work on this for last couple of weeks. I have
created jenkins free of any mailer classes or resources. [1]

Jenkins now uses mailer[2] as a bundled plugin with independent release
cycle.

[1] https://github.com/jenkinsci/jenkins/pull/629
[2] https://github.com/jenkinsci/mailer-plugin

-- 
oliver


Re: Proof of Concept - Split Mailer Into Plugin

2012-11-27 Thread oliver gondža

Hi,

Since no one seemed to work on this for last couple of weeks. I have  
created jenkins free of any mailer classes or resources. [1]


Jenkins now uses mailer[2] as a bundled plugin with independent release  
cycle.


[1] https://github.com/jenkinsci/jenkins/pull/629
[2] https://github.com/jenkinsci/mailer-plugin

--
oliver


Re: Jenkins-Repository plugin unattended pull request

2012-11-27 Thread Jerome Lacoste


On Tuesday, November 27, 2012 11:08:15 AM UTC+1, Victor Bronstein wrote:
>
> No reply from the maintainer :(
> What would be the process to push this change? I'm not currently a 
> committer so "instructions for dummies" would be welcome!
> Thanks!
>

pull request looks good.

I would merge it but I can't: the project isn't hosted on the jenkinsci 
account.

Jerome


Re: More sorting options for @Extension?

2012-11-27 Thread Jesse Glick

On 11/27/2012 08:38 AM, Sandell, Robert wrote:

I think it would be great if I could annotate my RunListener with for example

   @Extension(beforeClass=”org.jenkins-ci.plugins.someplugin.ThatRunListener”) 
or
   @Extension(afterClass=”org.jenkins-ci.plugins.someplugin.ThatRunListener”)
   @Extension(beforePlugin=”some-plugin”)
   @Extension(afterPlugin=”some-plugin”)


My $0.02: I once created a scheme for another module system that worked just like you describe. It was a usability disaster (e.g. cycles encountered only when testing 
novel combinations, extensions trying to arrange themselves between other extensions in long-obsolete plugins) and eventually had to be simplified to just use ordinals.



I don’t know how to find and handle cyclic references


Finding them is easy enough with a topological sort. Reporting the minimal cycles preventing a topological sort is harder but doable (as I found). As to recovering from 
the situation sensibly—well, I think you just load the affected extensions in an arbitrary order and hope for the best.


If you want to run before the Gerrit trigger, then pick a smaller number. That 
is about as loosely coupled as you can get.


More sorting options for @Extension?

2012-11-27 Thread Sandell, Robert
Hi,
I think there has been similar discussions before, but it can diserve one more 
go :)

I am starting a fix for one of my plugins where the fix is probably going to be 
to add a RunListener instead of a post-buildstep, added in runtime, that we 
used to have.
We did it like that to make sure that the build step was running last of all 
but before any RunListeners. Especially before the GerritTrigger's RunListener 
because it needs to make some calculations before handing it over to the Gerrit 
Trigger.
I can solve the dilemma by using @Extension(ordinal=someval/somelowerval) on 
both plugins so that the one runs before the GerritTrigger does, quite easily 
since I am maintaining both plugins.

But what if I wasn't? or just want to be a bit more loosely coupled to other 
plugins.
I think it would be great if I could annotate my RunListener with for example
  @Extension(beforeClass="org.jenkins-ci.plugins.someplugin.ThatRunListener") or
  @Extension(afterClass="org.jenkins-ci.plugins.someplugin.ThatRunListener")
  @Extension(beforePlugin="some-plugin")
  @Extension(afterPlugin="some-plugin")

I did some digging and it would probably mostly involve adding logic to 
hudson.ExtensionComponent.compareTo(ExtensionComponent that) but I don't 
know how to find and handle cyclic references (class A wants to run before B 
that wants to run before C that wants to run before A), one strategy could 
simply be that if detected (however that is done) don't load any of the plugins.

Any thoughts/ideas?



Robert Sandell
Software Tools Engineer
SW Environment and Product Configuration
Development Environment

Sony Mobile Communications
Tel: +46 (0)10 80 12721
sonymobile.com

[cid:image001.jpg@01CDCCAA.7E6FB890]


<>

Re: Jenkins-Repository plugin unattended pull request

2012-11-27 Thread Victor Bronstein
No reply from the maintainer :(
What would be the process to push this change? I'm not currently a 
committer so "instructions for dummies" would be welcome!
Thanks!

On Monday, November 19, 2012 2:28:52 PM UTC+2, Victor Bronstein wrote:
>
>
> On Monday, November 19, 2012 2:20:12 PM UTC+2, Christopher wrote:
>>
>> Hi there, 
>>
>> On 19/11/12 13:08, Victor Bronstein wrote: 
>> > I've opened a pull 
>> > request https://github.com/magnayn/Jenkins-Repository/pull/11 2 weeks 
>> > ago to fix https://issues.jenkins-ci.org/browse/JENKINS-15714 but 
>> apart 
>> > from the automated response didn't get any. I'm working with a locally 
>> > built plugin on my staging server, but would like to make this fix part 
>> > of an official version. 
>> > How can I help this happen? 
>>
>> You can try sending an email to the maintainer. 
>>
>> Otherwise, if you're confident the code is working and you maybe have a 
>> test case for it, then you can just push it yourself. 
>>
>> Regards, 
>> Chris 
>>
>>
> Thanks, done that!
> I'm currently not a committer, and unfortunately I'm not familiar with the 
> plugin code at all, just checked what is causing a specific issue and fixed 
> that place, so I'm not sure how could I unit-test it. Let's hope the 
> maintainer responds.
>
> Victor
>


buildhive job configuration for backend-jenkins-plugin-info-plugin

2012-11-27 Thread Jerome Lacoste
Hei,

I've made a couple of patches to backend-jenkins-plugin-info-plugin (to add 
pull request link and buildhive statuses).
I've noticed 
that 
https://buildhive.cloudbees.com/job/jenkinsci/job/backend-jenkins-plugin-info-plugin/
 
keeps failing

I believe this project should be built using 

  atlas-package

after the atlassian tools have been installed (see 
https://developer.atlassian.com/display/DOCS/Downloads)

Jerome