Interface IPactBrokerClient
-
- All Implemented Interfaces:
public interface IPactBrokerClientInterface to a Pact Broker client
-
-
Method Summary
Modifier and Type Method Description abstract Result<List<PactBrokerResult>, Exception>fetchConsumersWithSelectors(String providerName, List<ConsumerVersionSelector> selectors, List<String> providerTags, String providerBranch, Boolean enablePending, String includeWipPactsSince)Fetches all consumers for the given provider and selectors. abstract Result<List<PactBrokerResult>, Exception>fetchConsumersWithSelectorsV2(String providerName, List<ConsumerVersionSelectors> selectors, List<String> providerTags, String providerBranch, Boolean enablePending, String includeWipPactsSince)Fetches all consumers for the given provider and selectors. abstract StringgetUrlForProvider(String providerName, String tag)abstract Result<Boolean, List<String>>publishProviderTags(Map<String, Object> docAttributes, String name, List<String> tags, String version)Publish all the tags for the provider to the Pact broker abstract Result<Boolean, String>publishProviderBranch(Map<String, Object> docAttributes, String name, String branch, String version)Publish provider branch to the Pact broker abstract Result<Boolean, String>publishVerificationResults(Map<String, Object> docAttributes, TestResult result, String version, String buildUrl)Publishes the result to the "pb:publish-verification-results" link in the document attributes. abstract Result<Boolean, String>publishVerificationResults(Map<String, Object> docAttributes, TestResult result, String version)Publishes the result to the "pb:publish-verification-results" link in the document attributes. abstract Result<String, Exception>uploadPactFile(File pactFile, String version)Uploads the given pact file to the broker and applies any tags abstract Result<String, Exception>uploadPactFile(File pactFile, String version, List<String> tags)Uploads the given pact file to the broker and applies any tags abstract Result<String, Exception>uploadPactFile(File pactFile, PublishConfiguration config)Uploads the given pact file to the broker and applies any tags/Branch abstract Map<String, Object>getOptions()-
-
Method Detail
-
fetchConsumersWithSelectors
@Deprecated(message = "use version that takes a list of ConsumerVersionSelectors", replaceWith = @ReplaceWith(imports = {}, expression = "fetchConsumersWithSelectorsV2")) abstract Result<List<PactBrokerResult>, Exception> fetchConsumersWithSelectors(String providerName, List<ConsumerVersionSelector> selectors, List<String> providerTags, String providerBranch, Boolean enablePending, String includeWipPactsSince)
Fetches all consumers for the given provider and selectors. If
pactbroker.consumerversionselectors.rawjsonis set as a system property or environment variable, that will override the selectors provided to this method.
-
fetchConsumersWithSelectorsV2
abstract Result<List<PactBrokerResult>, Exception> fetchConsumersWithSelectorsV2(String providerName, List<ConsumerVersionSelectors> selectors, List<String> providerTags, String providerBranch, Boolean enablePending, String includeWipPactsSince)
Fetches all consumers for the given provider and selectors. If
pactbroker.consumerversionselectors.rawjsonis set as a system property or environment variable, that will override the selectors provided to this method.
-
getUrlForProvider
abstract String getUrlForProvider(String providerName, String tag)
-
publishProviderTags
abstract Result<Boolean, List<String>> publishProviderTags(Map<String, Object> docAttributes, String name, List<String> tags, String version)
Publish all the tags for the provider to the Pact broker
- Parameters:
docAttributes- Attributes associated with the fetched Pact filename- Provider nametags- Provider tags to tag the provider withversion- Provider version
-
publishProviderBranch
abstract Result<Boolean, String> publishProviderBranch(Map<String, Object> docAttributes, String name, String branch, String version)
Publish provider branch to the Pact broker
- Parameters:
docAttributes- Attributes associated with the fetched Pact filename- Provider namebranch- Provider branchversion- Provider version
-
publishVerificationResults
abstract Result<Boolean, String> publishVerificationResults(Map<String, Object> docAttributes, TestResult result, String version, String buildUrl)
Publishes the result to the "pb:publish-verification-results" link in the document attributes.
-
publishVerificationResults
abstract Result<Boolean, String> publishVerificationResults(Map<String, Object> docAttributes, TestResult result, String version)
Publishes the result to the "pb:publish-verification-results" link in the document attributes.
-
uploadPactFile
@Deprecated(message = "Replaced with version that takes a configuration object") abstract Result<String, Exception> uploadPactFile(File pactFile, String version)
Uploads the given pact file to the broker and applies any tags
-
uploadPactFile
@Deprecated(message = "Replaced with version that takes a configuration object") abstract Result<String, Exception> uploadPactFile(File pactFile, String version, List<String> tags)
Uploads the given pact file to the broker and applies any tags
-
uploadPactFile
abstract Result<String, Exception> uploadPactFile(File pactFile, PublishConfiguration config)
Uploads the given pact file to the broker and applies any tags/Branch
-
getOptions
abstract Map<String, Object> getOptions()
-
-
-
-