Hey. I have a question regarding `contract_requiri...
# pact-broker
s
Hey. I have a question regarding
contract_requiring_verification_published
webhook running on
gitlab
and how to use
${pactbroker.providerVersionNumber}
. I’m using commits to version participants. Gitlab doesn’t have functionality to trigger pipeline against specific commit i.e
${pactbroker.providerVersionNumber}
. If I understand documentation correctly webhook should trigger job for selected
${pactbroker.providerVersionBranch}
and then inside the actual job should checkout
${pactbroker.providerVersionNumber}
and execute tests against it ?
✅ 1
@Matt (pactflow.io / pact-js / pact-go) does it fully replaces
contract_content_changed
? Per documentation:
Copy code
contract_requiring_verification_published: when a pact is published, triggered once for each unique provider version that is either the latest from the main branch of the provider, or is currently deployed or released.
so It doesn’t work for feature branches? i.e consumer contract change on
feat-a
branch trigger provider webhook for
feat-a
, main and deployed/released
m
it doesn’t trigger provider branches, no, unless those branches are deployed.
s
@Matt (pactflow.io / pact-js / pact-go) is it recommended to also use it in combination with
contract_content_changed
for feature branches or provider has to “manually” run the verification? e.g Provider has branches
feat-x,
main
and deployment
test
Consumer changes contract on
feat-x
contract_requiring_verification_published
-> triggers provider on
main
and
test
(if different than main)
contract_content_changed
-> triggers feature ?
m
no, that’s not how that other webhook event works, neither of them trigger branches. Best to read https://docs.pact.io/pact_broker/webhooks#the-contract-content-changed-event for how they work