Skip to content

Commit

Permalink
feat: update to standalone 1.88.78 and support new verifier option: -…
Browse files Browse the repository at this point in the history
…-provider-version-branch
  • Loading branch information
dabfleming committed Nov 5, 2021
1 parent 3dca810 commit 3dc7736
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions dsl/pact.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion install/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
7 changes: 7 additions & 0 deletions types/verify_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit 3dc7736

Please sign in to comment.