email notifications based on maven pom

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

email notifications based on maven pom

Replogle, Andrew

Hello,

 

I had asked a while ago about the possibility of getting the email notification list pulled from the maven pom and I was curious if there was any headway on that, and if not, where I might look in Hudson to try and contribute such a feature =]

 

Thanks,

Andrew

Reply | Threaded
Open this post in threaded view
|

Re: email notifications based on maven pom

Kohsuke Kawaguchi
Administrator
2007/4/17, Replogle, Andrew <[hidden email]>:
> I had asked a while ago about the possibility of getting the email
> notification list pulled from the maven pom and I was curious if there was
> any headway on that, and if not, where I might look in Hudson to try and
> contribute such a feature =]

It's probably filed somewhere in the issue tracker, but honestly the
backlog is piling up faster than I can implement them.

If you are willing to work on this, that would be great. The code to
look into is MavenMailer
<http://fisheye5.cenqua.com/browse/hudson/hudson/main/core/src/main/java/hudson/maven/reporters/MavenMailer.java?r=MAIN>.

In the "end" method, you should have access to the POM. So just add
them to the "recipients" and pass that to MailSender.

Extra bonus point if you tweak MavenMailer/config.jelly so that this
behavior is configurable, like a chekbox:

  [x] notify e-mail addresses listed in POM

... or something.

--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: email notifications based on maven pom

Victor Glushenkov-2
Kohsuke Kawaguchi wrote:
> 2007/4/17, Replogle, Andrew <[hidden email]>:
>> I had asked a while ago about the possibility of getting the email
>> notification list pulled from the maven pom and I was curious if
>> there was
>> any headway on that, and if not, where I might look in Hudson to try and
>> contribute such a feature =]
>
> It's probably filed somewhere in the issue tracker, but honestly the
> backlog is piling up faster than I can implement them.
I just committed it into CVS.
The e-mail notification settings are derived from the _root_ (it is
important for multi-module projects) POM of the Maven project.
Sample configuration is:
    <ciManagement>
        <system>hudson</system>
        <url>http://linea.pharmanet.local:8888/hudson/</url>
        <notifiers>
            <notifier>
                <type>mail</type>
                <sendOnFailure>false</sendOnFailure>
               
<configuration><recipients>[hidden email]</recipients></configuration>
            </notifier>
        </notifiers>
    </ciManagement>
Note that CI system should be 'hudson' and notifier type should be 'mail'.
'sendOnFailure' option has the same meaning as Hudson's "Don't send
e-mail for every unstable build".
Recipients are specified as in Hudson: separated by space.
Element 'url' is now unused.
> Extra bonus point if you tweak MavenMailer/config.jelly so that this
> behavior is configurable, like a chekbox:
>
>  [x] notify e-mail addresses listed in POM
>
> ... or something.
I think we could do just one option for all settings that could be
derived from POMs:
[x] Derive settings from POM
It option probably should appear in the job creation page. Similar
behavior has Continuum: you can upload your root POM (we will retrieve
it in another way) and all settings are gathered from it. But I don't
ready to face Stapler and Hudson core to do it. Let's try to do little
steps. :)

--
Pharmanet, Cubus Team

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: email notifications based on maven pom

Kohsuke Kawaguchi
Administrator
2007/4/18, Victor Glushenkov <[hidden email]>:
> I just committed it into CVS.

Cool.

> The e-mail notification settings are derived from the _root_ (it is
> important for multi-module projects) POM of the Maven project.

I'll look at the code, but I thought if you write it normally, I
thought you'd be picking up configuration from modules, and isn't that
the right thing to do?

I thought in a large project people only get involved in smaller
subset of modules, and they might just list their names, there.

> I think we could do just one option for all settings that could be
> derived from POMs:
> [x] Derive settings from POM

I see. I didn't realize the POM could have the whole configuration
like this. It just kind of makes me wonder what's the point of this
<ciManagement> is. I mean, I'd imagine modifying the setting from GUI
is easier than modifying POM.

> It option probably should appear in the job creation page. Similar
> behavior has Continuum: you can upload your root POM (we will retrieve
> it in another way) and all settings are gathered from it. But I don't
> ready to face Stapler and Hudson core to do it. Let's try to do little
> steps. :)

Yes. One step at a time.

--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: email notifications based on maven pom

Victor Glushenkov-2
Kohsuke Kawaguchi wrote:
> I'll look at the code, but I thought if you write it normally, I
> thought you'd be picking up configuration from modules, and isn't that
> the right thing to do?
I just configure Maven-style job in a whole, but we can do the same
thing for particular modules in this project.
> I thought in a large project people only get involved in smaller
> subset of modules, and they might just list their names, there.
This is very special thing for each project.
In some projects submodules inherit settings from parent POM (and
probable from it's parent and so on). In some projects submodules are
separate.
I think it depends in centralization level in every particular project
and/or organization.

--
Pharmanet, Cubus Team

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]