Hi, We are onboarding pact consumer driven contra...
# pactflow
p
Hi, We are onboarding pact consumer driven contract testing in our micro-services architecture. Since we have just started with the process, I have a basic question on integrating pact with our CI/CD pipelines. I have a consumer C1 having a contract with provider P1, publishing pact for the first time to the pact broker. If I’m configuring contract_requiring_verification_published web hook, this will trigger the pact verification and publish the results to pact broker. I haven’t yet recorded the provider deployment in pact broker though. Hence in the consumer pipeline, if I configure can-i-deploy after publishing pact this will fail. Unless I trigger a deployment for my provider, record deployment which is configured after deployment is not going to record the provider version and environment in pact broker. How to automate this process for the consumer build to work. Can you help me with this?
m
How to automate this process for the consumer build to work.
there is a CLI call you would make when you deploy
I’d suggest running the CI/CD workshop 👇 (howtolearn)
s
Here are a number of useful hands-on labs that teach all of the key concepts: https://docs.pactflow.io/docs/workshops and https://docs.pact.io/implementation_guides/workshops
p
Thanks for the response @Matt (pactflow.io / pact-js / pact-go). As per the CI/CD workshop, can-i-deploy from the consumer side will fail and we need to manually trigger the provider's workflow (test, can-i-deploy, record-deployment). If the provider is already deployed in an environment, and contract is published later by the consumer, we need to manually run the record deployment command for the provider to let the consumer's workflow to get through?