New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebHook Trigger Events Regardless Of Whether Contract Changed #248
Comments
I dont think I need this now based on the way I have configured the integration process on Team City. |
I have this same issue described here for where the git status is not updated/reported when a PR is made but the contracts have not changed. Is there a workaround for this to trigger a webhook whenever contracts are published regardless of whether they have changed or not? perhaps a new web hook event for |
This would be quite easy to do. It's just a matter of having the free time to do it, which I don't have a lot of right now. If you're keen enough to do a PR, I can show you where the code would need to change. https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/pacts/service.rb#L138 I remember I deliberately made the event "CONTRACT_CONTENT_CHANGED" instead of PUBLISHED so that we could add one for PUBLISHED later. Adding the event to this list should allow the API to accept the new value: https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/webhooks/webhook_event.rb#L14 |
Hi @bethesque, I'm not very familiar with developing in ruby but I attempted to make the change here: #258 Please let me know what you think. Thanks! |
Pre issue-raising checklist
I have already (please mark the applicable with an
x
):Software versions
Docker Pact Broker Version : 2.27.2
I currently have the following setup
1 x Consumer
2 x Providers
The consumer has pacts for both providers.
I have a build process setup whereby
We run the consumer to generate all the pact files and upload them to pact-broker regardless of whether these have changed or not.
If the pact between the consumer and providers change then the pact-broker will trigger the contract_content_changed webhook to run the pact tests between the consumer and the specific provider and publish the results back to the pactbroker on the CI build server.
I then have the pact-broker use the provider_verification_published webhook to publish a commit status to git saying whether test worked.
The issue I have is that I want to make these github commit status's mandatory BUT if one of the contracts does not change, the web hook for contract_content_changed will not trigger, this will not trigger a CI Provider to run the tests and publish the results back to the pact broker, which in turn will not trigger the provider_verification_published to send a github status in repo so say it passed or failed.
Is there a way to trigger a webhook regardless of whether the contract changed or not?
If the way I have configured the build process is incorrect then let me know
Thanks
Simon
The text was updated successfully, but these errors were encountered: