mozilla/treeherder-service — pull request #220 by jonasfj (2014-09-15 19:52:48+00:00)
Title: Publish messages to pulse

So I did some utilities for publishing messages to pulse, adapted JSON schema and generated JSON reference following the JSON schema for exchange references that I have proposed:
http://docs.taskcluster.net/tools/references/index.html

Regardless of whether or not you like to document and publish your exchange reference and JSON schemas. The utilities I've coded to for publishing messages here isn't all crazy :)
For example if using a `treeherder-stage` pulse-user for the staging site, all of its events will be published under `exchange/treeherder-stage/v1/new-result-set`.
As I barely know what things do, I've left it to you to add a few documentation strings here and there.. and maybe rename the exhanges. **I don't know what I'm doing** :)

My use-case is that I want to pick up pushes (for certain branches) and then create additional tests/tasks/builds and append their results back into treeherder. As far as I understand that should be fairly straight forward. Assuming I get the right events, identifiers and can guess what the identifiers are good for :)

Things needed:
1. get `treeherder` user for pulse (the name treeherder is important as it is used in exchange naming)
2. publication of JSON reference and JSON schema
3. Resolution of `repository_id` to repository/branch name or whatever it's supposed to cover...
4. Proper naming and a bit of docs about what it is I am reporting here (I'm not sure)
(In particular `revision_hash` vs `revision`).
5. Cleanup of code, if you have a way to organize things
6. See TODOs for config and stuff...

Note, ideally, I think (2) could be done by the pulse publisher utilities, which I propose that we convince mcote to make a part of the official pulse package. (2) isn't critical, ideally, pulse-guardian could have an API end-point that would allow one to upload references and JSON schemas.