Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Send Email on Plan Changes for BuildMaster



  • On installations within a regulated environment, we are getting requests to send notice email(s) on various different changes (such as a change to a plan).

    There is an "Event trigger" of "Deployment Plan Modified" that can be added to the "Create Published Event Details Event Listener" under the "Event Listeners" area but nothing I could see that would just do email notices.

    Any tips or tricks out there?

    Product: BuildMaster
    Version: 6.0.4



  • Short answer, I don't think there is a straight forward way to accomplish what you want, currently. However, if you absolutely needed to implement something like this you could technically achieve it but there are few obstacles. Take this all with a grain of salt as I'm no BuildMaster expert.

    First, the only two eventlistener types that support all event types are "Publish Event Details", like you saw, and also "Execute Command Line". Neither of these are particularly well suited for sending a simple email, for reasons below, so ideally you would create a custom eventlistener. However, I don't believe the InedoSDK has any interfaces for creating our own. So we have to choose between the two eventlistener types available.

    If we go with the "Publish Event Details" listener, we would have to create some type of service to listen for the publish from BuildMaster. This service would consume the POST body and then send the email that you want.

    The other option is to use the "Execute Command Line" listener. This option would require less overhead as you could just write a small batch script that sends an email. You can checkout this answer on StackOverflow for an example. However, we find there's an additional problem with using this approach. The "Execute Command Line" listener doesn't pass the event details to the executable. We have no way of telling what plan was modified.

    Of course there's also a way around this if you have access to the database. In your script you could query the [BuildMaster].[dbo].[EventOccurences] table for the latest Plan Modified event (Event_Code=PLNMOD) and join that with the [BuildMaster].[dbo].[EventOccurenceDetails] table to see what plan was modified.

    However with that all said and done, the specific event you want to listen to, Plan Modified, wouldn't actually work in v6.0.4 of BuildMaster, as it appears the [dbo].[Plans_UpdatePlan] stored procedure is not actually raising the Plan Modified event.

    So in the end that was a pretty long winded way to say that I agree that there should be a "generic" send email event listener that can attach to any event and that I would +1 that as a feature request.



  • We added basic support for this in BM-3197, though anything more complicated needs to be handled with a custom event listener.

    If you want to create a custom extension for this (and are an enterprise customer) you already have access to the source code at https://my.inedo.com, or you can request direct source access to our GitLab repository as well, just send a note via the contact form.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation