pact_broker-client 1.19.0 → 1.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +3 -3
- data/lib/pact_broker/client/cli/broker.rb +3 -1
- data/lib/pact_broker/client/cli/can_i_deploy_long_desc.txt +2 -2
- data/lib/pact_broker/client/matrix.rb +1 -0
- data/lib/pact_broker/client/version.rb +1 -1
- data/spec/lib/pact_broker/client/cli/broker_can_i_deploy_spec.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36bf162b7373bf5c66a1144647bc90cec11eceea
|
4
|
+
data.tar.gz: ac2f6395bd8882eb2711af95bb999c9dda3678cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6f31eadfca03d30063b7377d83792f45f44e0ef71f700ae34cafbe9d0d950d21e2cf19ebd57203329a7e5306ab57fb3b22ace88e42c2142b2ed3aba1ecdecbb
|
7
|
+
data.tar.gz: e0fd38b680973acdca44a52935f3c2317c4e23894c8642c63fdf08ebad6e848e4120d2e6a10f7a68fee291c3c17f7808a4c40ebe07dec896ba461df01bfd5c4c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
<a name="v1.20.0"></a>
|
2
|
+
### v1.20.0 (2019-08-27)
|
3
|
+
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* allow limit to be set for can-i-deploy until https://github.com/pact-foundation/pact_broker-client/issues/53 is fixed ([f692774](/../../commit/f692774))
|
8
|
+
|
9
|
+
|
1
10
|
<a name="v1.19.0"></a>
|
2
11
|
### v1.19.0 (2019-06-25)
|
3
12
|
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Pact Broker Client
|
2
2
|
|
3
|
-
A client for the Pact Broker. Publishes pacts to, and retrieves pacts from, a Pact Broker. The functionality is available via a CLI, or via Ruby Rake tasks. You can also use the [Pact CLI Docker image]
|
3
|
+
A client for the Pact Broker. Publishes pacts to, and retrieves pacts from, a Pact Broker. The functionality is available via a CLI, or via Ruby Rake tasks. You can also use the [Pact CLI Docker image](https://hub.docker.com/r/pactfoundation/pact-cli).
|
4
4
|
|
5
5
|
[![Build Status](https://travis-ci.org/pact-foundation/pact_broker-client.svg?branch=master)](https://travis-ci.org/pact-foundation/pact_broker-client)
|
6
6
|
|
@@ -116,14 +116,14 @@ Description:
|
|
116
116
|
If you do not/cannot tag every application at deployment, you have two options. You can either use the very first form of this
|
117
117
|
command which just checks that the *latest* verification is successful (not recommended as it's the production version that you
|
118
118
|
really care about) or you will need to determine the production versions of each collaborating application from some other
|
119
|
-
source (eg. git) and
|
119
|
+
source (eg. git) and explicitly reference each one using one using the format `--pacticipant PACTICIPANT1 --version VERSION1
|
120
120
|
--pacticipant PACTICIPANT2 --version VERSION2 ...`
|
121
121
|
|
122
122
|
# Other commands
|
123
123
|
|
124
124
|
Check the status of the pacts for the latest pacticipant version. This form is not recommended for use in your CI as it is
|
125
125
|
possible that the version you are about to deploy is not the the version that the Broker considers the latest. It's best to
|
126
|
-
specify the version
|
126
|
+
specify the version explicitly.
|
127
127
|
|
128
128
|
$ pact-broker can-i-deploy --pacticipant PACTICIPANT --latest --broker-base-url BROKER_BASE_URL
|
129
129
|
|
@@ -32,12 +32,14 @@ module PactBroker
|
|
32
32
|
method_option :verbose, aliases: "-v", type: :boolean, default: false, required: false, desc: "Verbose output. Default: false"
|
33
33
|
method_option :retry_while_unknown, banner: 'TIMES', type: :numeric, default: 0, required: false, desc: "The number of times to retry while there is an unknown verification result (ie. the provider verification is likely still running)"
|
34
34
|
method_option :retry_interval, banner: 'SECONDS', type: :numeric, default: 10, required: false, desc: "The time between retries in seconds. Use in conjuction with --retry-while-unknown"
|
35
|
+
# Allow limit to be set manually until https://github.com/pact-foundation/pact_broker-client/issues/53 is fixed
|
36
|
+
method_option :limit, hide: true
|
35
37
|
|
36
38
|
def can_i_deploy(*ignored_but_necessary)
|
37
39
|
selectors = VersionSelectorOptionsParser.call(ARGV)
|
38
40
|
validate_can_i_deploy_selectors(selectors)
|
39
41
|
can_i_deploy_options = { output: options.output, retry_while_unknown: options.retry_while_unknown, retry_interval: options.retry_interval }
|
40
|
-
result = CanIDeploy.call(options.broker_base_url, selectors, {to_tag: options.to}, can_i_deploy_options, pact_broker_client_options)
|
42
|
+
result = CanIDeploy.call(options.broker_base_url, selectors, {to_tag: options.to, limit: options.limit}, can_i_deploy_options, pact_broker_client_options)
|
41
43
|
$stdout.puts result.message
|
42
44
|
exit(1) unless result.success
|
43
45
|
end
|
@@ -20,11 +20,11 @@ If all applications within the pact network are not being deployed continuously
|
|
20
20
|
|
21
21
|
## Other approaches
|
22
22
|
|
23
|
-
If you do not/cannot tag every application at deployment, you have two options. You can either use the very first form of this command which just checks that the *latest* verification is successful (not recommended as it's the production version that you really care about) or you will need to determine the production versions of each collaborating application from some other source (eg. git) and
|
23
|
+
If you do not/cannot tag every application at deployment, you have two options. You can either use the very first form of this command which just checks that the *latest* verification is successful (not recommended as it's the production version that you really care about) or you will need to determine the production versions of each collaborating application from some other source (eg. git) and explicitly reference each one using one using the format `--pacticipant PACTICIPANT1 --version VERSION1 --pacticipant PACTICIPANT2 --version VERSION2 ...`
|
24
24
|
|
25
25
|
# Other commands
|
26
26
|
|
27
|
-
Check the status of the pacts for the latest pacticipant version. This form is not recommended for use in your CI as it is possible that the version you are about to deploy is not the the version that the Broker considers the latest. It's best to specify the version
|
27
|
+
Check the status of the pacts for the latest pacticipant version. This form is not recommended for use in your CI as it is possible that the version you are about to deploy is not the the version that the Broker considers the latest. It's best to specify the version explicitly.
|
28
28
|
|
29
29
|
$ pact-broker can-i-deploy --pacticipant PACTICIPANT --latest --broker-base-url BROKER_BASE_URL
|
30
30
|
|
@@ -23,7 +23,8 @@ module PactBroker
|
|
23
23
|
broker_token: 'token',
|
24
24
|
verbose: 'verbose',
|
25
25
|
retry_while_unknown: 1,
|
26
|
-
retry_interval: 2
|
26
|
+
retry_interval: 2,
|
27
|
+
limit: 1000
|
27
28
|
}
|
28
29
|
end
|
29
30
|
|
@@ -35,7 +36,7 @@ module PactBroker
|
|
35
36
|
end
|
36
37
|
|
37
38
|
it "invokes the CanIDeploy service" do
|
38
|
-
expect(CanIDeploy).to receive(:call).with('http://pact-broker', version_selectors, {to_tag: nil}, {output: 'table', retry_while_unknown: 1, retry_interval: 2}, {token: 'token', verbose: 'verbose'})
|
39
|
+
expect(CanIDeploy).to receive(:call).with('http://pact-broker', version_selectors, {to_tag: nil, limit: 1000}, {output: 'table', retry_while_unknown: 1, retry_interval: 2}, {token: 'token', verbose: 'verbose'})
|
39
40
|
invoke_can_i_deploy
|
40
41
|
end
|
41
42
|
|
@@ -53,7 +54,7 @@ module PactBroker
|
|
53
54
|
end
|
54
55
|
|
55
56
|
it "passes the value as the matrix options" do
|
56
|
-
expect(CanIDeploy).to receive(:call).with(anything, anything, {to_tag: 'prod'}, anything, anything)
|
57
|
+
expect(CanIDeploy).to receive(:call).with(anything, anything, {to_tag: 'prod', limit: 1000}, anything, anything)
|
57
58
|
invoke_can_i_deploy
|
58
59
|
end
|
59
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact_broker-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Beth Skurrie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|