CruiseControl: jabber notification on first successful build after failed? - xmpp

I want to set up jabber notifications to report only first successful build after failed, and first failed build after successful. Is it possible?

If you are using CruiseControl.Net, you can use an xmpp publisher but there is no support for only notify on change type like the Email Publisher's ModifierNotificationTypes's Change type.
You can try to modify the XmppPublisher.cs code accordingly or try to modify the ConditionalPublisher.
See the following:
XMPP Publisher (GTalk, Jabber, etc.)
http://jira.public.thoughtworks.org/browse/CCNET-1257
CruiseControl.NET : Email Publisher
http://build.subtextproject.com/ccnet/doc/CCNET/Email%20Publisher.html
CruiseControl.NET : Conditional Publisher
http://ccnetlive.thoughtworks.com/ccnet/doc/CCNET/Conditional%20Publisher.html
If you are using CruiseControl, you can use the jabber publisher but you'll have to create your own onchange publisher which can be based off onsuccess and\or onfailure.
See the following:
jabber
http://cruisecontrol.sourceforge.net/main/configxml.html#jabber
onsuccess
http://cruisecontrol.sourceforge.net/main/configxml.html#onsuccess
onfailure
http://cruisecontrol.sourceforge.net/main/configxml.html#onfailure

Related

How to create email notification alerts using Data Factory instead of Logic Apps

I have been using the Azure Data Factory for a long time. I have created different data pipelines also using the Data Factory. I have used Logic Apps for sending the Email notifications like Status checks, Error messages whenever the pipeline is failed.
I know that we can also send the Email notifications using directly using Data Factory but I don't know how to send it.
Can anyone help me with how I can send Email notifications like status checks, Error messages directly using the Data Factory?
You can set up alerts in ADF for success or failures etc but those emails wont be custom made similar to Logic apps.
You can use other custom codings like Azure batch or Azure automation to send email notifications which you can trigger via ADF

Is there any option to run github action via email

I need to send an email to github and then it need to run github action with input
Is that possible?
Or i need to make a push to master via email
You cannot start a workflow directly from email, but you can use manual events
You can manually trigger a workflow run using the GitHub API and from GitHub. For more information, see "Manually running a workflow."
Here are all available events that can trigger a workflow.
There are examples for starting workflow from slack, so I suppose you can implement something triggered by mail (if you can add a listener that checks all new emails and if specific email is send to call the GitHub API)

How to trigger an event in VSTS when there is a state change

Am looking to create a trigger (A json payload to a server) when an User Story is changed to closed/resolved state.
I am following this documentation
How to trigger an event in VSTS when there is a state change
First, Azure Devops has capabilities to set up email notifications for the work Item. Check this the document Manage your notifications for some more details.
For you requirement, you could add a new subscription with following settings:
Then, if any User Story is changed to closed/resolved state, you will receive a e-mail about it.
Besides, if the trigger event is more than just a e-mail notification, like build. You could configure a service hook to send request to build related builds:
Check this thread for the details.
Hope this helps.

Using outlook rest notifications api

I created a function in azure functions that is triggered by http request.
Also I have a web app that used for clients to subscribe to my app.
My app and web app is written in .net.
My goal is to set a subscription button in the web app, so when the user subscribe it would allow me to get push notifications about new mail in his outlook inbox folder and send http requests to my azure function that includes the content of the newly received mail.
I read the doc about this API but couldnt understand it and what should I do to get my goal. Also I didn't find any examples for this.
How can I achieve my goal?
There are two options you can try for your scenario :
Option 1: you can create Function APP with Outlook connector and Microsoft flow ( you can listen for new emails using Office 365 API -> "When New Email arrives" and also can be posted the payload using http trigger function
Option 2:
Creating Push notification in your app when you received, you can push the payload to
Azure by a wehbook using Webjobs or Functions
Documentation Outlook REST API V2.0 : Push Notification
To play around with REST API use this URL :https://oauthplay.azurewebsites.net
good luck

rest api design -> email notification

Is it bad practice to do automatic notification (email/sms/etc) as part of an api call? Or should that be separated from the core functionality.
Say I update a project status and want to send notification to all users watching the project.
Can I do that from the update call or should I break it out into some other notification mechanism? Any thoughts? If doing it from the call I guess each relevant method would need an option of skipping sending notifications.
I would add to a response by Rafael Mueller that there is a difference between RESTful interface and implementation mechanics.
As far as RESTful interface is concerned here are my thoughts. Let's say you update a project status with "PUT /project/123/status". Whether email is going to be send or not it's up to a value proposition of your app. May be that's how you want to differentiate yourself from your competitors.
Let's say you support sending of emails but you want to give control to a client on a call-by-call basis. I would go with an optional HTTP Header or an optional attribute of the request body be it JSON or XML or anything else.
Once you allowed variability in emailing project status, I would advice to design a designated end-point to trigger email update on demand. Something like "POST /project/123/status/send-email". This way your client won't shoot itself in a foot: if they forgot to send email during a project status update, or simply changed their mind, they can always call "send-email".
I would rise an event, ProjectUpdated, you can add it to your messaging system (a database could solve, or rabbitmq, msmq...) and the consumer of this event, will send the email.