pact_broker-client 1.56.0 → 1.59.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release_gem.yml +1 -1
  3. data/.github/workflows/test.yml +2 -0
  4. data/CHANGELOG.md +26 -0
  5. data/README.md +222 -211
  6. data/lib/pact_broker/client/base_client.rb +1 -1
  7. data/lib/pact_broker/client/cli/matrix_commands.rb +3 -2
  8. data/lib/pact_broker/client/cli/version_selector_options_parser.rb +4 -0
  9. data/lib/pact_broker/client/cli/webhook_commands.rb +1 -3
  10. data/lib/pact_broker/client/deployments/record_release.rb +5 -1
  11. data/lib/pact_broker/client/deployments/record_undeployment.rb +1 -1
  12. data/lib/pact_broker/client/environments/environment_command.rb +6 -1
  13. data/lib/pact_broker/client/git.rb +1 -1
  14. data/lib/pact_broker/client/hal/entity.rb +8 -4
  15. data/lib/pact_broker/client/hal/http_client.rb +4 -0
  16. data/lib/pact_broker/client/hal/link.rb +7 -2
  17. data/lib/pact_broker/client/publish_pacts.rb +5 -1
  18. data/lib/pact_broker/client/version.rb +1 -1
  19. data/lib/pact_broker/client/webhooks/create.rb +1 -1
  20. data/pact-broker-client.gemspec +4 -4
  21. data/script/can-i-deploy.sh +5 -0
  22. data/script/record-deployments-and-releases.sh +3 -3
  23. data/script/update-cli-usage-in-readme.rb +6 -2
  24. data/spec/lib/pact_broker/client/cli/version_selector_options_parser_spec.rb +6 -0
  25. data/spec/lib/pact_broker/client/deployments/record_deployment_spec.rb +12 -1
  26. data/spec/lib/pact_broker/client/deployments/record_undeployment_spec.rb +1 -1
  27. data/spec/lib/pact_broker/client/hal/entity_spec.rb +1 -1
  28. data/spec/lib/pact_broker/client/hal/link_spec.rb +15 -0
  29. metadata +12 -17
data/README.md CHANGED
@@ -52,37 +52,37 @@ Usage:
52
52
  pact-broker publish PACT_DIRS_OR_FILES ... -a, --consumer-app-version=CONSUMER_APP_VERSION -b, --broker-base-url=BROKER_BASE_URL
53
53
 
54
54
  Options:
55
- -a, --consumer-app-version=CONSUMER_APP_VERSION
55
+ -a, --consumer-app-version=CONSUMER_APP_VERSION
56
56
  # The consumer application version
57
- -h, [--branch=BRANCH]
57
+ -h, [--branch=BRANCH]
58
58
  # Repository branch of the consumer version
59
- [--auto-detect-version-properties], [--no-auto-detect-version-properties]
59
+ [--auto-detect-version-properties], [--no-auto-detect-version-properties]
60
60
  # Automatically detect the repository branch from known CI
61
61
  environment variables or git CLI.
62
- -t, [--tag=TAG]
62
+ -t, [--tag=TAG]
63
63
  # Tag name for consumer version. Can be specified multiple
64
64
  times.
65
- -g, [--tag-with-git-branch], [--no-tag-with-git-branch]
65
+ -g, [--tag-with-git-branch], [--no-tag-with-git-branch]
66
66
  # Tag consumer version with the name of the current git branch.
67
67
  Default: false
68
- [--build-url=BUILD_URL]
68
+ [--build-url=BUILD_URL]
69
69
  # The build URL that created the pact
70
- [--merge], [--no-merge]
70
+ [--merge], [--no-merge]
71
71
  # If a pact already exists for this consumer version and
72
72
  provider, merge the contents. Useful when running Pact tests
73
73
  concurrently on different build nodes.
74
- -o, [--output=OUTPUT]
74
+ -o, [--output=OUTPUT]
75
75
  # json or text
76
76
  # Default: text
77
- -b, --broker-base-url=BROKER_BASE_URL
77
+ -b, --broker-base-url=BROKER_BASE_URL
78
78
  # The base URL of the Pact Broker
79
- -u, [--broker-username=BROKER_USERNAME]
79
+ -u, [--broker-username=BROKER_USERNAME]
80
80
  # Pact Broker basic auth username
81
- -p, [--broker-password=BROKER_PASSWORD]
81
+ -p, [--broker-password=BROKER_PASSWORD]
82
82
  # Pact Broker basic auth password
83
- -k, [--broker-token=BROKER_TOKEN]
83
+ -k, [--broker-token=BROKER_TOKEN]
84
84
  # Pact Broker bearer token
85
- -v, [--verbose], [--no-verbose]
85
+ -v, [--verbose], [--no-verbose]
86
86
  # Verbose output. Default: false
87
87
  ```
88
88
 
@@ -95,17 +95,17 @@ Usage:
95
95
  pact-broker list-latest-pact-versions -b, --broker-base-url=BROKER_BASE_URL
96
96
 
97
97
  Options:
98
- -b, --broker-base-url=BROKER_BASE_URL
98
+ -b, --broker-base-url=BROKER_BASE_URL
99
99
  # The base URL of the Pact Broker
100
- -u, [--broker-username=BROKER_USERNAME]
100
+ -u, [--broker-username=BROKER_USERNAME]
101
101
  # Pact Broker basic auth username
102
- -p, [--broker-password=BROKER_PASSWORD]
102
+ -p, [--broker-password=BROKER_PASSWORD]
103
103
  # Pact Broker basic auth password
104
- -k, [--broker-token=BROKER_TOKEN]
104
+ -k, [--broker-token=BROKER_TOKEN]
105
105
  # Pact Broker bearer token
106
- -v, [--verbose], [--no-verbose]
106
+ -v, [--verbose], [--no-verbose]
107
107
  # Verbose output. Default: false
108
- -o, [--output=OUTPUT]
108
+ -o, [--output=OUTPUT]
109
109
  # json or table
110
110
  # Default: table
111
111
  ```
@@ -121,31 +121,31 @@ Usage:
121
121
  pact-broker create-environment --name=NAME -b, --broker-base-url=BROKER_BASE_URL
122
122
 
123
123
  Options:
124
- --name=NAME
124
+ --name=NAME
125
125
  # The uniquely identifying name of the environment as used in
126
126
  deployment code
127
- [--display-name=DISPLAY_NAME]
127
+ [--display-name=DISPLAY_NAME]
128
128
  # The display name of the environment
129
- [--production], [--no-production]
129
+ [--production], [--no-production]
130
130
  # Whether or not this environment is a production environment.
131
131
  Default: false
132
- [--contact-name=CONTACT_NAME]
132
+ [--contact-name=CONTACT_NAME]
133
133
  # The name of the team/person responsible for this environment
134
- [--contact-email-address=CONTACT_EMAIL_ADDRESS]
134
+ [--contact-email-address=CONTACT_EMAIL_ADDRESS]
135
135
  # The email address of the team/person responsible for this
136
136
  environment
137
- -o, [--output=OUTPUT]
137
+ -o, [--output=OUTPUT]
138
138
  # json or text
139
139
  # Default: text
140
- -b, --broker-base-url=BROKER_BASE_URL
140
+ -b, --broker-base-url=BROKER_BASE_URL
141
141
  # The base URL of the Pact Broker
142
- -u, [--broker-username=BROKER_USERNAME]
142
+ -u, [--broker-username=BROKER_USERNAME]
143
143
  # Pact Broker basic auth username
144
- -p, [--broker-password=BROKER_PASSWORD]
144
+ -p, [--broker-password=BROKER_PASSWORD]
145
145
  # Pact Broker basic auth password
146
- -k, [--broker-token=BROKER_TOKEN]
146
+ -k, [--broker-token=BROKER_TOKEN]
147
147
  # Pact Broker bearer token
148
- -v, [--verbose], [--no-verbose]
148
+ -v, [--verbose], [--no-verbose]
149
149
  # Verbose output. Default: false
150
150
  ```
151
151
 
@@ -158,33 +158,33 @@ Usage:
158
158
  pact-broker update-environment --uuid=UUID -b, --broker-base-url=BROKER_BASE_URL
159
159
 
160
160
  Options:
161
- --uuid=UUID
161
+ --uuid=UUID
162
162
  # The UUID of the environment to update
163
- [--name=NAME]
163
+ [--name=NAME]
164
164
  # The uniquely identifying name of the environment as used in
165
165
  deployment code
166
- [--display-name=DISPLAY_NAME]
166
+ [--display-name=DISPLAY_NAME]
167
167
  # The display name of the environment
168
- [--production], [--no-production]
168
+ [--production], [--no-production]
169
169
  # Whether or not this environment is a production environment.
170
170
  Default: false
171
- [--contact-name=CONTACT_NAME]
171
+ [--contact-name=CONTACT_NAME]
172
172
  # The name of the team/person responsible for this environment
173
- [--contact-email-address=CONTACT_EMAIL_ADDRESS]
173
+ [--contact-email-address=CONTACT_EMAIL_ADDRESS]
174
174
  # The email address of the team/person responsible for this
175
175
  environment
176
- -o, [--output=OUTPUT]
176
+ -o, [--output=OUTPUT]
177
177
  # json or text
178
178
  # Default: text
179
- -b, --broker-base-url=BROKER_BASE_URL
179
+ -b, --broker-base-url=BROKER_BASE_URL
180
180
  # The base URL of the Pact Broker
181
- -u, [--broker-username=BROKER_USERNAME]
181
+ -u, [--broker-username=BROKER_USERNAME]
182
182
  # Pact Broker basic auth username
183
- -p, [--broker-password=BROKER_PASSWORD]
183
+ -p, [--broker-password=BROKER_PASSWORD]
184
184
  # Pact Broker basic auth password
185
- -k, [--broker-token=BROKER_TOKEN]
185
+ -k, [--broker-token=BROKER_TOKEN]
186
186
  # Pact Broker bearer token
187
- -v, [--verbose], [--no-verbose]
187
+ -v, [--verbose], [--no-verbose]
188
188
  # Verbose output. Default: false
189
189
  ```
190
190
 
@@ -197,20 +197,20 @@ Usage:
197
197
  pact-broker describe-environment --uuid=UUID -b, --broker-base-url=BROKER_BASE_URL
198
198
 
199
199
  Options:
200
- --uuid=UUID
200
+ --uuid=UUID
201
201
  # The UUID of the environment to describe
202
- -o, [--output=OUTPUT]
202
+ -o, [--output=OUTPUT]
203
203
  # json or text
204
204
  # Default: text
205
- -b, --broker-base-url=BROKER_BASE_URL
205
+ -b, --broker-base-url=BROKER_BASE_URL
206
206
  # The base URL of the Pact Broker
207
- -u, [--broker-username=BROKER_USERNAME]
207
+ -u, [--broker-username=BROKER_USERNAME]
208
208
  # Pact Broker basic auth username
209
- -p, [--broker-password=BROKER_PASSWORD]
209
+ -p, [--broker-password=BROKER_PASSWORD]
210
210
  # Pact Broker basic auth password
211
- -k, [--broker-token=BROKER_TOKEN]
211
+ -k, [--broker-token=BROKER_TOKEN]
212
212
  # Pact Broker bearer token
213
- -v, [--verbose], [--no-verbose]
213
+ -v, [--verbose], [--no-verbose]
214
214
  # Verbose output. Default: false
215
215
  ```
216
216
 
@@ -223,20 +223,20 @@ Usage:
223
223
  pact-broker delete-environment --uuid=UUID -b, --broker-base-url=BROKER_BASE_URL
224
224
 
225
225
  Options:
226
- --uuid=UUID
226
+ --uuid=UUID
227
227
  # The UUID of the environment to delete
228
- -o, [--output=OUTPUT]
228
+ -o, [--output=OUTPUT]
229
229
  # json or text
230
230
  # Default: text
231
- -b, --broker-base-url=BROKER_BASE_URL
231
+ -b, --broker-base-url=BROKER_BASE_URL
232
232
  # The base URL of the Pact Broker
233
- -u, [--broker-username=BROKER_USERNAME]
233
+ -u, [--broker-username=BROKER_USERNAME]
234
234
  # Pact Broker basic auth username
235
- -p, [--broker-password=BROKER_PASSWORD]
235
+ -p, [--broker-password=BROKER_PASSWORD]
236
236
  # Pact Broker basic auth password
237
- -k, [--broker-token=BROKER_TOKEN]
237
+ -k, [--broker-token=BROKER_TOKEN]
238
238
  # Pact Broker bearer token
239
- -v, [--verbose], [--no-verbose]
239
+ -v, [--verbose], [--no-verbose]
240
240
  # Verbose output. Default: false
241
241
  ```
242
242
 
@@ -249,18 +249,18 @@ Usage:
249
249
  pact-broker list-environments -b, --broker-base-url=BROKER_BASE_URL
250
250
 
251
251
  Options:
252
- -o, [--output=OUTPUT]
252
+ -o, [--output=OUTPUT]
253
253
  # json or text
254
254
  # Default: text
255
- -b, --broker-base-url=BROKER_BASE_URL
255
+ -b, --broker-base-url=BROKER_BASE_URL
256
256
  # The base URL of the Pact Broker
257
- -u, [--broker-username=BROKER_USERNAME]
257
+ -u, [--broker-username=BROKER_USERNAME]
258
258
  # Pact Broker basic auth username
259
- -p, [--broker-password=BROKER_PASSWORD]
259
+ -p, [--broker-password=BROKER_PASSWORD]
260
260
  # Pact Broker basic auth password
261
- -k, [--broker-token=BROKER_TOKEN]
261
+ -k, [--broker-token=BROKER_TOKEN]
262
262
  # Pact Broker bearer token
263
- -v, [--verbose], [--no-verbose]
263
+ -v, [--verbose], [--no-verbose]
264
264
  # Verbose output. Default: false
265
265
  ```
266
266
 
@@ -275,33 +275,33 @@ Usage:
275
275
  pact-broker record-deployment --environment=ENVIRONMENT -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL -e, --version=VERSION
276
276
 
277
277
  Options:
278
- -a, --pacticipant=PACTICIPANT
278
+ -a, --pacticipant=PACTICIPANT
279
279
  # The name of the pacticipant that was deployed.
280
- -e, --version=VERSION
280
+ -e, --version=VERSION
281
281
  # The pacticipant version number that was deployed.
282
- --environment=ENVIRONMENT
282
+ --environment=ENVIRONMENT
283
283
  # The name of the environment that the pacticipant version was
284
284
  deployed to.
285
- [--application-instance=APPLICATION_INSTANCE]
285
+ [--application-instance=APPLICATION_INSTANCE]
286
286
  # Optional. The application instance to which the deployment has
287
287
  occurred - a logical identifer required to differentiate
288
288
  deployments when there are multiple instances of the same
289
289
  application in an environment. This field was called 'target'
290
290
  in a beta release.
291
- [--target=TARGET]
291
+ [--target=TARGET]
292
292
  # Renamed to application_instance
293
- -o, [--output=OUTPUT]
293
+ -o, [--output=OUTPUT]
294
294
  # json or text
295
295
  # Default: text
296
- -b, --broker-base-url=BROKER_BASE_URL
296
+ -b, --broker-base-url=BROKER_BASE_URL
297
297
  # The base URL of the Pact Broker
298
- -u, [--broker-username=BROKER_USERNAME]
298
+ -u, [--broker-username=BROKER_USERNAME]
299
299
  # Pact Broker basic auth username
300
- -p, [--broker-password=BROKER_PASSWORD]
300
+ -p, [--broker-password=BROKER_PASSWORD]
301
301
  # Pact Broker basic auth password
302
- -k, [--broker-token=BROKER_TOKEN]
302
+ -k, [--broker-token=BROKER_TOKEN]
303
303
  # Pact Broker bearer token
304
- -v, [--verbose], [--no-verbose]
304
+ -v, [--verbose], [--no-verbose]
305
305
  # Verbose output. Default: false
306
306
  ```
307
307
 
@@ -314,34 +314,34 @@ Usage:
314
314
  pact-broker record-undeployment --environment=ENVIRONMENT -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL
315
315
 
316
316
  Options:
317
- -a, --pacticipant=PACTICIPANT
317
+ -a, --pacticipant=PACTICIPANT
318
318
  # The name of the pacticipant that was undeployed.
319
- --environment=ENVIRONMENT
319
+ --environment=ENVIRONMENT
320
320
  # The name of the environment that the pacticipant version was
321
321
  undeployed from.
322
- [--application-instance=APPLICATION_INSTANCE]
322
+ [--application-instance=APPLICATION_INSTANCE]
323
323
  # Optional. The application instance from which the application
324
324
  is being undeployed - a logical identifer required to
325
325
  differentiate deployments when there are multiple instances of
326
326
  the same application in an environment. This field was called
327
327
  'target' in a beta release.
328
- [--target=TARGET]
328
+ [--target=TARGET]
329
329
  # Optional. The target that the application is being undeployed
330
330
  from - a logical identifer required to differentiate
331
331
  deployments when there are multiple instances of the same
332
332
  application in an environment.
333
- -o, [--output=OUTPUT]
333
+ -o, [--output=OUTPUT]
334
334
  # json or text
335
335
  # Default: text
336
- -b, --broker-base-url=BROKER_BASE_URL
336
+ -b, --broker-base-url=BROKER_BASE_URL
337
337
  # The base URL of the Pact Broker
338
- -u, [--broker-username=BROKER_USERNAME]
338
+ -u, [--broker-username=BROKER_USERNAME]
339
339
  # Pact Broker basic auth username
340
- -p, [--broker-password=BROKER_PASSWORD]
340
+ -p, [--broker-password=BROKER_PASSWORD]
341
341
  # Pact Broker basic auth password
342
- -k, [--broker-token=BROKER_TOKEN]
342
+ -k, [--broker-token=BROKER_TOKEN]
343
343
  # Pact Broker bearer token
344
- -v, [--verbose], [--no-verbose]
344
+ -v, [--verbose], [--no-verbose]
345
345
  # Verbose output. Default: false
346
346
  ```
347
347
 
@@ -359,25 +359,25 @@ Usage:
359
359
  pact-broker record-release --environment=ENVIRONMENT -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL -e, --version=VERSION
360
360
 
361
361
  Options:
362
- -a, --pacticipant=PACTICIPANT
362
+ -a, --pacticipant=PACTICIPANT
363
363
  # The name of the pacticipant that was released.
364
- -e, --version=VERSION
364
+ -e, --version=VERSION
365
365
  # The pacticipant version number that was released.
366
- --environment=ENVIRONMENT
366
+ --environment=ENVIRONMENT
367
367
  # The name of the environment that the pacticipant version was
368
368
  released to.
369
- -o, [--output=OUTPUT]
369
+ -o, [--output=OUTPUT]
370
370
  # json or text
371
371
  # Default: text
372
- -b, --broker-base-url=BROKER_BASE_URL
372
+ -b, --broker-base-url=BROKER_BASE_URL
373
373
  # The base URL of the Pact Broker
374
- -u, [--broker-username=BROKER_USERNAME]
374
+ -u, [--broker-username=BROKER_USERNAME]
375
375
  # Pact Broker basic auth username
376
- -p, [--broker-password=BROKER_PASSWORD]
376
+ -p, [--broker-password=BROKER_PASSWORD]
377
377
  # Pact Broker basic auth password
378
- -k, [--broker-token=BROKER_TOKEN]
378
+ -k, [--broker-token=BROKER_TOKEN]
379
379
  # Pact Broker bearer token
380
- -v, [--verbose], [--no-verbose]
380
+ -v, [--verbose], [--no-verbose]
381
381
  # Verbose output. Default: false
382
382
  ```
383
383
 
@@ -390,24 +390,24 @@ Usage:
390
390
  pact-broker record-support-ended --environment=ENVIRONMENT -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL -e, --version=VERSION
391
391
 
392
392
  Options:
393
- -a, --pacticipant=PACTICIPANT
393
+ -a, --pacticipant=PACTICIPANT
394
394
  # The name of the pacticipant.
395
- -e, --version=VERSION
395
+ -e, --version=VERSION
396
396
  # The pacticipant version number for which support is ended.
397
- --environment=ENVIRONMENT
397
+ --environment=ENVIRONMENT
398
398
  # The name of the environment in which the support is ended.
399
- -o, [--output=OUTPUT]
399
+ -o, [--output=OUTPUT]
400
400
  # json or text
401
401
  # Default: text
402
- -b, --broker-base-url=BROKER_BASE_URL
402
+ -b, --broker-base-url=BROKER_BASE_URL
403
403
  # The base URL of the Pact Broker
404
- -u, [--broker-username=BROKER_USERNAME]
404
+ -u, [--broker-username=BROKER_USERNAME]
405
405
  # Pact Broker basic auth username
406
- -p, [--broker-password=BROKER_PASSWORD]
406
+ -p, [--broker-password=BROKER_PASSWORD]
407
407
  # Pact Broker basic auth password
408
- -k, [--broker-token=BROKER_TOKEN]
408
+ -k, [--broker-token=BROKER_TOKEN]
409
409
  # Pact Broker bearer token
410
- -v, [--verbose], [--no-verbose]
410
+ -v, [--verbose], [--no-verbose]
411
411
  # Verbose output. Default: false
412
412
  ```
413
413
 
@@ -422,51 +422,54 @@ Usage:
422
422
  pact-broker can-i-deploy -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL
423
423
 
424
424
  Options:
425
- -a, --pacticipant=PACTICIPANT
425
+ -a, --pacticipant=PACTICIPANT
426
426
  # The pacticipant name. Use once for each pacticipant being
427
427
  checked.
428
- -e, [--version=VERSION]
428
+ -e, [--version=VERSION]
429
429
  # The pacticipant version. Must be entered after the
430
430
  --pacticipant that it relates to.
431
- [--ignore=IGNORE]
431
+ [--ignore=IGNORE]
432
432
  # The pacticipant name to ignore. Use once for each pacticipant
433
433
  being ignored. A specific version can be ignored by also
434
434
  specifying a --version after the pacticipant name option.
435
- -l, [--latest=[TAG]]
435
+ -l, [--latest=[TAG]]
436
436
  # Use the latest pacticipant version. Optionally specify a TAG
437
437
  to use the latest version with the specified tag.
438
- [--to-environment=ENVIRONMENT]
438
+ [--to-environment=ENVIRONMENT]
439
439
  # The environment into which the pacticipant(s) are to be
440
440
  deployed
441
- [--to=TAG]
441
+ [--branch=BRANCH]
442
+ # The branch of the version for which you want to check the
443
+ verification results
444
+ [--to=TAG]
442
445
  # The tag that represents the branch or environment of the
443
446
  integrated applications for which you want to check the
444
447
  verification result status.
445
- -o, [--output=OUTPUT]
448
+ -o, [--output=OUTPUT]
446
449
  # json or table
447
450
  # Default: table
448
- [--retry-while-unknown=TIMES]
451
+ [--retry-while-unknown=TIMES]
449
452
  # The number of times to retry while there is an unknown
450
453
  verification result (ie. the provider verification is likely
451
454
  still running)
452
455
  # Default: 0
453
- [--retry-interval=SECONDS]
456
+ [--retry-interval=SECONDS]
454
457
  # The time between retries in seconds. Use in conjuction with
455
458
  --retry-while-unknown
456
459
  # Default: 10
457
- [--dry-run], [--no-dry-run]
460
+ [--dry-run], [--no-dry-run]
458
461
  # When dry-run is enabled, always exit process with a success
459
462
  code. Can also be enabled by setting the environment variable
460
463
  PACT_BROKER_CAN_I_DEPLOY_DRY_RUN=true.
461
- -b, --broker-base-url=BROKER_BASE_URL
464
+ -b, --broker-base-url=BROKER_BASE_URL
462
465
  # The base URL of the Pact Broker
463
- -u, [--broker-username=BROKER_USERNAME]
466
+ -u, [--broker-username=BROKER_USERNAME]
464
467
  # Pact Broker basic auth username
465
- -p, [--broker-password=BROKER_PASSWORD]
468
+ -p, [--broker-password=BROKER_PASSWORD]
466
469
  # Pact Broker basic auth password
467
- -k, [--broker-token=BROKER_TOKEN]
470
+ -k, [--broker-token=BROKER_TOKEN]
468
471
  # Pact Broker bearer token
469
- -v, [--verbose], [--no-verbose]
472
+ -v, [--verbose], [--no-verbose]
470
473
  # Verbose output. Default: false
471
474
  ```
472
475
 
@@ -513,26 +516,26 @@ Usage:
513
516
  pact-broker create-or-update-pacticipant --name=NAME -b, --broker-base-url=BROKER_BASE_URL
514
517
 
515
518
  Options:
516
- --name=NAME
519
+ --name=NAME
517
520
  # Pacticipant name
518
- [--display-name=DISPLAY_NAME]
521
+ [--display-name=DISPLAY_NAME]
519
522
  # Display name
520
- [--main-branch=MAIN_BRANCH]
523
+ [--main-branch=MAIN_BRANCH]
521
524
  # The main development branch of the pacticipant repository
522
- [--repository-url=REPOSITORY_URL]
525
+ [--repository-url=REPOSITORY_URL]
523
526
  # The repository URL of the pacticipant
524
- -o, [--output=OUTPUT]
527
+ -o, [--output=OUTPUT]
525
528
  # json or text
526
529
  # Default: text
527
- -b, --broker-base-url=BROKER_BASE_URL
530
+ -b, --broker-base-url=BROKER_BASE_URL
528
531
  # The base URL of the Pact Broker
529
- -u, [--broker-username=BROKER_USERNAME]
532
+ -u, [--broker-username=BROKER_USERNAME]
530
533
  # Pact Broker basic auth username
531
- -p, [--broker-password=BROKER_PASSWORD]
534
+ -p, [--broker-password=BROKER_PASSWORD]
532
535
  # Pact Broker basic auth password
533
- -k, [--broker-token=BROKER_TOKEN]
536
+ -k, [--broker-token=BROKER_TOKEN]
534
537
  # Pact Broker bearer token
535
- -v, [--verbose], [--no-verbose]
538
+ -v, [--verbose], [--no-verbose]
536
539
  # Verbose output. Default: false
537
540
  ```
538
541
 
@@ -545,20 +548,20 @@ Usage:
545
548
  pact-broker describe-pacticipant --name=NAME -b, --broker-base-url=BROKER_BASE_URL
546
549
 
547
550
  Options:
548
- --name=NAME
551
+ --name=NAME
549
552
  # Pacticipant name
550
- -o, [--output=OUTPUT]
553
+ -o, [--output=OUTPUT]
551
554
  # json or text
552
555
  # Default: text
553
- -b, --broker-base-url=BROKER_BASE_URL
556
+ -b, --broker-base-url=BROKER_BASE_URL
554
557
  # The base URL of the Pact Broker
555
- -u, [--broker-username=BROKER_USERNAME]
558
+ -u, [--broker-username=BROKER_USERNAME]
556
559
  # Pact Broker basic auth username
557
- -p, [--broker-password=BROKER_PASSWORD]
560
+ -p, [--broker-password=BROKER_PASSWORD]
558
561
  # Pact Broker basic auth password
559
- -k, [--broker-token=BROKER_TOKEN]
562
+ -k, [--broker-token=BROKER_TOKEN]
560
563
  # Pact Broker bearer token
561
- -v, [--verbose], [--no-verbose]
564
+ -v, [--verbose], [--no-verbose]
562
565
  # Verbose output. Default: false
563
566
  ```
564
567
 
@@ -571,18 +574,18 @@ Usage:
571
574
  pact-broker list-pacticipants -b, --broker-base-url=BROKER_BASE_URL
572
575
 
573
576
  Options:
574
- -o, [--output=OUTPUT]
577
+ -o, [--output=OUTPUT]
575
578
  # json or text
576
579
  # Default: text
577
- -b, --broker-base-url=BROKER_BASE_URL
580
+ -b, --broker-base-url=BROKER_BASE_URL
578
581
  # The base URL of the Pact Broker
579
- -u, [--broker-username=BROKER_USERNAME]
582
+ -u, [--broker-username=BROKER_USERNAME]
580
583
  # Pact Broker basic auth username
581
- -p, [--broker-password=BROKER_PASSWORD]
584
+ -p, [--broker-password=BROKER_PASSWORD]
582
585
  # Pact Broker basic auth password
583
- -k, [--broker-token=BROKER_TOKEN]
586
+ -k, [--broker-token=BROKER_TOKEN]
584
587
  # Pact Broker bearer token
585
- -v, [--verbose], [--no-verbose]
588
+ -v, [--verbose], [--no-verbose]
586
589
  # Verbose output. Default: false
587
590
  ```
588
591
 
@@ -597,49 +600,52 @@ Usage:
597
600
  pact-broker create-webhook URL -X, --request=METHOD -b, --broker-base-url=BROKER_BASE_URL
598
601
 
599
602
  Options:
600
- -X, --request=METHOD
603
+ -X, --request=METHOD
601
604
  # Webhook HTTP method
602
- -H, [--header=one two three]
605
+ -H, [--header=one two three]
603
606
  # Webhook Header
604
- -d, [--data=DATA]
607
+ -d, [--data=DATA]
605
608
  # Webhook payload (file or string)
606
- -u, [--user=USER]
609
+ -u, [--user=USER]
607
610
  # Webhook basic auth username and password eg. username:password
608
- [--consumer=CONSUMER]
611
+ [--consumer=CONSUMER]
609
612
  # Consumer name
610
- [--consumer-label=CONSUMER_LABEL]
611
- # Consumer label
612
- [--provider=PROVIDER]
613
+ [--consumer-label=CONSUMER_LABEL]
614
+ # Consumer label, mutually exclusive with consumer name
615
+ [--provider=PROVIDER]
613
616
  # Provider name
614
- [--provider-label=PROVIDER_LABEL]
615
- # Provider label
616
- [--description=DESCRIPTION]
617
+ [--provider-label=PROVIDER_LABEL]
618
+ # Provider label, mutually exclusive with provider name
619
+ [--description=DESCRIPTION]
617
620
  # Webhook description
618
- [--contract-content-changed], [--no-contract-content-changed]
621
+ [--contract-content-changed], [--no-contract-content-changed]
619
622
  # Trigger this webhook when the pact content changes
620
- [--contract-published], [--no-contract-published]
623
+ [--contract-published], [--no-contract-published]
621
624
  # Trigger this webhook when a pact is published
622
- [--provider-verification-published], [--no-provider-verification-published]
625
+ [--provider-verification-published], [--no-provider-verification-published]
623
626
  # Trigger this webhook when a provider verification result is
624
627
  published
625
- [--provider-verification-failed], [--no-provider-verification-failed]
628
+ [--provider-verification-failed], [--no-provider-verification-failed]
626
629
  # Trigger this webhook when a failed provider verification
627
630
  result is published
628
- [--provider-verification-succeeded], [--no-provider-verification-succeeded]
631
+ [--provider-verification-succeeded], [--no-provider-verification-succeeded]
629
632
  # Trigger this webhook when a successful provider verification
630
633
  result is published
631
- [--team-uuid=UUID]
634
+ [--contract-requiring-verification-published], [--no-contract-requiring-verification-published]
635
+ # Trigger this webhook when a contract is published that
636
+ requires verification
637
+ [--team-uuid=UUID]
632
638
  # UUID of the Pactflow team to which the webhook should be
633
639
  assigned (Pactflow only)
634
- -b, --broker-base-url=BROKER_BASE_URL
640
+ -b, --broker-base-url=BROKER_BASE_URL
635
641
  # The base URL of the Pact Broker
636
- -u, [--broker-username=BROKER_USERNAME]
642
+ -u, [--broker-username=BROKER_USERNAME]
637
643
  # Pact Broker basic auth username
638
- -p, [--broker-password=BROKER_PASSWORD]
644
+ -p, [--broker-password=BROKER_PASSWORD]
639
645
  # Pact Broker basic auth password
640
- -k, [--broker-token=BROKER_TOKEN]
646
+ -k, [--broker-token=BROKER_TOKEN]
641
647
  # Pact Broker bearer token
642
- -v, [--verbose], [--no-verbose]
648
+ -v, [--verbose], [--no-verbose]
643
649
  # Verbose output. Default: false
644
650
  ```
645
651
 
@@ -657,51 +663,54 @@ Usage:
657
663
  pact-broker create-or-update-webhook URL --uuid=UUID -X, --request=METHOD -b, --broker-base-url=BROKER_BASE_URL
658
664
 
659
665
  Options:
660
- -X, --request=METHOD
666
+ -X, --request=METHOD
661
667
  # Webhook HTTP method
662
- -H, [--header=one two three]
668
+ -H, [--header=one two three]
663
669
  # Webhook Header
664
- -d, [--data=DATA]
670
+ -d, [--data=DATA]
665
671
  # Webhook payload (file or string)
666
- -u, [--user=USER]
672
+ -u, [--user=USER]
667
673
  # Webhook basic auth username and password eg. username:password
668
- [--consumer=CONSUMER]
674
+ [--consumer=CONSUMER]
669
675
  # Consumer name
670
- [--consumer-label=CONSUMER_LABEL]
671
- # Consumer label
672
- [--provider=PROVIDER]
676
+ [--consumer-label=CONSUMER_LABEL]
677
+ # Consumer label, mutually exclusive with consumer name
678
+ [--provider=PROVIDER]
673
679
  # Provider name
674
- [--provider-label=PROVIDER_LABEL]
675
- # Provider label
676
- [--description=DESCRIPTION]
680
+ [--provider-label=PROVIDER_LABEL]
681
+ # Provider label, mutually exclusive with provider name
682
+ [--description=DESCRIPTION]
677
683
  # Webhook description
678
- [--contract-content-changed], [--no-contract-content-changed]
684
+ [--contract-content-changed], [--no-contract-content-changed]
679
685
  # Trigger this webhook when the pact content changes
680
- [--contract-published], [--no-contract-published]
686
+ [--contract-published], [--no-contract-published]
681
687
  # Trigger this webhook when a pact is published
682
- [--provider-verification-published], [--no-provider-verification-published]
688
+ [--provider-verification-published], [--no-provider-verification-published]
683
689
  # Trigger this webhook when a provider verification result is
684
690
  published
685
- [--provider-verification-failed], [--no-provider-verification-failed]
691
+ [--provider-verification-failed], [--no-provider-verification-failed]
686
692
  # Trigger this webhook when a failed provider verification
687
693
  result is published
688
- [--provider-verification-succeeded], [--no-provider-verification-succeeded]
694
+ [--provider-verification-succeeded], [--no-provider-verification-succeeded]
689
695
  # Trigger this webhook when a successful provider verification
690
696
  result is published
691
- [--team-uuid=UUID]
697
+ [--contract-requiring-verification-published], [--no-contract-requiring-verification-published]
698
+ # Trigger this webhook when a contract is published that
699
+ requires verification
700
+ [--team-uuid=UUID]
692
701
  # UUID of the Pactflow team to which the webhook should be
693
702
  assigned (Pactflow only)
694
- -b, --broker-base-url=BROKER_BASE_URL
703
+ -b, --broker-base-url=BROKER_BASE_URL
695
704
  # The base URL of the Pact Broker
696
- -u, [--broker-username=BROKER_USERNAME]
705
+ -u, [--broker-username=BROKER_USERNAME]
697
706
  # Pact Broker basic auth username
698
- -p, [--broker-password=BROKER_PASSWORD]
707
+ -p, [--broker-password=BROKER_PASSWORD]
699
708
  # Pact Broker basic auth password
700
- -k, [--broker-token=BROKER_TOKEN]
709
+ -k, [--broker-token=BROKER_TOKEN]
701
710
  # Pact Broker bearer token
702
- -v, [--verbose], [--no-verbose]
711
+ -v, [--verbose], [--no-verbose]
703
712
  # Verbose output. Default: false
704
- --uuid=UUID
713
+ --uuid=UUID
705
714
  # Specify the uuid for the webhook
706
715
  ```
707
716
 
@@ -720,17 +729,17 @@ Usage:
720
729
  pact-broker test-webhook --uuid=UUID -b, --broker-base-url=BROKER_BASE_URL
721
730
 
722
731
  Options:
723
- --uuid=UUID
732
+ --uuid=UUID
724
733
  # Specify the uuid for the webhook
725
- -b, --broker-base-url=BROKER_BASE_URL
734
+ -b, --broker-base-url=BROKER_BASE_URL
726
735
  # The base URL of the Pact Broker
727
- -u, [--broker-username=BROKER_USERNAME]
736
+ -u, [--broker-username=BROKER_USERNAME]
728
737
  # Pact Broker basic auth username
729
- -p, [--broker-password=BROKER_PASSWORD]
738
+ -p, [--broker-password=BROKER_PASSWORD]
730
739
  # Pact Broker basic auth password
731
- -k, [--broker-token=BROKER_TOKEN]
740
+ -k, [--broker-token=BROKER_TOKEN]
732
741
  # Pact Broker bearer token
733
- -v, [--verbose], [--no-verbose]
742
+ -v, [--verbose], [--no-verbose]
734
743
  # Verbose output. Default: false
735
744
  ```
736
745
 
@@ -745,28 +754,28 @@ Usage:
745
754
  pact-broker create-version-tag -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL -e, --version=VERSION
746
755
 
747
756
  Options:
748
- -a, --pacticipant=PACTICIPANT
757
+ -a, --pacticipant=PACTICIPANT
749
758
  # The pacticipant name
750
- -e, --version=VERSION
759
+ -e, --version=VERSION
751
760
  # The pacticipant version
752
- -t, [--tag=TAG]
761
+ -t, [--tag=TAG]
753
762
  # Tag name for pacticipant version. Can be specified multiple
754
763
  times.
755
- [--auto-create-version], [--no-auto-create-version]
764
+ [--auto-create-version], [--no-auto-create-version]
756
765
  # Automatically create the pacticipant version if it does not
757
766
  exist. Default: false
758
- -g, [--tag-with-git-branch], [--no-tag-with-git-branch]
767
+ -g, [--tag-with-git-branch], [--no-tag-with-git-branch]
759
768
  # Tag pacticipant version with the name of the current git
760
769
  branch. Default: false
761
- -b, --broker-base-url=BROKER_BASE_URL
770
+ -b, --broker-base-url=BROKER_BASE_URL
762
771
  # The base URL of the Pact Broker
763
- -u, [--broker-username=BROKER_USERNAME]
772
+ -u, [--broker-username=BROKER_USERNAME]
764
773
  # Pact Broker basic auth username
765
- -p, [--broker-password=BROKER_PASSWORD]
774
+ -p, [--broker-password=BROKER_PASSWORD]
766
775
  # Pact Broker basic auth password
767
- -k, [--broker-token=BROKER_TOKEN]
776
+ -k, [--broker-token=BROKER_TOKEN]
768
777
  # Pact Broker bearer token
769
- -v, [--verbose], [--no-verbose]
778
+ -v, [--verbose], [--no-verbose]
770
779
  # Verbose output. Default: false
771
780
  ```
772
781
 
@@ -781,25 +790,25 @@ Usage:
781
790
  pact-broker describe-version -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL
782
791
 
783
792
  Options:
784
- -a, --pacticipant=PACTICIPANT
793
+ -a, --pacticipant=PACTICIPANT
785
794
  # The name of the pacticipant that the version belongs to.
786
- -e, [--version=VERSION]
795
+ -e, [--version=VERSION]
787
796
  # The pacticipant version number.
788
- -l, [--latest=[TAG]]
797
+ -l, [--latest=[TAG]]
789
798
  # Describe the latest pacticipant version. Optionally specify a
790
799
  TAG to describe the latest version with the specified tag.
791
- -o, [--output=OUTPUT]
800
+ -o, [--output=OUTPUT]
792
801
  # json or table or id
793
802
  # Default: table
794
- -b, --broker-base-url=BROKER_BASE_URL
803
+ -b, --broker-base-url=BROKER_BASE_URL
795
804
  # The base URL of the Pact Broker
796
- -u, [--broker-username=BROKER_USERNAME]
805
+ -u, [--broker-username=BROKER_USERNAME]
797
806
  # Pact Broker basic auth username
798
- -p, [--broker-password=BROKER_PASSWORD]
807
+ -p, [--broker-password=BROKER_PASSWORD]
799
808
  # Pact Broker basic auth password
800
- -k, [--broker-token=BROKER_TOKEN]
809
+ -k, [--broker-token=BROKER_TOKEN]
801
810
  # Pact Broker bearer token
802
- -v, [--verbose], [--no-verbose]
811
+ -v, [--verbose], [--no-verbose]
803
812
  # Verbose output. Default: false
804
813
  ```
805
814
 
@@ -837,11 +846,13 @@ require 'pact_broker/client/tasks'
837
846
 
838
847
  PactBroker::Client::PublicationTask.new do | task |
839
848
  require 'my_consumer/version'
840
- task.consumer_version = MyConsumer::VERSION
849
+ task.consumer_version = ENV["GIT_COMMIT"]
841
850
  task.pattern = 'custom/path/to/pacts/*.json' # optional, default value is 'spec/pacts/*.json'
842
851
  task.pact_broker_base_url = "http://pact-broker"
843
- task.tag_with_git_branch = true|false # Optional but STRONGLY RECOMMENDED as it will greatly assist with your pact workflow. Result will be merged with other specified task.tags
852
+ task.branch = ENV["GIT_BRANCH"] # Optional but STRONGLY RECOMMENDED.
853
+ task.tag_with_git_branch = true|false # Superseeded by the `branch` property
844
854
  task.tags = ["dev"] # optional
855
+ task.build_url = ENV["CI_BUILD_URL"]
845
856
  task.pact_broker_basic_auth = { username: 'basic_auth_user', password: 'basic_auth_pass'} # optional
846
857
  task.pact_broker_token = "1234abcd" # Bearer token
847
858
  task.write_method = :merge # optional, this will merge the published pact into an existing pact rather than overwriting it if one exists. Not recommended, as it makes a mulch of the workflow on the broker.