Skip to content

Commit

Permalink
Import versioning guidance from dev doc
Browse files Browse the repository at this point in the history
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
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -43,6 +43,7 @@ $ bundle exec unicorn

- [Infrastructure](docs/infrastructure.md)
- [Deployment](docs/deployment.md)
- [Versioning](docs/versioning.md)

[pact-broker-gem]: https://github.com/bethesque/pact_broker
[government-paas]: https://docs.cloud.service.gov.uk/
Expand Down
16 changes: 16 additions & 0 deletions docs/versioning.md
@@ -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.

0 comments on commit 3cb710b

Please sign in to comment.