-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rely on data-binding to (re)configure descriptor #39
Conversation
<div> | ||
当发送邮件时使用SMTP认证.如果你的环境需要使用SMTP认证,在这里指定其用户名和密码. | ||
<div> | ||
当发送邮件时使用SMTP认证.如果你的环境需要使用SMTP认证,在这里指定其用户名和密码. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I dare ask?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. local git tool only reports file being moved, no internal changes.
private Secret smtpAuthPassword; | ||
|
||
@DataBoundConstructor | ||
public SMTPAuthentication(String smtpAuthUsername, Secret smtpAuthPassword) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The smtpAuth
prefix on these property names is redundant. Better to switch to just username
& password
.
|
||
Use\ SMTP\ Authentication=Verwende SMTP Authentifizierung | ||
User\ Name=Benutzername | ||
Password=Kennwort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you neglected to remove these keys from Mailer/global_*.properties
.
jenkinsci/jenkins/core/move-l10n.groovy
is a useful tool that could perhaps be converted to a mojo in org.jvnet.localizer:maven-localizer-plugin
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I indeed didn't know about this script (and others).
@jglick Hi! Can we push this pull-request forward? It is really necessary in order to use configuration-as-code with the mailer plugin, and since this plugin is very popular it would be nice to have it :) Thank you |
This caused issues with the send test e-mail feature. It was failing at form validation due to field names being different. I sent a PR to the source fork: https://github.com/ndeloof/mailer-plugin/pull/1 |
It seems that the upstream PR has been merged. Does it mean that the example at https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos/mailer now works (or do we still need this PR to be merged as well)? |
I have no bandwidth to review it this week. Everybody is busy at Jenkins World, I believe |
…witch to just username & password.
Signed-off-by: Nicolas De Loof <[email protected]>
Signed-off-by: Nicolas De Loof <[email protected]>
ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jglick I was looking at this PR and wondering how the data migration to the SMTPAuthentication
is done. I'll test it locally by wondering if you could confirm that it's what the lines https://github.com/jenkinsci/mailer-plugin/pull/39/files#diff-e64d5e9d7b997b028696a748431563ceR387 are about. Thanks
I am afraid I have no memory of this PR. Needs a maintainer. |
As mentioned before, I'm also looking forward to this PR being merged, so I can use JCasC for mailer. |
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ndeloof Why does this properties file contain 13 properties whereas the other ones only contain 3?
@@ -30,8 +30,5 @@ Default\ user\ e-mail\ suffix=Suffixe par d\u00E9faut des emails des utilisateur | |||
Sender\ E-mail\ Address=Adresse e-mail de l''''exp\u00E9diteur |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In l''''exp\u00E9diteur
there are two extra ''
which should be removed.
@@ -0,0 +1,22 @@ | |||
# The MIT License |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ndeloof Why is this empty "global.properties" file added for Mailer
but no "config.properties" for SMTPAuthentication
?
|
||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<f:entry title="${%User Name}" field="username"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ndeloof Indentation (lines 27-32) should be corrected from 6 to 2.
@@ -20,18 +20,15 @@ | |||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
# THE SOFTWARE. | |||
|
|||
E-mail\ Notification=Notificaci�n por correo electr�nico | |||
E-mail\ Notification=Notificaci�n por correo electr�nico |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ndeloof Just looking at the diff on GitHub it looks like the encoding got broken. Could you double-check this (this and other properties files)?
@@ -25,9 +25,7 @@ E-mail\ Notification=E-mail p\u00e5mindelser | |||
Default\ user\ e-mail\ suffix=Standard e-mail endelse | |||
Use\ SSL=Brug SSL | |||
SMTP\ Port=SMTP Port | |||
Use\ SMTP\ Authentication=Benyt SMTP Authentificering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ndeloof Did you miss to remove Password
in line 23?
@@ -25,9 +25,7 @@ E-mail\ Notification=E-mail p\u00e5mindelser | |||
Default\ user\ e-mail\ suffix=Standard e-mail endelse | |||
Use\ SSL=Brug SSL | |||
SMTP\ Port=SMTP Port | |||
Use\ SMTP\ Authentication=Benyt SMTP Authentificering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ndeloof "${%Use SMTP Authentication}"
is still used in "Mailer/global.jelly".
Is it correct to move it from "Mailer/global*.properties" to "SMTPAuthentication/config*.properties"?
@ndeloof ping |
I do not think @ndeloof is working on this any more. Would fall to whoever is driving |
@alecharp do you still have this on your list as mentioned in the Jira issue? |
Yes I am, sorry I didn't take the time before. Will certainly take it in
the next few days to review and or complete.
Le dim. 14 avr. 2019 à 20:51, René Scheibe <[email protected]> a
écrit :
… @alecharp <https://github.com/alecharp> do you still have this on your
list as mentioned in the Jira issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA8LYzj0N9fz3Av24YISNv_26eo0OAEEks5vg3jPgaJpZM4QoxOQ>
.
|
Thank you very much in advance. |
any update guys? |
Any news about this PR? It is very useful when use JCAC plugin |
Okay, sorry to make this note here but I believe it will help a few people that find this PR based on the JCasC demos, which state setting SMTP doesn't work. NOTE: I do not claim to be familiar with this PR or what it intends to change/fix so it might still be useful/necessary to fix other issues. I only posted this here since I got redirected here and just by accident found out that setting SMTP already works now and thought other people might have that same "problem". |
awesome, looking forward to it. |
rely on
@DataBoundSetter
annotations for data-binding with theglobal.jelly
web-UI.prefer a nested databound component vs a boolean pseudo-property (
useSMTPAuth
)as Descriptor is re-configured, and not created from scratch by data-binding, need to reset attributes to default values.
Those changes are required by jenkinsci/configuration-as-code-plugin#2