pactflow / example-consumer-dotnet

.NET example consumer
MIT License
4 stars 21 forks source link

Publishing to Pact Broker instead of Pactflow #15

Open suadev opened 9 months ago

suadev commented 9 months ago

Is there a sample repo that demonstrate how to publish pacts to pact broker? I used to publish pacts using pactnet from right after the consumer tests. It looks like it is not possible with the latest version?

YOU54F commented 9 months ago

hey 👋🏾

the capability was removed as part of the upgrade to pact net v4 and migration to the pact rust core backend.

the recommendation is to publish the pact cli tools, and is noted in the pact net upgrade docs in its repository

https://docs.pact.io/implementation_guides/cli#distributions

https://github.com/pact-foundation/pact-net/blob/master/docs/upgrading-to-4.md#other-changes

suadev commented 9 months ago

Thank you @YOU54F

suadev commented 9 months ago

Hi @YOU54F

I want to add as a new stage publishing pacts to pact broker in my CI pipeline. (gitlab preferred)

Is there a reference repo or something that can help me?

Thanks!

YOU54F commented 9 months ago

there is an example of gitlab being used in this repo

https://gitlab.com/YOU54F/example-consumer-dotnet/-/blob/master/.gitlab-ci.yml?ref_type=heads

the cli tools are downloaded with the make deps step

suadev commented 9 months ago

That's great. Thanks!