Hello! We are beginning to incorporate `record-dep...
# general
a
Hello! We are beginning to incorporate
record-deployment
as part of our CI/CD process. If a provider version (git sha) was never required to verify a pact should we still use
record-deployment
when deploying that version of the provider? We are only using consumer driven contract testing, and leverage the
contract_requiring_verification_published
event so the consumer in some cases never triggers a provider build because the content is the same. Should we be leveraging
create-or-update-version
first in this case?
y
Hey hey, If I understand the contract for the latest provider version you want to deploy is pre verified because the contract between its consumers hasn’t changed. If so I would record the deployment of the sha associated with your provider build you are going to deploy. The verifications will still be valid and you are know in your pact broker exactly which provider version is deployed in production
a
yes exactly Yousaf. We thought that would be ok, but we received an error … something like ->
<Pacticipant> version <git sha> not found
when running
record-deployment
y
Interesting, did the provider build run it’s own pact verification against the deployed consumers and publish a result?
With the version that you want to record?
I am assuming you have two provider verification tasks, one as part of the providers regular build and one triggered by the webhook you described which would use a pactUrl rather than the consumerVersionSelectors?
a
no it did not. we only have one provider build by itself to verify a specific pact when a consumer published a pact that requires verification. Do you think we need to add the additional provider build?
y
Yes, if you consumer contracts do not change, but your provider build changes it's response schema or endpoints, you would not know that it was not compatible with its consumers
a
ok that makes sense! thank you!
y
This recommended step refers to the one you already have in place https://docs.pact.io/pact_nirvana/step_6#add-a-new-provider-verification-job Your verification pipeline during a regular provider CI run would look similar to https://docs.pact.io/pact_nirvana/step_4#provider-pipeline although we advise recording environments over tags now, it is on my backlog to update the guide
My pleasure @Alejandro Vélez-Calderón let us know how you get on, and if you want a platform to talk about your setup and how it's helping out your organisation, I would be happy to help. Good luck on the road to Pact Nirvana rockon
🙌 1