pact_broker-client 1.45.0 → 1.48.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +15 -1
- data/CHANGELOG.md +31 -0
- data/README.md +51 -47
- data/doc/pacts/markdown/Pact Broker Client - Pact Broker.md +315 -1
- data/doc/pacts/markdown/Pact Broker Client - Pactflow.md +94 -0
- data/doc/pacts/markdown/README.md +1 -0
- data/lib/pact_broker/client/cli/broker.rb +9 -139
- data/lib/pact_broker/client/cli/custom_thor.rb +0 -16
- data/lib/pact_broker/client/cli/matrix_commands.rb +93 -0
- data/lib/pact_broker/client/cli/webhook_commands.rb +122 -0
- data/lib/pact_broker/client/deployments/record_support_ended.rb +1 -1
- data/lib/pact_broker/client/deployments/record_undeployment.rb +1 -1
- data/lib/pact_broker/client/matrix/resource.rb +4 -0
- data/lib/pact_broker/client/verification_required.rb +34 -0
- data/lib/pact_broker/client/version.rb +1 -1
- data/lib/pact_broker/client/webhooks/create.rb +14 -8
- data/script/record-deployment.sh +1 -1
- data/script/record-deployments-and-releases.sh +0 -2
- data/script/record-undeployment.sh +1 -1
- data/script/webhook-commands.sh +12 -0
- data/spec/lib/pact_broker/client/cli/broker_can_i_deploy_spec.rb +1 -1
- data/spec/lib/pact_broker/client/cli/broker_run_webhook_commands_spec.rb +4 -2
- data/spec/lib/pact_broker/client/deployments/record_support_ended_spec.rb +1 -1
- data/spec/lib/pact_broker/client/deployments/record_undeployment_spec.rb +1 -1
- data/spec/pacts/pact_broker_client-pact_broker.json +317 -1
- data/spec/pacts/pact_broker_client-pactflow.json +118 -0
- data/spec/service_providers/pact_helper.rb +15 -10
- data/spec/service_providers/pactflow_webhooks_create_spec.rb +86 -0
- data/spec/service_providers/record_deployment_spec.rb +1 -3
- data/spec/service_providers/record_release_spec.rb +1 -3
- data/spec/service_providers/record_undeployment_spec.rb +2 -4
- data/spec/service_providers/webhooks_create_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- metadata +12 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b31de7cb8fa97a019e49a5ff8fc37683ed0116980a40cdddb37eb1cd0a52a606
|
4
|
+
data.tar.gz: 32278f6e5d47e0ead01215df9d59fc7a63843c106739b249e68b026ea5a0f31b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9fb4c7691da7685d7d913678213a1a0576bc09f6eb118e54fec6da3fdf07bbd7c25e7d5d9f0156a700faed0a7ba16610f5f456320025fcbe991b512448d6c90
|
7
|
+
data.tar.gz: 11c9f1500fe89aebef11f79ee79fa2e3f65af16cd92c8616d90d7adc625d000269a010ea9658d0579db7c0afbc1d164a3abffab4139fc6ff628a0ca6464f2f00
|
data/.github/workflows/test.yml
CHANGED
@@ -27,7 +27,7 @@ jobs:
|
|
27
27
|
strategy:
|
28
28
|
fail-fast: false
|
29
29
|
matrix:
|
30
|
-
feature: ["", "publish_contracts"
|
30
|
+
feature: ["", "publish_contracts"]
|
31
31
|
steps:
|
32
32
|
- uses: actions/checkout@v2
|
33
33
|
- uses: ruby/setup-ruby@v1
|
@@ -42,3 +42,17 @@ jobs:
|
|
42
42
|
PACT_BROKER_TOKEN: ${{ secrets.PACTFLOW_PACT_OSS_TOKEN }}
|
43
43
|
PACT_BROKER_FEATURES: ${{ matrix.feature }}
|
44
44
|
TEST_FEATURE: ${{ matrix.feature }}
|
45
|
+
can-i-deploy:
|
46
|
+
runs-on: "ubuntu-latest"
|
47
|
+
needs: pact
|
48
|
+
steps:
|
49
|
+
- run: |
|
50
|
+
docker run --rm \
|
51
|
+
-e PACT_BROKER_BASE_URL=https://pact-oss.pactflow.io \
|
52
|
+
-e PACT_BROKER_TOKEN \
|
53
|
+
pactfoundation/pact-cli:latest \
|
54
|
+
broker can-i-deploy \
|
55
|
+
--pacticipant "Pact Broker Client" --version ${GITHUB_SHA} \
|
56
|
+
--pacticipant "Pact Broker" --latest master
|
57
|
+
env:
|
58
|
+
PACT_BROKER_TOKEN: ${{ secrets.PACTFLOW_PACT_OSS_TOKEN }}
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,34 @@
|
|
1
|
+
<a name="v1.48.0"></a>
|
2
|
+
### v1.48.0 (2021-08-04)
|
3
|
+
|
4
|
+
#### Features
|
5
|
+
|
6
|
+
* **can-i-deploy**
|
7
|
+
* remove feature toggle for --ignore option ([6e7edd8](/../../commit/6e7edd8))
|
8
|
+
|
9
|
+
<a name="v1.47.1"></a>
|
10
|
+
### v1.47.1 (2021-07-20)
|
11
|
+
|
12
|
+
#### Bug Fixes
|
13
|
+
|
14
|
+
* **verification-required**
|
15
|
+
* require a verification when either of the specified versions does not exist ([031d232](/../../commit/031d232))
|
16
|
+
|
17
|
+
<a name="v1.47.0"></a>
|
18
|
+
### v1.47.0 (2021-07-09)
|
19
|
+
|
20
|
+
#### Features
|
21
|
+
|
22
|
+
* enabled deployment, release and environment commands without a feature toggle ([bd64caa](/../../commit/bd64caa))
|
23
|
+
* update relations used for currently deploy/currently supported versions ([6f6ca2f](/../../commit/6f6ca2f))
|
24
|
+
|
25
|
+
<a name="v1.46.0"></a>
|
26
|
+
### v1.46.0 (2021-06-24)
|
27
|
+
|
28
|
+
#### Features
|
29
|
+
|
30
|
+
* support specifying team UUID when creating a webhook in Pactflow ([c4201e1](/../../commit/c4201e1))
|
31
|
+
|
1
32
|
<a name="v1.45.0"></a>
|
2
33
|
### v1.45.0 (2021-06-16)
|
3
34
|
|
data/README.md
CHANGED
@@ -78,44 +78,44 @@ Usage:
|
|
78
78
|
pact-broker can-i-deploy -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL
|
79
79
|
|
80
80
|
Options:
|
81
|
-
-a, --pacticipant=PACTICIPANT
|
81
|
+
-a, --pacticipant=PACTICIPANT
|
82
82
|
# The pacticipant name. Use once for each pacticipant being checked.
|
83
|
-
-e, [--version=VERSION]
|
83
|
+
-e, [--version=VERSION]
|
84
84
|
# The pacticipant version. Must be entered after the --pacticipant that it relates to.
|
85
|
-
[--ignore=IGNORE]
|
86
|
-
# The pacticipant name to ignore. Use once for each pacticipant being ignored.
|
87
|
-
A specific version can be ignored by also specifying a --version after the
|
85
|
+
[--ignore=IGNORE]
|
86
|
+
# The pacticipant name to ignore. Use once for each pacticipant being ignored.
|
87
|
+
A specific version can be ignored by also specifying a --version after the
|
88
88
|
pacticipant name option.
|
89
|
-
-l, [--latest=[TAG]]
|
90
|
-
# Use the latest pacticipant version. Optionally specify a TAG to use the
|
89
|
+
-l, [--latest=[TAG]]
|
90
|
+
# Use the latest pacticipant version. Optionally specify a TAG to use the
|
91
91
|
latest version with the specified tag.
|
92
|
-
[--to=TAG]
|
92
|
+
[--to=TAG]
|
93
93
|
# This is too hard to explain in a short sentence. Look at the examples.
|
94
|
-
-o, [--output=OUTPUT]
|
94
|
+
-o, [--output=OUTPUT]
|
95
95
|
# json or table
|
96
|
-
|
96
|
+
|
97
97
|
# Default: table
|
98
|
-
[--retry-while-unknown=TIMES]
|
99
|
-
# The number of times to retry while there is an unknown verification result
|
98
|
+
[--retry-while-unknown=TIMES]
|
99
|
+
# The number of times to retry while there is an unknown verification result
|
100
100
|
(ie. the provider verification is likely still running)
|
101
|
-
|
101
|
+
|
102
102
|
# Default: 0
|
103
|
-
[--retry-interval=SECONDS]
|
103
|
+
[--retry-interval=SECONDS]
|
104
104
|
# The time between retries in seconds. Use in conjuction with --retry-while-unknown
|
105
|
-
|
105
|
+
|
106
106
|
# Default: 10
|
107
|
-
[--dry-run], [--no-dry-run]
|
107
|
+
[--dry-run], [--no-dry-run]
|
108
108
|
# When enabled, always exits process with a success code. Can also be enabled by setting
|
109
109
|
the environment variable PACT_BROKER_CAN_I_DEPLOY_DRY_RUN=true.
|
110
|
-
-b, --broker-base-url=BROKER_BASE_URL
|
110
|
+
-b, --broker-base-url=BROKER_BASE_URL
|
111
111
|
# The base URL of the Pact Broker
|
112
|
-
-u, [--broker-username=BROKER_USERNAME]
|
112
|
+
-u, [--broker-username=BROKER_USERNAME]
|
113
113
|
# Pact Broker basic auth username
|
114
|
-
-p, [--broker-password=BROKER_PASSWORD]
|
114
|
+
-p, [--broker-password=BROKER_PASSWORD]
|
115
115
|
# Pact Broker basic auth password
|
116
|
-
-k, [--broker-token=BROKER_TOKEN]
|
116
|
+
-k, [--broker-token=BROKER_TOKEN]
|
117
117
|
# Pact Broker bearer token
|
118
|
-
-v, [--verbose], [--no-verbose]
|
118
|
+
-v, [--verbose], [--no-verbose]
|
119
119
|
# Verbose output. Default: false
|
120
120
|
```
|
121
121
|
|
@@ -235,27 +235,19 @@ Usage:
|
|
235
235
|
|
236
236
|
Options:
|
237
237
|
-X, --request=METHOD
|
238
|
-
# HTTP method
|
238
|
+
# Webhook HTTP method
|
239
239
|
-H, [--header=one two three]
|
240
|
-
# Header
|
240
|
+
# Webhook Header
|
241
241
|
-d, [--data=DATA]
|
242
|
-
#
|
242
|
+
# Webhook payload (file or string)
|
243
243
|
-u, [--user=USER]
|
244
|
-
#
|
244
|
+
# Webhook basic auth username and password eg. username:password
|
245
245
|
[--consumer=CONSUMER]
|
246
246
|
# Consumer name
|
247
247
|
[--provider=PROVIDER]
|
248
248
|
# Provider name
|
249
|
-
-b, --broker-base-url=BROKER_BASE_URL
|
250
|
-
# The base URL of the Pact Broker
|
251
|
-
[--broker-username=BROKER_USERNAME]
|
252
|
-
# Pact Broker basic auth username
|
253
|
-
-p, [--broker-password=BROKER_PASSWORD]
|
254
|
-
# Pact Broker basic auth password
|
255
|
-
-k, [--broker-token=BROKER_TOKEN]
|
256
|
-
# Pact Broker bearer token
|
257
249
|
[--description=DESCRIPTION]
|
258
|
-
#
|
250
|
+
# Webhook description
|
259
251
|
[--contract-content-changed], [--no-contract-content-changed]
|
260
252
|
# Trigger this webhook when the pact content changes
|
261
253
|
[--contract-published], [--no-contract-published]
|
@@ -266,6 +258,16 @@ Options:
|
|
266
258
|
# Trigger this webhook when a failed provider verification result is published
|
267
259
|
[--provider-verification-succeeded], [--no-provider-verification-succeeded]
|
268
260
|
# Trigger this webhook when a successful provider verification result is published
|
261
|
+
[--team-uuid=UUID]
|
262
|
+
# UUID of the Pactflow team to which the webhook should be assigned (Pactflow only)
|
263
|
+
-b, --broker-base-url=BROKER_BASE_URL
|
264
|
+
# The base URL of the Pact Broker
|
265
|
+
-u, [--broker-username=BROKER_USERNAME]
|
266
|
+
# Pact Broker basic auth username
|
267
|
+
-p, [--broker-password=BROKER_PASSWORD]
|
268
|
+
# Pact Broker basic auth password
|
269
|
+
-k, [--broker-token=BROKER_TOKEN]
|
270
|
+
# Pact Broker bearer token
|
269
271
|
-v, [--verbose], [--no-verbose]
|
270
272
|
# Verbose output. Default: false
|
271
273
|
|
@@ -283,27 +285,19 @@ Usage:
|
|
283
285
|
|
284
286
|
Options:
|
285
287
|
-X, --request=METHOD
|
286
|
-
# HTTP method
|
288
|
+
# Webhook HTTP method
|
287
289
|
-H, [--header=one two three]
|
288
|
-
# Header
|
290
|
+
# Webhook Header
|
289
291
|
-d, [--data=DATA]
|
290
|
-
#
|
292
|
+
# Webhook payload (file or string)
|
291
293
|
-u, [--user=USER]
|
292
|
-
#
|
294
|
+
# Webhook basic auth username and password eg. username:password
|
293
295
|
[--consumer=CONSUMER]
|
294
296
|
# Consumer name
|
295
297
|
[--provider=PROVIDER]
|
296
298
|
# Provider name
|
297
|
-
-b, --broker-base-url=BROKER_BASE_URL
|
298
|
-
# The base URL of the Pact Broker
|
299
|
-
[--broker-username=BROKER_USERNAME]
|
300
|
-
# Pact Broker basic auth username
|
301
|
-
-p, [--broker-password=BROKER_PASSWORD]
|
302
|
-
# Pact Broker basic auth password
|
303
|
-
-k, [--broker-token=BROKER_TOKEN]
|
304
|
-
# Pact Broker bearer token
|
305
299
|
[--description=DESCRIPTION]
|
306
|
-
#
|
300
|
+
# Webhook description
|
307
301
|
[--contract-content-changed], [--no-contract-content-changed]
|
308
302
|
# Trigger this webhook when the pact content changes
|
309
303
|
[--contract-published], [--no-contract-published]
|
@@ -314,6 +308,16 @@ Options:
|
|
314
308
|
# Trigger this webhook when a failed provider verification result is published
|
315
309
|
[--provider-verification-succeeded], [--no-provider-verification-succeeded]
|
316
310
|
# Trigger this webhook when a successful provider verification result is published
|
311
|
+
[--team-uuid=UUID]
|
312
|
+
# UUID of the Pactflow team to which the webhook should be assigned (Pactflow only)
|
313
|
+
-b, --broker-base-url=BROKER_BASE_URL
|
314
|
+
# The base URL of the Pact Broker
|
315
|
+
-u, [--broker-username=BROKER_USERNAME]
|
316
|
+
# Pact Broker basic auth username
|
317
|
+
-p, [--broker-password=BROKER_PASSWORD]
|
318
|
+
# Pact Broker basic auth password
|
319
|
+
-k, [--broker-token=BROKER_TOKEN]
|
320
|
+
# Pact Broker bearer token
|
317
321
|
-v, [--verbose], [--no-verbose]
|
318
322
|
# Verbose output. Default: false
|
319
323
|
--uuid=UUID
|
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
#### Requests from Pact Broker Client to Pact Broker
|
4
4
|
|
5
|
+
* [A request for a pacticipant version](#a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_2_environments_that_aren't_test_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with 2 environments that aren't test available for deployment
|
6
|
+
|
7
|
+
* [A request for a pacticipant version](#a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment
|
8
|
+
|
9
|
+
* [A request for a pacticipant version](#a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_release) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for release
|
10
|
+
|
11
|
+
* [A request for an environment](#a_request_for_an_environment_given_an_environment_with_name_test_and_UUID_16926ef3-590f-4e3f-838e-719717aa88c9_exists) given an environment with name test and UUID 16926ef3-590f-4e3f-838e-719717aa88c9 exists
|
12
|
+
|
5
13
|
* [A request for the compatibility matrix for a pacticipant that does not exist](#a_request_for_the_compatibility_matrix_for_a_pacticipant_that_does_not_exist)
|
6
14
|
|
7
15
|
* [A request for the compatibility matrix for all versions of Foo and Bar](#a_request_for_the_compatibility_matrix_for_all_versions_of_Foo_and_Bar_given_the_pact_for_Foo_version_1.2.3_and_1.2.4_has_been_verified_by_Bar_version_4.5.6) given the pact for Foo version 1.2.3 and 1.2.4 has been verified by Bar version 4.5.6
|
@@ -20,6 +28,8 @@
|
|
20
28
|
|
21
29
|
* [A request for the compatibility matrix where only the version of Foo is specified](#a_request_for_the_compatibility_matrix_where_only_the_version_of_Foo_is_specified_given_the_pact_for_Foo_version_1.2.3_has_been_verified_by_Bar_version_4.5.6_and_version_5.6.7) given the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6 and version 5.6.7
|
22
30
|
|
31
|
+
* [A request for the environments](#a_request_for_the_environments_given_an_environment_with_name_test_exists) given an environment with name test exists
|
32
|
+
|
23
33
|
* [A request for the index resource](#a_request_for_the_index_resource)
|
24
34
|
|
25
35
|
* [A request for the index resource](#a_request_for_the_index_resource_given_the_pacticipant_relations_are_present) given the pacticipant relations are present
|
@@ -28,6 +38,8 @@
|
|
28
38
|
|
29
39
|
* [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:latest-version_relation_exists_in_the_index_resource) given the pb:latest-version relation exists in the index resource
|
30
40
|
|
41
|
+
* [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:pacticipant-version_and_pb:environments_relations_exist_in_the_index_resource) given the pb:pacticipant-version and pb:environments relations exist in the index resource
|
42
|
+
|
31
43
|
* [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:pacticipant-version_relation_exists_in_the_index_resource) given the pb:pacticipant-version relation exists in the index resource
|
32
44
|
|
33
45
|
* [A request for the index resource with the webhook relation](#a_request_for_the_index_resource_with_the_webhook_relation)
|
@@ -74,6 +86,10 @@
|
|
74
86
|
|
75
87
|
* [A request to list the latest pacts](#a_request_to_list_the_latest_pacts_given_a_pact_between_Condor_and_the_Pricing_Service_exists) given a pact between Condor and the Pricing Service exists
|
76
88
|
|
89
|
+
* [A request to list the versions deployed to an environment for a pacticipant name and target](#a_request_to_list_the_versions_deployed_to_an_environment_for_a_pacticipant_name_and_target_given_an_version_is_deployed_to_environment_with_UUID_16926ef3-590f-4e3f-838e-719717aa88c9_with_target_customer-1) given an version is deployed to environment with UUID 16926ef3-590f-4e3f-838e-719717aa88c9 with target customer-1
|
90
|
+
|
91
|
+
* [A request to mark a deployed version as not currently deploye](#a_request_to_mark_a_deployed_version_as_not_currently_deploye_given_a_currently_deployed_version_exists) given a currently deployed version exists
|
92
|
+
|
77
93
|
* [A request to publish a pact](#a_request_to_publish_a_pact_given_'Condor'_already_exist_in_the_pact-broker,_but_the_'Pricing_Service'_does_not) given 'Condor' already exist in the pact-broker, but the 'Pricing Service' does not
|
78
94
|
|
79
95
|
* [A request to publish a pact](#a_request_to_publish_a_pact_given_the_'Pricing_Service'_already_exists_in_the_pact-broker) given the 'Pricing Service' already exists in the pact-broker
|
@@ -84,6 +100,10 @@
|
|
84
100
|
|
85
101
|
* [A request to publish a pact with method put](#a_request_to_publish_a_pact_with_method_put_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker,_and_Condor_already_has_a_pact_published_for_version_1.3.0) given the 'Pricing Service' and 'Condor' already exist in the pact-broker, and Condor already has a pact published for version 1.3.0
|
86
102
|
|
103
|
+
* [A request to record a deployment](#a_request_to_record_a_deployment_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment
|
104
|
+
|
105
|
+
* [A request to record a release](#a_request_to_record_a_release_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment
|
106
|
+
|
87
107
|
* [A request to register the repository URL of a pacticipant](#a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_'Pricing_Service'_already_exists_in_the_pact-broker) given the 'Pricing Service' already exists in the pact-broker
|
88
108
|
|
89
109
|
* [A request to register the repository URL of a pacticipant](#a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_'Pricing_Service'_does_not_exist_in_the_pact-broker) given the 'Pricing Service' does not exist in the pact-broker
|
@@ -116,6 +136,127 @@
|
|
116
136
|
|
117
137
|
#### Interactions
|
118
138
|
|
139
|
+
<a name="a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_2_environments_that_aren't_test_available_for_deployment"></a>
|
140
|
+
Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with 2 environments that aren't test available for deployment**, upon receiving **a request for a pacticipant version** from Pact Broker Client, with
|
141
|
+
```json
|
142
|
+
{
|
143
|
+
"method": "GET",
|
144
|
+
"path": "/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-VERSION-Foo-5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
|
145
|
+
"headers": {
|
146
|
+
"Accept": "application/hal+json"
|
147
|
+
}
|
148
|
+
}
|
149
|
+
```
|
150
|
+
Pact Broker will respond with:
|
151
|
+
```json
|
152
|
+
{
|
153
|
+
"status": 200,
|
154
|
+
"headers": {
|
155
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
156
|
+
},
|
157
|
+
"body": {
|
158
|
+
"_links": {
|
159
|
+
"pb:record-deployment": [
|
160
|
+
{
|
161
|
+
"name": "prod",
|
162
|
+
"href": "href"
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"name": "dev",
|
166
|
+
"href": "href"
|
167
|
+
}
|
168
|
+
]
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
172
|
+
```
|
173
|
+
<a name="a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment"></a>
|
174
|
+
Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment**, upon receiving **a request for a pacticipant version** from Pact Broker Client, with
|
175
|
+
```json
|
176
|
+
{
|
177
|
+
"method": "GET",
|
178
|
+
"path": "/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-VERSION-Foo-5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
|
179
|
+
"headers": {
|
180
|
+
"Accept": "application/hal+json"
|
181
|
+
}
|
182
|
+
}
|
183
|
+
```
|
184
|
+
Pact Broker will respond with:
|
185
|
+
```json
|
186
|
+
{
|
187
|
+
"status": 200,
|
188
|
+
"headers": {
|
189
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
190
|
+
},
|
191
|
+
"body": {
|
192
|
+
"_links": {
|
193
|
+
"pb:record-deployment": [
|
194
|
+
{
|
195
|
+
"name": "test",
|
196
|
+
"href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-RECORD-DEPLOYMENT-FOO-5556B8149BF8BAC76BC30F50A8A2DD4C22C85F30-TEST"
|
197
|
+
}
|
198
|
+
]
|
199
|
+
}
|
200
|
+
}
|
201
|
+
}
|
202
|
+
```
|
203
|
+
<a name="a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_release"></a>
|
204
|
+
Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for release**, upon receiving **a request for a pacticipant version** from Pact Broker Client, with
|
205
|
+
```json
|
206
|
+
{
|
207
|
+
"method": "GET",
|
208
|
+
"path": "/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-VERSION-Foo-5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
|
209
|
+
"headers": {
|
210
|
+
"Accept": "application/hal+json"
|
211
|
+
}
|
212
|
+
}
|
213
|
+
```
|
214
|
+
Pact Broker will respond with:
|
215
|
+
```json
|
216
|
+
{
|
217
|
+
"status": 200,
|
218
|
+
"headers": {
|
219
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
220
|
+
},
|
221
|
+
"body": {
|
222
|
+
"_links": {
|
223
|
+
"pb:record-release": [
|
224
|
+
{
|
225
|
+
"name": "test",
|
226
|
+
"href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-RECORD-RELEASE-FOO-5556B8149BF8BAC76BC30F50A8A2DD4C22C85F30-TEST"
|
227
|
+
}
|
228
|
+
]
|
229
|
+
}
|
230
|
+
}
|
231
|
+
}
|
232
|
+
```
|
233
|
+
<a name="a_request_for_an_environment_given_an_environment_with_name_test_and_UUID_16926ef3-590f-4e3f-838e-719717aa88c9_exists"></a>
|
234
|
+
Given **an environment with name test and UUID 16926ef3-590f-4e3f-838e-719717aa88c9 exists**, upon receiving **a request for an environment** from Pact Broker Client, with
|
235
|
+
```json
|
236
|
+
{
|
237
|
+
"method": "GET",
|
238
|
+
"path": "/HAL-REL-PLACEHOLDER-PB-ENVIRONMENT-16926ef3-590f-4e3f-838e-719717aa88c9",
|
239
|
+
"headers": {
|
240
|
+
"Accept": "application/hal+json"
|
241
|
+
}
|
242
|
+
}
|
243
|
+
```
|
244
|
+
Pact Broker will respond with:
|
245
|
+
```json
|
246
|
+
{
|
247
|
+
"status": 200,
|
248
|
+
"headers": {
|
249
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
250
|
+
},
|
251
|
+
"body": {
|
252
|
+
"_links": {
|
253
|
+
"pb:currently-deployed-deployed-versions": {
|
254
|
+
"href": "http://localhost:1234/PLACEHOLDER-ENVIRONMENT-CURRENTLY-DEPLOYED-16926ef3-590f-4e3f-838e-719717aa88c9"
|
255
|
+
}
|
256
|
+
}
|
257
|
+
}
|
258
|
+
}
|
259
|
+
```
|
119
260
|
<a name="a_request_for_the_compatibility_matrix_for_a_pacticipant_that_does_not_exist"></a>
|
120
261
|
Upon receiving **a request for the compatibility matrix for a pacticipant that does not exist** from Pact Broker Client, with
|
121
262
|
```json
|
@@ -537,6 +678,36 @@ Pact Broker will respond with:
|
|
537
678
|
}
|
538
679
|
}
|
539
680
|
```
|
681
|
+
<a name="a_request_for_the_environments_given_an_environment_with_name_test_exists"></a>
|
682
|
+
Given **an environment with name test exists**, upon receiving **a request for the environments** from Pact Broker Client, with
|
683
|
+
```json
|
684
|
+
{
|
685
|
+
"method": "GET",
|
686
|
+
"path": "/HAL-REL-PLACEHOLDER-PB-ENVIRONMENTS",
|
687
|
+
"headers": {
|
688
|
+
"Accept": "application/hal+json"
|
689
|
+
}
|
690
|
+
}
|
691
|
+
```
|
692
|
+
Pact Broker will respond with:
|
693
|
+
```json
|
694
|
+
{
|
695
|
+
"status": 200,
|
696
|
+
"headers": {
|
697
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
698
|
+
},
|
699
|
+
"body": {
|
700
|
+
"_links": {
|
701
|
+
"pb:environments": [
|
702
|
+
{
|
703
|
+
"name": "test",
|
704
|
+
"href": "href"
|
705
|
+
}
|
706
|
+
]
|
707
|
+
}
|
708
|
+
}
|
709
|
+
}
|
710
|
+
```
|
540
711
|
<a name="a_request_for_the_index_resource"></a>
|
541
712
|
Upon receiving **a request for the index resource** from Pact Broker Client, with
|
542
713
|
```json
|
@@ -654,6 +825,36 @@ Pact Broker will respond with:
|
|
654
825
|
}
|
655
826
|
}
|
656
827
|
```
|
828
|
+
<a name="a_request_for_the_index_resource_given_the_pb:pacticipant-version_and_pb:environments_relations_exist_in_the_index_resource"></a>
|
829
|
+
Given **the pb:pacticipant-version and pb:environments relations exist in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client, with
|
830
|
+
```json
|
831
|
+
{
|
832
|
+
"method": "GET",
|
833
|
+
"path": "/",
|
834
|
+
"headers": {
|
835
|
+
"Accept": "application/hal+json"
|
836
|
+
}
|
837
|
+
}
|
838
|
+
```
|
839
|
+
Pact Broker will respond with:
|
840
|
+
```json
|
841
|
+
{
|
842
|
+
"status": 200,
|
843
|
+
"headers": {
|
844
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
845
|
+
},
|
846
|
+
"body": {
|
847
|
+
"_links": {
|
848
|
+
"pb:pacticipant-version": {
|
849
|
+
"href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-VERSION-{pacticipant}-{version}"
|
850
|
+
},
|
851
|
+
"pb:environments": {
|
852
|
+
"href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-ENVIRONMENTS"
|
853
|
+
}
|
854
|
+
}
|
855
|
+
}
|
856
|
+
}
|
857
|
+
```
|
657
858
|
<a name="a_request_for_the_index_resource_given_the_pb:pacticipant-version_relation_exists_in_the_index_resource"></a>
|
658
859
|
Given **the pb:pacticipant-version relation exists in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client, with
|
659
860
|
```json
|
@@ -1666,6 +1867,72 @@ Pact Broker will respond with:
|
|
1666
1867
|
}
|
1667
1868
|
}
|
1668
1869
|
```
|
1870
|
+
<a name="a_request_to_list_the_versions_deployed_to_an_environment_for_a_pacticipant_name_and_target_given_an_version_is_deployed_to_environment_with_UUID_16926ef3-590f-4e3f-838e-719717aa88c9_with_target_customer-1"></a>
|
1871
|
+
Given **an version is deployed to environment with UUID 16926ef3-590f-4e3f-838e-719717aa88c9 with target customer-1**, upon receiving **a request to list the versions deployed to an environment for a pacticipant name and target** from Pact Broker Client, with
|
1872
|
+
```json
|
1873
|
+
{
|
1874
|
+
"method": "GET",
|
1875
|
+
"path": "/PLACEHOLDER-ENVIRONMENT-CURRENTLY-DEPLOYED-16926ef3-590f-4e3f-838e-719717aa88c9",
|
1876
|
+
"query": "pacticipant=Foo",
|
1877
|
+
"headers": {
|
1878
|
+
"Accept": "application/hal+json"
|
1879
|
+
}
|
1880
|
+
}
|
1881
|
+
```
|
1882
|
+
Pact Broker will respond with:
|
1883
|
+
```json
|
1884
|
+
{
|
1885
|
+
"status": 200,
|
1886
|
+
"headers": {
|
1887
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
1888
|
+
},
|
1889
|
+
"body": {
|
1890
|
+
"_embedded": {
|
1891
|
+
"deployedVersions": [
|
1892
|
+
{
|
1893
|
+
"target": "customer-1",
|
1894
|
+
"_links": {
|
1895
|
+
"self": {
|
1896
|
+
"href": "http://localhost:1234/PLACEHOLDER-DEPLOYED-VERSION-ff3adecf-cfc5-4653-a4e3-f1861092f8e0"
|
1897
|
+
}
|
1898
|
+
}
|
1899
|
+
}
|
1900
|
+
]
|
1901
|
+
}
|
1902
|
+
}
|
1903
|
+
}
|
1904
|
+
```
|
1905
|
+
<a name="a_request_to_mark_a_deployed_version_as_not_currently_deploye_given_a_currently_deployed_version_exists"></a>
|
1906
|
+
Given **a currently deployed version exists**, upon receiving **a request to mark a deployed version as not currently deploye** from Pact Broker Client, with
|
1907
|
+
```json
|
1908
|
+
{
|
1909
|
+
"method": "PATCH",
|
1910
|
+
"path": "/PLACEHOLDER-DEPLOYED-VERSION-ff3adecf-cfc5-4653-a4e3-f1861092f8e0",
|
1911
|
+
"headers": {
|
1912
|
+
"Content-Type": "application/merge-patch+json"
|
1913
|
+
},
|
1914
|
+
"body": {
|
1915
|
+
"currentlyDeployed": false
|
1916
|
+
}
|
1917
|
+
}
|
1918
|
+
```
|
1919
|
+
Pact Broker will respond with:
|
1920
|
+
```json
|
1921
|
+
{
|
1922
|
+
"status": 200,
|
1923
|
+
"headers": {
|
1924
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
1925
|
+
},
|
1926
|
+
"body": {
|
1927
|
+
"currentlyDeployed": false,
|
1928
|
+
"_embedded": {
|
1929
|
+
"version": {
|
1930
|
+
"number": "2"
|
1931
|
+
}
|
1932
|
+
}
|
1933
|
+
}
|
1934
|
+
}
|
1935
|
+
```
|
1669
1936
|
<a name="a_request_to_publish_a_pact_given_'Condor'_already_exist_in_the_pact-broker,_but_the_'Pricing_Service'_does_not"></a>
|
1670
1937
|
Given **'Condor' already exist in the pact-broker, but the 'Pricing Service' does not**, upon receiving **a request to publish a pact** from Pact Broker Client, with
|
1671
1938
|
```json
|
@@ -1854,6 +2121,54 @@ Pact Broker will respond with:
|
|
1854
2121
|
}
|
1855
2122
|
}
|
1856
2123
|
```
|
2124
|
+
<a name="a_request_to_record_a_deployment_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment"></a>
|
2125
|
+
Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment**, upon receiving **a request to record a deployment** from Pact Broker Client, with
|
2126
|
+
```json
|
2127
|
+
{
|
2128
|
+
"method": "POST",
|
2129
|
+
"path": "/HAL-REL-PLACEHOLDER-PB-RECORD-DEPLOYMENT-FOO-5556B8149BF8BAC76BC30F50A8A2DD4C22C85F30-TEST",
|
2130
|
+
"headers": {
|
2131
|
+
"Content-Type": "application/json",
|
2132
|
+
"Accept": "application/hal+json"
|
2133
|
+
},
|
2134
|
+
"body": {
|
2135
|
+
"target": "blue"
|
2136
|
+
}
|
2137
|
+
}
|
2138
|
+
```
|
2139
|
+
Pact Broker will respond with:
|
2140
|
+
```json
|
2141
|
+
{
|
2142
|
+
"status": 201,
|
2143
|
+
"headers": {
|
2144
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
2145
|
+
},
|
2146
|
+
"body": {
|
2147
|
+
"target": "blue"
|
2148
|
+
}
|
2149
|
+
}
|
2150
|
+
```
|
2151
|
+
<a name="a_request_to_record_a_release_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment"></a>
|
2152
|
+
Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment**, upon receiving **a request to record a release** from Pact Broker Client, with
|
2153
|
+
```json
|
2154
|
+
{
|
2155
|
+
"method": "POST",
|
2156
|
+
"path": "/HAL-REL-PLACEHOLDER-PB-RECORD-RELEASE-FOO-5556B8149BF8BAC76BC30F50A8A2DD4C22C85F30-TEST",
|
2157
|
+
"headers": {
|
2158
|
+
"Content-Type": "application/json",
|
2159
|
+
"Accept": "application/hal+json"
|
2160
|
+
}
|
2161
|
+
}
|
2162
|
+
```
|
2163
|
+
Pact Broker will respond with:
|
2164
|
+
```json
|
2165
|
+
{
|
2166
|
+
"status": 201,
|
2167
|
+
"headers": {
|
2168
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
2169
|
+
}
|
2170
|
+
}
|
2171
|
+
```
|
1857
2172
|
<a name="a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_'Pricing_Service'_already_exists_in_the_pact-broker"></a>
|
1858
2173
|
Given **the 'Pricing Service' already exists in the pact-broker**, upon receiving **a request to register the repository URL of a pacticipant** from Pact Broker Client, with
|
1859
2174
|
```json
|
@@ -2264,7 +2579,6 @@ Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker**, u
|
|
2264
2579
|
}
|
2265
2580
|
],
|
2266
2581
|
"request": {
|
2267
|
-
"url": null,
|
2268
2582
|
"method": "POST",
|
2269
2583
|
"headers": {
|
2270
2584
|
"Foo": "bar",
|