Eventline is now open source and available on GitHub !
Triggers are used to react to events: when the events described in the trigger occurs, Eventline will instantiate one or more pipelines.
Trigger data contain the following fields:
type: "trigger" version: 1 name: "github-push" data: connector: "github" event: "push" parameters: organization: "example" filters: - path: "/branch" is_equal_to: "main" identity: "github-token" pipelines: - "process-github-push"
In this example, the trigger will be activated when a
github.push event is
received, indicating that there has been a set of commit pushed to the
branch of any repository in the
example organization. The
identity will be used to register the trigger on GitHub. On activation, the
process-github-push pipeline will be instantiated.
Each trigger is configured to monitor specific events. These events are defined by three values: the connector, the event name and the set of parameters.
Connectors designate either entire platforms (e.g.
github) or abstract
time), and are used to group events.
Events themselves have a name. For example, the event emitted when a
repository is created on GitHub is named
Finally, parameters provide more information about what we actually want to
react to. Each event has its own set of parameters. For the
repository_creation event, the parameters contains the name of the
See the connector pages for the lists of supported events.
Filters are used to restrict the set of events which will activate the trigger. While parameters are used to select large categories of events, filters allow to select events by matching their content.
Each filter is an object made of a path, and zero or more predicates. The path is a JSON pointer applied to the data of the event.
Predicates are additional members which are applied to the value referenced by the path. An event matches a filter if all predicates are true.
The following predicates are supported:
type: "trigger" version: 1 name: "github-ruby-push" data: connector: "github" event: "push" parameters: organization: "example" filters: - path: "/repository" matches: "^ruby-" - path: "/branch" is_equal_to: "main" identity: "github-token" pipelines: - "github-ruby-push"
This trigger will be activated each time a set of commits is pushed on the
main branch of a repository whose name starts with the
Most connectors handle events triggered on an external platform. To access these events, Eventline must usually authenticate against this platform, hence the need for an identity.
As we have seen before, connectors are used to group events; they are also
used to group identities. For example, the
github connector supports two
types of identities:
Some connectors do not require any authentication, for example the
connector. Triggers associated with these connectors do not need to include an
identity data field.