Skip to content

Conversation

@benmandrew
Copy link
Contributor

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:

[
  {
    uri:"https://hooks.slack.com/services/***/***/***",
    mode:"failure",
    repositories:["ocurrent/ocaml-ci", "ocurrent/opam-repo-ci"]
  },
  {
    uri:"https://hooks.slack.com/services/***/***/***",
    mode:"all"
  }
]

The first record in the list says that when there is a deploy failure on the ocurrent/ocaml-ci or the ocurrent/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant