Hi everyone, I have a question about how contract...
# pactflow
т
Hi everyone, I have a question about how contract verification works in multi-stage environments. Suppose I have a master branch deployed to both the Dev and QA environments for both Consumer and Provider apps. Now, I create a new test in my Consumer app in a new iteration. Here’s what happens in the pipeline: 1. A new Pact is published to PactFlow. 2. The webhook triggers and calls the Provider’s verification CI (on the master branch). 3. The Provider publishes successful verification results. What should I expect as the output of the
can-i-deploy
script when I run it from the Consumer app for the QA environment? What would happen if the Provider QA environment was associated not with a master branch? So, what I don't really understand is when the Provider publishes verification results, how are they matched to a specific environment?
Point (2) is not quite right. It triggers a provider build for each version that needs to verify it. That could be the version in Dev, a separate version for QA and a separate version for Prod (and a separate for the main branch)
You need to look at the payload of the webhook to determine which build to trigger
т
Let’s assume the following branch-to-environment mapping: •
develop
branch targets Dev •
master
branch targets QA •
release
branch targets Prod If I publish a new change from the
develop
branch, will it trigger 3 webhooks - one for each environment? Does this mean my Provider CI should run three times, with each run checking out the specific branch associated with the environment and publishing verification results directly from that branch? Is that correct? Thanks
m
correct (assuming the versions of the provider are different in each of those environments)
т
thank you