Skip to content

Conversation

@bzon
Copy link

@bzon bzon commented Jul 1, 2016

@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=[email protected]
SMTP_USER=[email protected]
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

def extmailServer = instance.getDescriptor("hudson.plugins.emailext.ExtendedEmailPublisher")

Thread.start {
sleep 15000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other groovy scripts have 10000 sleep timeout, is 15000 added for a reason?

@anton-kasperovich
Copy link
Contributor

@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!

@bzon
Copy link
Author

bzon commented Jul 1, 2016

@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
@bzon bzon changed the title Added a groovy script for Configuring SMTP Feature: Added a groovy script for Configuring SMTP Jul 3, 2016
@anton-kasperovich
Copy link
Contributor

👍

@anton-kasperovich
Copy link
Contributor

@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

@RobertNorthard
Copy link
Contributor

@bzon please can you rebase?

@coltrey
Copy link

coltrey commented Aug 21, 2018

Shouldn't the setters be used instead of direct assignment for the hudson.plugins.emailext.ExtendedEmailPublisher descriptor?

extmailServer.setSmtpUsername()
extmailServer.setSmtpPassword()
extmailServer.setSmtpServer()
extmailServer.setSmtpPort()
extmailServer.setUseSsl()
extmailServer.setCharset()

@bzon
Copy link
Author

bzon commented Aug 21, 2018

@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.

Copy link

@LQss11 LQss11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you allow the script to configure jenkins E-mail Notification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants