Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import versioning guidance from dev doc
This is part of work to rewrite the "Pact Broker" dev doc [^1] so that it's focussed on writing tests, not details about this repo. [^1]: https://github.com/alphagov/govuk-developer-docs/blame/f8c7344ae79f333cd927cfb9ba30be2d2ee58fa4/source/manual/pact-broker.html.md#L54
- Loading branch information
Ben Thorner
committed
Apr 22, 2022
1 parent
9c4d179
commit 3cb710b
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Versioning | ||
|
||
Out of the box, the Pact Broker allows uploading of pact files with semver | ||
style versions (eg 2.0.1). For our usage, we wanted to be able to upload pact | ||
files from various branches in addition the released versions so that our | ||
branch builds of consumers can verify their pactfiles with the producers. | ||
|
||
Pact Broker allows us to [implement our own versioning | ||
scheme](https://github.com/bethesque/pact_broker/wiki/Configuration#version-parser) | ||
by providing a custom version parser. We've [used | ||
this](https://github.com/alphagov/govuk-pact-broker/blob/master/config.ru#L23-L50) | ||
to extend the versioning scheme to allow branch builds to be uploaded as well. | ||
In addition to numeric versions, our scheme allows for "master", and | ||
"branch-foo" versions to be uploaded. These will always be ordered after any | ||
numeric versions, so the 'latest' pactfile from the pact brokers POV will | ||
always be the highest numeric version. |