Allow multiple Slack endpoints with finer-grained conditions #192
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Intended to allow failures of the
opam2web
pipeline to be pinged to the#opam
Slack channel, while preserving the behaviour of pinging all status updates of all repositories to#ci-firehose
.Changes the input slack file to be in JSON, the format of which is a list of objects with fields:
uri
, the URI endpoint for the Slack application, of the form"https://hooks.slack.com/services/***/***/***"
mode
, which is the condition on which we send a Slack message. Either"all"
(send on all status updates) or"failure"
(only send on deploy failures).repositories
, an optional parameter. If it is not present, then we apply the record to all repositories being deployed. If it is present, then it must contain a list of repositories, each being represented as a string of the format"org/repo"
, e.g."ocurrent/ocaml-ci"
.Here is an example of a valid JSON string:
The first record in the list says that when there is a deploy failure on the
ocurrent/ocaml-ci
or theocurrent/opam-repo-ci
repos, send a Slack message to the specified URI.The second record says that for every repo, for each event on the deployment of those repos (successes and failures), send a Slack message to the specified URI.