How to define a list of emails for the job notification plugin in Jenkins - email

This is for the Notification Plugin (link here) for Jenkins.
I have a bunch of Jenkins jobs that I want to keep an eye on. I want to be alerted/emailed when any changes are made to a job so the job notification plugin should be helpful. This plugin adds a subsection to each Jenkins job for us to configure. We have to check the checkbox and enter email addresses for each job to notify us whenever there's a change.
I want to define some environment variable that contains emails so I don't have to go into each job to add/delete email addresses for interested parties; that I can just add/delete addresses from this variable. Can someone tell me how to do this or am I out of luck and the field only takes email addresses and not variables containing email addresses.
Screenshots from my Jenkins:
Global variables defined in Jenkins:
Field in Jenkins job notification heading that doesn't allow me to enter a variable for emails:

This appears to be fixed in version 2.144 (both "${DEFAULT_RECIPIENTS}" and "$DEFAULT_RECIPIENTS" reference the global property fine in the "Recipients" field).
Otherwise, I use the Email Extension Plugin ("Email-ext") for much more flexibility.
Once installed, to configure the plugin, navigate to Jenkins -> Manage Jenkins -> Configure System, and scroll down to "Extended E-mail Notification".
There you can set the global defaults, such as "Default Recipients".
These settings are assigned to tokens, such as "$DEFAULT_RECIPIENTS".
Click the "?" button for each setting and note the token name.
Note the "cc:" and "bcc:" prefixes to put an address on "cc" or "bcc").
Then, in your job configuration (/job/myJobName/configure):
Go to "Post-build Actions"
Click "Add post-build action" and select "Editable Email Notification".
Ensure that "$DEFAULT_RECIPIENTS" is in the "Project Recipient List", with any other addresses (note the "cc:" prefix to put addresses on "cc").
Click on the "Advanced settings" (bottom left of the "Editable Email Notification" configuration) to show the "Triggers" section and configure emails depending on the build status, like "Always", "Failure", etc...). Click the "Advanced" button for each trigger to get more options.
Once this setup is done, you can edit the global "$DEFAULT_RECIPIENTS" to change the emailing for all jobs configured as above, and have the functionality you require.
PS: I know this is old, I hope my answer may help others - like me - that have the same question.

I've been trying to follow a similar approach as that of yours, with the only difference of having a job parameter being assigned the recipient's address.
I encountered a problem where the plugin wasn't able to parse the job/environment variable to it's assigned value (the email address).
For example,
emailID=xxxxxx#yyyyy.com
Now this particular variable was being sent into the emailing list as ${emailID} and not as xxxxxxx#yyyyyy.com
The fix? Really funny.
Your variable must be the first comma seperated value in the mailing list.
You can refer to the attached image below.
As you can see, just keep the variable first, and then your predefined values or the plugin's variables

Related

Can Google Workspace Alert Center be used with Email Log Search?

Is there a way to create an Alert Center notification based on criteria returned in the Google Workspace Email Log Search?
For example..
If an email address sends a message to 1000+ recipients or sends 1000 messages to 1000 recipients...
We already see the System Defined alert center actions if say... someone flags a message as phishing, but we want to create a triggered alert rule based on the count of messages.
Thanks in advance.
This can be done using the Investigation tool found at ‘Security’ > ‘Investigation Tool’ Be advised this is a feature available for these editions: Enterprise; Education Standard and Plus as documented here
Basically what you are looking to do is build a query like this:
Data Source = Gmail Log Events
With Conditions Below:
Event Is User spam classification
AND
Spam classification Is Phishing
Like this
Then:
Click on the three dots at the top right, next to the bin icon.
Click on ‘Create activity rule’
Add a name + description. Click on ‘Next: View conditions’
Click on ‘Next: Add Actions’
Select the time window: 24hrs o 1hr
Scroll down and set the threshold desired and configure it (basically after how many incidents this will be triggered)
Add a desired action, eg. Send to quarantine, etc.
Select the severity of this rule
Check the box to ‘Send to alert center’
10.Configure Email Notifications.
11.Click on ‘Next: Review’ and make sure it is set to ‘Active’
12.Finally click on ‘Create Rule’
Keep in mind this may take some propagation time of up to 48hrs. For more information on the Investigation Tool see here
Unfortunately the way the Alert Center works would not allow an integration with the Email log search.
They both work on a different way, the Alert center has his own set of parameters to determine the severity, while the Email log search works like a direct tool to audit the data manually.
I believe the best available option to create rules and get notifications an alerts while using the Alert Center dat, is the Investigation tool which is only available with certain versions, check it!

SendGrid Transactional Templates - Address and Unsubscribe Link Broken

I've configured several Transactional Templates to be sent from my SendGrid account via their handy Design Tool, which work great!.
However the Address Line and Unsubscribe links on the template footer aren't activated. In an email they display as placeholders, like so
[Sender_Name]
[Sender_Address], [Sender_City], [Sender_State]
[Sender_Zip]
Unsubscribe << (Not a Hyperlink)
I've followed SendGrid's documentation and configured my account address but am unable to find the solution for this.
Any ideas on this? Thanks for any input or guidance!
To get the unsubscribe to function you will need to create one or more unsubscribe groups. If you look under the Marketing menu you will see the sub menu to create those. Once you create one it will be assigned an ID number. When you are generating your email you will need to pass that ID value in as part of the EmailMessage object. If you are using V3 of the API you will be looking for SetAsm.
As for the Sender fields, for transactional templates they do not work correctly, as they are meant for marketing campaigns. Your two options are:
Remove the Sender fields from that block in the template. Add a new text block above it with static values.
Download the template into HTML and convert the sender objects into substitution variables. You will then be able to set them in your code when you are creating the email.
GitHub Bug
The unsubscribe link will only appear if you create an unsubscribe group and specify it while sending using
asm: {
group_id: <the unsubscribe group ID>
}

Can "Request Publication" request go to a group other than the admin group in AEM6.1?

When a user does not have rights to publish a page, he sees "Request publication" button in Touch UI editor mode. When he clicks on "Request Publication", the workflow "Request for activation" starts and go to the admin's inbox. I want the page to go to some other group for publishing. How can I achieve this?
As shown in the image above, you can change the user/group to be anyone/anything in your instance.
You just need to change properties of default "Request for Activation" workflow.
However, it is recommended to make a new workflow of your own so that upgrades and patches don't revert your changes.
On the /libs/cq/workflow/content/console.html page with all available workflows. You should find workflow that you are interested in.
In you case it is possibly http://localhost:4502/cf#/etc/workflow/models/request_for_activation.html
On this page you can workflow config which contains several steps. Open for editing Request for activation step, switch to tab Arguments and then you can change Name patterns field. It should be regex pattern e.g. .*approver.* for all groups which contains approver in name.
As a variant you can custom workflow or step. In this case you need to figure out by you self how to configure it but usually it is something similar.

Magento translation email - email titles

How do you go about changing the title of emails in a second language store view. Example "New Order" in the New Order confirmation email. csv files are not responding in this case...
Another solution. You can copy the default email templates into a language folder you are wanting to use, and translate them manually.
Copy everything in app/locale/en_US/template to app/locale/[YOUR
LANGUAGE CODE]/template.
Change [YOUR LANGUAGE CODE] to the Language Code of your
desired language. YOu can find a list here. Make sure it's in
the format en_US.
Modify the email templates in your app/locale/[YOUR
LANGUAGE CODE]/template folder.
In Magento, go to System > Configuration > General. At the top left, change your Current Configuration Scope: to the store you want translated.
Change the Locale to the language you translated to. It must match correct the language code used in your folder namespace.
NOTE: When editing the email template files, you'll notice some comments at the top containing variables and such. You will see something like <!--#subject Welcome, {{var customer.name}}! #-->. Changing this will alter the subject line used by Magento.
You can just create custom Transactional Emails which include the translations needed for the store view.
Create a new Transaction Email template, in your store's required
language. Go to System > Transactional Emails and click Add New
Template. Load in the default template you are trying to
translate and modify the subject and body of the email.
Go to System > Configuration > Sales Emails At the top left of your configuration, change to your desired Store View you want these emails to be assigned to.
Change the New Order Confirmation Template to the Transaction Email template you created. Click Save Config.
Items ordered from that store should now send an email using the translated email you created.

Drupal email users

I'm using Drupal 6.16: When a user creates an account on my site I have them select a category (ie children, youth, adult, etc). This is done with the select list box using the content_profile module. I have a content type that posts an announcement. In this content type is a check box that says 'email group'. Right now it does nothing, but what I would like for it to do is e-mail all the users that are associated with the group they chose when signing up for their account. If this will require extra code please be specific as I am not a strong php programmer.
Thanks for the help!!
msindle
There might be some module that do it exactly, but I don't think so.
I would have done it using few building blocks:
Retrieve the list of emails using Views - define a view that gives you the addresses according to a given group argument.
Use Rules module that will send an email notification after node is created.
Combine the two (this is the hard part) - insert the values from the view as the recipients for the email. You might be able to do it using PHP inside the Rule definition, plus view execution.
Try to accomplish it, and if you get into troubles, you are welcome to contact me via shushu.i#gmail.com
I would try http://drupal.org/project/subscriptions module + http://drupal.org/project/messaging module. You can set preferences for automatic subscribing to content type. Maybe Rules module can subscribe users automatically after creating or updating content_profile. Or maybe Rules can flag users after creating or updating content_profile and Subscription module could autosubscribe flagged users.