Feature: Added a groovy script for Configuring SMTP - #17
Conversation
| def extmailServer = instance.getDescriptor("hudson.plugins.emailext.ExtendedEmailPublisher") | ||
|
|
||
| Thread.start { | ||
| sleep 15000 |
There was a problem hiding this comment.
Other groovy scripts have 10000 sleep timeout, is 15000 added for a reason?
|
@bzon please squash commits, instead of 4 there should be only 1, i leaved a comment about sleep time, everything else looks good, great PR, thank you! |
|
@anton-kasperovich the 15000 was just for testing purposes. Ok I will make it 10000 and will squash commits! |
update changed SMTP_ENABLED to ADOP_SMTP_ENABLED changed README Changed sleep 15000 to 10000
|
👍 |
|
@nickdgriffin i'm happy to merge it, not sure, did you had a reason why it wasn't merged or just busy? i think it's obvious that emails should be send from Jenkins |
|
@bzon please can you rebase? |
|
Shouldn't the setters be used instead of direct assignment for the hudson.plugins.emailext.ExtendedEmailPublisher descriptor? extmailServer.setSmtpUsername() |
|
@RobertNorthard @coltrey I wouldn't mind if someone can pick up and continue my proposed changes here. I've already the deleted the source forked repo for this PR. |
LQss11
left a comment
There was a problem hiding this comment.
Can you allow the script to configure jenkins E-mail Notification?
@nickdgriffin @anton-kasperovich
Contributing the groovy script that we are currently using in our project. It configures the SMTP settings for Extended Email and Mail Server in "Manage Jenkins".
Example required variables:
ADOP_SMTP_ENABLED=true
SMTP_SYSAD_EMAIL=john.smith@gmail.com
SMTP_USER=john.smith@gmail.com
SMTP_PASSWORD=password123
SMTP_PORT=25
SMTP_HOST=smtp.gmail.com
@wyarde this is our pull request.
Works well with a Mail Server container - See Pull request - Accenture/adop-docker-compose#111