See the the Badges section of the configuration page for information about accessing the badges.
If you are publishing Provider verification results to your Pact Broker (v2.3.0+), you can also display the verification status in your READMEs using a shiny badge like this one:
Can I Deploy badge
Requires version 2.62+ of the Pact Broker.
Returns a status badge that can be displayed in a README file that indicates whether the specified version of a pacticipant can be deployed to the specified environment.
To set a custom label for the badge, set the
label query parameter. eg
Specific consumer/provider badge
To get your badge, open the HTML version of your
/latest-untagged pact in the Pact Broker by copy/pasting its URL into your browser location bar. Your badge will be shown in the top right of the page. When you click on it, a text box will appear with the markdown to include in your README.
Without tags, or with only Consumer tags.
The URL of the badge is the URL of the latest pact with
/badge.svg appended, and it works for the
/latest-untagged pact URLs as well
- Latest pact badge:
- Latest tagged pact badge:
- Latest un-tagged pact badge:
The markdown to include in your README is as follows:
With consumer and provider tags
Available in version v2.13.0+ of the Pact Broker gem.
If you are using tags for both the consumer and provider versions (this is recommended by the way!) the badge URL will be a little different. The format is:
If your consumer and provider name make your badge too long to be aesthetically pleasing, you can shorten it in the following ways.