Reputation: 1
I have a webhook between consumer/provider to trigger TeamCity build for verifying provider.
I'm setting this up to work with feature branches (so far we have it set up only for master). I'm publishing new contract to PactBroker. Next I'm tagging it with branch name. But if webhook exists at this point it will trigger after pact is published, before it is tagged (because publishing/tagging are separate requests), and so ${pactbroker.consumerVersionTags} is empty. If i create webhook/execute it after pact is published AND tagged then it works as expected.
What do I do wrong? I'd expected that I could create webhook just once and it would work with this scenario. Is it possible to publish/tag in the same request (not obvious to me from the docs)?
Edit: I'm using REST API from F#.
Edit 2: With CLI it is possible, ie. pact-broker publish --consumer-app-version 1.0.0 --broker-base-url https://dius.pact.dius.com.au --broker-token SomeToken /path/to/pacts/consumer-provider.json --tag master
Upvotes: 0
Views: 248
Reputation: 1
Reversing the order is enough - first tag (pacticipant), then publish (pact). This didn't occur to me at first, because I thought of it more like tagging a pact, whereas it is tagging a consumer, not a pact.
Leaving for posterity.
Upvotes: 0