From 3dc7736bb67d20a060ff647725ee3a0f4ddb3207 Mon Sep 17 00:00:00 2001 From: David Fleming Date: Thu, 4 Nov 2021 15:47:19 -0400 Subject: [PATCH] feat: update to standalone 1.88.78 and support new verifier option: --provider-version-branch --- Dockerfile | 6 +++--- dsl/pact.go | 1 + install/installer.go | 2 +- types/verify_request.go | 7 +++++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb9f9bd6c..63ec8e39b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM golang:1.16 # Install pact ruby standalone binaries -RUN curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.37.0/pact-1.37.0-linux-x86_64.tar.gz; \ - tar -C /usr/local -xzf pact-1.37.0-linux-x86_64.tar.gz; \ - rm pact-1.37.0-linux-x86_64.tar.gz +RUN curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.88.78/pact-1.88.78-linux-x86_64.tar.gz; \ + tar -C /usr/local -xzf pact-1.88.78-linux-x86_64.tar.gz; \ + rm pact-1.88.78-linux-x86_64.tar.gz ENV PATH /usr/local/pact/bin:$PATH diff --git a/dsl/pact.go b/dsl/pact.go index 848b82828..0664ae6d7 100644 --- a/dsl/pact.go +++ b/dsl/pact.go @@ -374,6 +374,7 @@ func (p *Pact) VerifyProviderRaw(request types.VerifyRequest) ([]types.ProviderV ConsumerVersionSelectors: request.ConsumerVersionSelectors, EnablePending: request.EnablePending, ProviderTags: request.ProviderTags, + ProviderBranch: request.ProviderBranch, Verbose: request.Verbose, FailIfNoPactsFound: request.FailIfNoPactsFound, IncludeWIPPactsSince: request.IncludeWIPPactsSince, diff --git a/install/installer.go b/install/installer.go index 0f146a4a9..38feb7f86 100644 --- a/install/installer.go +++ b/install/installer.go @@ -18,7 +18,7 @@ type Installer struct { const ( mockServiceRange = ">= 3.5.0, < 4.0.0" - verifierRange = ">= 1.31.0, < 2.0.0" + verifierRange = ">= 1.36.1, < 2.0.0" brokerRange = ">= 1.22.3" ) diff --git a/types/verify_request.go b/types/verify_request.go index 135de7e74..5d256cfbb 100644 --- a/types/verify_request.go +++ b/types/verify_request.go @@ -41,6 +41,9 @@ type VerifyRequest struct { // Tags to apply to the provider application version ProviderTags []string + // Branch to apply to the provider application version + ProviderBranch string + // ProviderStatesSetupURL is the endpoint to post current provider state // to on the Provider API. // Deprecated: For backward compatibility ProviderStatesSetupURL is @@ -223,6 +226,10 @@ func (v *VerifyRequest) Validate() error { v.Args = append(v.Args, "--provider-version-tag", tag) } + if v.ProviderBranch != "" { + v.Args = append(v.Args, "--provider-version-branch", v.ProviderBranch) + } + if v.EnablePending { v.Args = append(v.Args, "--enable-pending") }