Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    securitybuildmaster
    3 Posts 3 Posters 15 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jneuharth_9094
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • J Offline
        jharbison
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • T Offline
          thoven
          last edited by

          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.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation