This repo specifies details of messages, which should be sent out by Upstream/Downstream CI systems to fedmsg/UMB on events related to artifacts testing. Currently there is low unification of these messages and there are various types of messages sent out by the CI systems. Unification will make it possible to build simpler services which will provide useful features for everyone.
The message format is described by JSON Schema. In order to
allow better readability and review we store the schemas in the
YAML format. Use make convert
to convert the spec into JSON.
Repository contains also a set of example messages which can be
validated against the specification using make test
. Use
make clean
to clean up all temporary files. Run make
to
convert spec, validate messages and clean up in a single step.
Note: Make sure that python3-jsonschema
, python3-anymarkup
and
python3-rfc3987
are installed on your system when converting specification
and validating examples (alternatively, use tox
or install packages from
PyPI).
When implementing CI Messages specification in your application it
is a good idea to validate generated messages against the schema.
Make sure that schemas are converted and run the validate.py
script to ensure your message.json
file has proper format:
make convert ./scripts/validate.py schemas/brew-build.test.complete.json message.json
Note: Release tag 1.x.x onward all messages will be validated against scheme before updating the ResultsDB, and invalid messges will not be processed.
Examples should have exactly the same name as the schema against which they should be validated. Use optional suffix starting with the "+" sign to test multiple examples against a single schema, for example like this:
the-schema-name+simple.json the-schema-name+complex.json
The messages will use unique UMB virtual topic hierarchies to mitigate collisions with other systems:
UMB: /topic/VirtualTopic.eng.ci fedmsg: org.fedoraproject.prod.ci org.centos.prod.ci
For all the tests on all the artifacts the systems will use this topic naming convention:
UMB: /topic/VirtualTopic.eng.ci.<namespace>.<artifact>.<event>.{queued,running,complete,error} fedmsg: org.fedoraproject.prod.ci.<namespace>.<artifact>.<event>.{queued,running,complete,error}
where namespace
is any string that denotes the source of the message, required to be able to use
AMQP ACLs to secure publication rights between various publishing teams, for example:
where artifact
is a product in the release pipeline, for
example:
where event
is one of the recognized events, for example:
Note that an older version of this schema omitted the namespace
field. Messages bearing those
topics will still appear for some time while teams migrate to the modern topic structure above.
UMB: /topic/VirtualTopic.eng.ci.<artifact>.<event>.{queued,running,complete,error} fedmsg: org.fedoraproject.prod.ci.<artifact>.<event>.{queued,running,complete,error}
All data should be stored in the body of the message. Additional
fields can be added to the messages as required by the senders,
although it is advised to document them here.
Syntax requirements for field names:
Use only characters [a-z0-9_]
No spaces are allowed in the name of the field
* For separation of multi-word strings in field names use the
underscore character
Syntax requirements for field values:
true
or false
The contents of this repo fall under two licenses. Code (e.g. the Makefile and the contents of the scripts directory) is provided under a MIT-style license, included in each file. Non-code content - everything without the MIT-style license, e.g. the schemas - is provided under the Creative Commons Attribution 4.0 International License.