RegEx Email Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID regexemail Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
0.3 (archives)
Jan 31, 2010
1.318
Source Code
Issue Tracking
Maintainer(s)
Subversion
Open Issues
Justin Edelson (id: justinedelson)
Usage Installations 2014-Jul 586
2014-Aug 559
2014-Sep 587
2014-Oct 557
2014-Nov 558
2014-Dec 552
2015-Jan 561
2015-Feb 564
2015-Mar 588
2015-Apr 592
2015-May 583
2015-Jun 579

This plugin allows you to generate user email addresses from usernames.

RegEx Email plugin

This plugin allows you to generate user email addresses from usernames using regular expressions and Java format strings. Because there is no UI support for mail resolver configuration, you have to configure this plugin manually. That's done by creating a file named com.mtvi.plateng.hudson.regex.RegexMailAddressResolver.xml and dropping it in the HUDSON_HOME directory. Here's an example configuration file:

<?xml version='1.0' encoding='UTF-8'?>
<com.mtvi.plateng.hudson.regex.Configuration>
 <userNameExpression>(.*) (.*)</userNameExpression>
 <emailAddressPattern>%s.%s@foo.com</emailAddressPattern>
</com.mtvi.plateng.hudson.regex.Configuration>

As of version 0.2 of the plugin, you can specify multiple regular expression/email address pattern pairs:

<?xml version='1.0' encoding='UTF-8'?>
<com.mtvi.plateng.hudson.regex.MultiConfiguration>
    <configurations>
        <com.mtvi.plateng.hudson.regex.Configuration>
            <userNameExpression>(.*) (.*) (.*)</userNameExpression>
            <emailAddressPattern>%s.%s-%s@foo.com</emailAddressPattern>
        </com.mtvi.plateng.hudson.regex.Configuration>
        <com.mtvi.plateng.hudson.regex.Configuration>
            <userNameExpression>(.*) (.*)</userNameExpression>
            <emailAddressPattern>%s.%s@foo.com</emailAddressPattern>
        </com.mtvi.plateng.hudson.regex.Configuration>
    </configurations>
</com.mtvi.plateng.hudson.regex.MultiConfiguration>

Note that the top-level element changes when you are using multiple configurations. Also note that if multiple regular expressions are potential matches (as in the case above), care must be taken to ensure the order is correct.

Version History

Version 0.3 (January 31, 2010)
  • Update code for more recent Hudson
Version 0.2 (June 30, 2008)
  • Added multiple-configuration support
  • Added more logging
Version 0.1 (June 20, 2008)
  • Initial release

Labels

Edit
plugin-user plugin-user Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment