Tanyagorn B.
10/25/2023, 8:25 AMTanyagorn B.
10/25/2023, 8:34 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Tanyagorn B.
10/25/2023, 9:45 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Yousaf Nabi (pactflow.io)
contract_requiring_verification_published
requires use of record-deployment and record-release
https://docs.pact.io/pact_broker/webhooks#using-webhooks-with-the-contract_requiring_verification_published-event
Use of this webhook requires that:
• the provider’s main branch is configured
• verification results are published with the branch property or you are tagging with the branch name and have automatic branch creation turned on (even if you use trunk based development, and only ever use one branch)
• the exact commit of a provider version can be determined from the version number used to publish the verification results (ie. it either is the commit, or contains the commit as per the Pact Broker version number guidelines)
• any deployments and releases are recorded using the `record-deployment` and `record-release` commands.We would probably need additional context about your setup, how you publish and verify contracts, whether you use branches/tags, what selectors you use for verifying, and when do you verify, and additionally how you record your releases and deployments.
Yousaf Nabi (pactflow.io)
Unfortunately I cannot apply concept of Recording deployments and releases to any of my projects. We automate everything except deployment part. We still deploy product to production manually.It is just a cli command, it can be run manually when the deployment is manually performed. (Without knowing the details on this manual deployment its hard to describe any specifics) however from Pact’s perspective its simple. It just needs someone to tell it that x version for y application is deployed to z (undeploying all other versions) or released to z (to sit alongside other versions of the application)
Yousaf Nabi (pactflow.io)
A webhook using theshould be configured to pass through thecontract_requiring_verification_published
and${pactbroker.pactUrl}
and${pactbroker.providerVersionNumber}
to the provider verification build. The Broker then will trigger the execution of the provider version of the main branch, and also the provider version for every environment it has been deployed to, but we need to let our CI application know what versions to build. That’s why the parameters${pactbroker.providerVersionBranch}
and${pactbroker.providerVersionNumber}
are needed.${pactbroker.providerVersionBranch}
Tanyagorn B.
10/27/2023, 9:25 AMYousaf Nabi (pactflow.io)