Version 1

    As the discussion on DTGov 2.0 is now underway, thought it would be worth starting a discussion on the event model used by the policies.

     

    As we will be supporting a range of event sources, it is likely that those sources will fall into particular categories - i.e. source code management, continuous integration environments, notification channel, etc. Reason being that it will be easier to add support for new sources if they already fit into a particular category, and potentially then allows existing policies to make use of them.

     

    If this approach is used, then each category could have a defined set of events, using an inheritance hierarchy to abstract out common fields.

     

    Base Event

    - event source - a reference to the source that generated the event

    - event type - common field, but values may be specific to the event category

    - date/time of the event

    - optional principal that triggered the event

    - optional properties/metadata

     

    Artifact Event (derived from Base Event)

    Event Source represents the repository location

    Event Type values can be [created,updated,removed]

    - artifact location within the event source

     

    CI Event (derived from Base Event)

    Event Source represents the CI job

    Event Type values can be [started,finished,failed]

    (don't think any additional fields required?)

     

    Notification Event (derived from Base Event)

    Event Source represents the notification channel (e.g. email address, twitter id, etc)

    Event Type values [?] - could potentially be used in a generic way to indicate notification type

    Properties/metadata fields could be used to handle notification content?? Or should there be a special 'subject/description' field?

     

     

    Feel free to comment or directly update the document if there are additional event types that should be considered.