Skip to content
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

Add support for retrieving all pacts for a given provider #223

Closed
bethesque opened this issue Nov 11, 2019 · 9 comments
Closed

Add support for retrieving all pacts for a given provider #223

bethesque opened this issue Nov 11, 2019 · 9 comments

Comments

@bethesque
Copy link
Member

Hi Neil! Rather than specifying one or more pact URLs, the provider name, and a list of consumer version tags can be specified, and the pact-provider-verifier will determine the right pacts to verify. This feature will be required for an upcoming feature release which will allow "pending pacts" to be verified without breaking the build. The --provider-version-tag will also be required for that feature. Here are the relevant bits of the CLI documentation.

Give me a yell if you need some clarification.

Usage:
  pact-provider-verifier PACT_URL ... -h, --provider-base-url=PROVIDER_BASE_URL

Options:
      [--provider=PROVIDER]
      [--consumer-version-tag=TAG]                                           # Retrieve the latest pacts with   this consumer version tag. Used in conjunction with --provider. May be specified multiple times.
      [--provider-version-tag=TAG]                                           # Tag to apply to the provider   application version. May be specified multiple times.

See:

https://github.com/pact-foundation/pact-provider-verifier#usage

@neilcampbell
Copy link
Member

@bethesque Will try get this in the next couple of days

@neilcampbell
Copy link
Member

@bethesque So what should be supplied as the PACT_URL in this case? Just a base URL to the broker?

@bethesque
Copy link
Member Author

Nothing - it's optional. Either you specify a PACT_URL, or you specify the broker URL and the provider name. Though, if you want, you can specify all of them, and it will fetch the pact by URL and dynamically fetch the pacts by name from the broker as well. If you really wanted.

@neilcampbell
Copy link
Member

We don't actually use the PACT_BROKER_BASE_URL at all. All broker stuff is currently just setup with PACT_URL (which is currently mandatory in the DSL), so I'm going to need to change things a bit by the sounds of it.

@bethesque
Copy link
Member Author

Time to make an omelette!

@bethesque
Copy link
Member Author

Sorry to hassle you on this Neil, but we've got the new "pacts for verification" API and "pending pacts" stuff coming out soon that's going to rely on these fields. If you can find the time, I'd really appreciate it.

@neilcampbell
Copy link
Member

@bethesque Sorry, completely forgot about this one! Will see what I can do.

@neilcampbell
Copy link
Member

Released in 2.5.0

@bethesque
Copy link
Member Author

Thanks Neil 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants