diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 74b9f6d6..4fd2d421 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -41,6 +41,7 @@ jobs:
matrix:
os: ["windows-latest","ubuntu-latest","macos-latest"]
shell: ["sh","bash"]
+ pact_cli_legacy: ["", "1"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
@@ -48,3 +49,5 @@ jobs:
uses: actions/download-artifact@v4
- name: test ${{ matrix.os }} package
run: ./script/unpack-and-test.sh
+ env:
+ PACT_CLI_LEGACY: ${{ matrix.pact_cli_legacy }}
diff --git a/README.md b/README.md
index a02ff41c..ddf9e936 100644
--- a/README.md
+++ b/README.md
@@ -4,57 +4,62 @@
Creates a standalone pact command line executable containing
-- The rust pact implementation via cargo executables
+- The rust pact implementation via a single executable
- The ruby pact implementation via Traveling Ruby
## Package contents
This version (2.5.5) of the Pact standalone executables package contains:
+ * [pact-cli](https://github.com/you54f/pact-cli)
+ * [pact-broker-cli](https://github.com/pact-foundation/pact-broker-cli)
+ * [pact-plugin-cli](https://github.com/pact-foundation/pact-plugins/tree/main/cli)
+ * [pact_mock_server_cli](https://github.com/pact-foundation/pact-core-mock-server/tree/main/pact_mock_server_cli)
+ * [pact_verifier_cli](https://github.com/pact-foundation/pact-reference/tree/master/rust/pact_verifier_cli)
+ * [pact-stub-server](https://github.com/pact-foundation/pact-stub-server)
* pact gem 1.67.2
* pact-mock_service gem 3.12.3
* pact-support gem 1.21.2
* pact-provider-verifier gem 1.39.1
* pact_broker-client gem 1.77.0
* pact-message gem 0.11.1
- * [pact_mock_server_cli](https://github.com/pact-foundation/pact-core-mock-server/tree/main/pact_mock_server_cli)
- * [pact-stub-server](https://github.com/pact-foundation/pact-stub-server)
- * [pact_verifier_cli](https://github.com/pact-foundation/pact-reference/tree/master/rust/pact_verifier_cli)
- * [pact-plugin-cli](https://github.com/pact-foundation/pact-plugins/tree/main/cli)
Binaries will be extracted into `pact/bin`:
```
./pact/bin/
-├── pact (central entry point to all binaries)
-├── pact-broker
-├── pactflow
-├── pact_mock_server_cli
-├── pact-stub-server
-├── pact_verifier_cli
-├── pact-plugin-cli
-├── pact-message (legacy)
-├── pact-mock-service (legacy)
-├── pact-provider-verifier (legacy)
-└── pact-stub-service (legacy)
+├── pact
+├── pact-broker (legacy) - use `pact broker`
+├── pactflow (legacy) - use `pact pactflow`
+├── pact-message (legacy) - use `pact mock` (consumer) / `pact verifier` (provider)
+├── pact-mock-service (legacy) - use `pact mock`
+├── pact-provider-verifier (legacy) - use `pact verifier`
+└── pact-stub-service (legacy) - use `pact stub`
```
-### Windows Users
+Note: from `v2.6.0+`, the legacy commands will redirect to the new cli executables built in rust.
-Please append `.bat` to any of the provided ruby-based binaries
+Existing behaviour can be preserved by setting the `PACT_CLI_LEGACY` environment variable.
-eg.
+In `v3.0.0`, the ruby runtime will be removed completely, and all commands will link to the rust executables.
-```ps1
- .\pact\bin\pact-broker.bat
-```
+Longer term, this package is likely to be deprecated, replaced with a single `pact` cli executable.
-Please append `.exe` to any of the provided rust based binaries
+### Windows Users
+
+Please append `.bat` to any of the provided ruby-based binaries
eg.
+├── pact-broker (legacy)
+├── pactflow (legacy)
+├── pact-message (legacy)
+├── pact-mock-service (legacy)
+├── pact-provider-verifier (legacy)
+└── pact-stub-service
+
```ps1
- .\pact\bin\pact_mock_server_cli.exe
+ .\pact\bin\pact-broker.bat
```
## Installation
@@ -75,51 +80,62 @@ Ruby is not required on the host platform, Ruby 3.3.9 is provided in the distrib
| Linux | 3.3.9 | aarch64 (arm64)| ✅ |
| Windows| 3.3.9 | x86_64 | ✅ |
| Windows| 3.3.9 | aarch64 (arm64)| 🚧 |
+| Windows| N/A. | aarch64 (arm64)| ✅ |
🚧 - Tested under emulation mode x86_64 in Windows on ARM
+Windows-arm64 package supports rust based executables only and does not provide an arm64 runtime currently.
+
+To use ruby packages on windows on arm, please use the x86_64 package.
+
## Usage
### pact-mock-service
```
-Commands:
- pact-mock-service control # Run a Pact mock service control s...
- pact-mock-service control-restart # Start a Pact mock service control...
- pact-mock-service control-start # Start a Pact mock service control...
- pact-mock-service control-stop # Stop a Pact mock service control ...
- pact-mock-service help [COMMAND] # Describe available commands or on...
- pact-mock-service restart # Start or restart a mock service. ...
- pact-mock-service service # Start a mock service. If the cons...
- pact-mock-service start # Start a mock service. If the cons...
- pact-mock-service stop -p, --port=PORT # Stop a Pact mock service
- pact-mock-service version # Show the pact-mock-service gem version
+Standalone Pact mock server
-Usage:
- pact-mock-service service
+Usage: pact mock [OPTIONS] [COMMAND]
+
+Commands:
+ start Starts the master mock server
+ list Lists all the running mock servers
+ create Creates a new mock server from a pact file
+ verify Verify the mock server by id or port number, and generate a pact file if all ok
+ shutdown Shutdown the mock server by id or port number, releasing all its resources
+ shutdown-master Performs a graceful shutdown of the master server (displayed when it started)
+ help Print this message or the help of the given subcommand(s)
Options:
- [--consumer=CONSUMER] # Consumer name
- [--provider=PROVIDER] # Provider name
- -p, [--port=PORT] # Port on which to run the service
- -h, [--host=HOST] # Host on which to bind the service
- # Default: localhost
- -d, [--pact-dir=PACT_DIR] # Directory to which the pacts will be written
- -m, [--pact-file-write-mode=PACT_FILE_WRITE_MODE] # `overwrite` or `merge`. Use `merge` when running multiple mock service instances in parallel for the same consumer/provider pair. Ensure the pact file is deleted before running tests when using this option so that interactions deleted from the code are not maintained in the file.
- # Default: overwrite
- -i, [--pact-specification-version=PACT_SPECIFICATION_VERSION] # The pact specification version to use when writing the pact. Note that only versions 1 and 2 are currently supported.
- # Default: 2
- -l, [--log=LOG] # File to which to log output
- [--log-level=LOG_LEVEL] # Log level. Options are DEBUG INFO WARN ERROR
- # Default: DEBUG
- -o, [--cors=CORS] # Support browser security in tests by responding to OPTIONS requests and adding CORS headers to mocked responses
- [--ssl], [--no-ssl], [--skip-ssl] # Use a self-signed SSL cert to run the service over HTTPS
- # Default: false
- [--sslcert=SSLCERT] # Specify the path to the SSL cert to use when running the service over HTTPS
- [--sslkey=SSLKEY] # Specify the path to the SSL key to use when running the service over HTTPS
-
-Start a mock service. If the consumer, provider and pact-dir options are provided, the pact will be written automatically on shutdown (INT).
+ --enable-otel
+ Enable OpenTelemetry tracing
+ --help
+ Print help and exit
+ --enable-otel-logs
+ Enable OpenTelemetry logging
+ -v, --version
+ Print version information and exit
+ --enable-otel-traces
+ Enable OpenTelemetry traces
+ -p, --port
+ port the master mock server runs on (defaults to 8080)
+ -h, --host
+ hostname the master mock server runs on (defaults to localhost)
+ --otel-exporter
+ The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
+ -l, --loglevel
+ Log level for mock servers to write to the log file (defaults to info) [possible values: error, warn, info, debug, trace, none]
+ --otel-exporter-endpoint
+ The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
+ --no-term-log
+ Turns off using terminal ANSI escape codes
+ --otel-exporter-protocol
+ The protocol to use for the OTLP exporter (http/protobuf, http) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf]
+ --no-file-log
+ Do not log to an output file
+ --log-level
+ Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]
```
@@ -127,108 +143,185 @@ Start a mock service. If the consumer, provider and pact-dir options are provide
### pact-stub-service
```
-Usage:
- pact-stub-service PACT_URI ...
+Pact Stub Server 0.6.3
+
+Usage: pact stub [OPTIONS]
Options:
- -p, [--port=PORT] # Port on which to run the service
- -h, [--host=HOST] # Host on which to bind the service
- # Default: localhost
- -l, [--log=LOG] # File to which to log output
- -n, [--broker-username=BROKER_USERNAME] # Pact Broker basic auth username
- -p, [--broker-password=BROKER_PASSWORD] # Pact Broker basic auth password
- -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token (can also be set using the PACT_BROKER_TOKEN environment variable)
- [--log-level=LOG_LEVEL] # Log level. Options are DEBUG INFO WARN ERROR
- # Default: DEBUG
- -o, [--cors=CORS] # Support browser security in tests by responding to OPTIONS requests and adding CORS headers to mocked responses
- [--ssl], [--no-ssl], [--skip-ssl] # Use a self-signed SSL cert to run the service over HTTPS
- # Default: false
- [--sslcert=SSLCERT] # Specify the path to the SSL cert to use when running the service over HTTPS
- [--sslkey=SSLKEY] # Specify the path to the SSL key to use when running the service over HTTPS
-
-Description:
- Start a stub service with the given pact file(s) or directories. Pact URIs
- may be local file or directory paths, or HTTP. Include any basic auth details
- in the URL using the format https://USERNAME:PASSWORD@URI. Where multiple
- matching interactions are found, the interactions will be sorted by response
- status, and the first one will be returned. This may lead to some
- non-deterministic behaviour. If you are having problems with this, please
- raise it on the pact-dev google group, and we can discuss some potential
- enhancements. Note that only versions 1 and 2 of the pact specification are
- currently fully supported. Pacts using the v3 format may be used, however,
- any matching features added in v3 will currently be ignored.
+ --enable-otel
+ Enable OpenTelemetry tracing
+ -l, --loglevel
+ Log level (defaults to info) [default: info] [possible values: error, warn, info, debug, trace, none]
+ --enable-otel-logs
+ Enable OpenTelemetry logging
+ -f, --file
+ Pact file to load (can be repeated)
+ -d, --dir
+ Directory of pact files to load (can be repeated)
+ --enable-otel-traces
+ Enable OpenTelemetry traces
+ -e, --extension
+ File extension to use when loading from a directory (default is json)
+ --otel-exporter
+ The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
+ --otel-exporter-endpoint
+ The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
+ -u, --url
+ URL of pact file to fetch (can be repeated)
+ -b, --broker-url
+ URL of the pact broker to fetch pacts from [env: PACT_BROKER_BASE_URL=]
+ --otel-exporter-protocol
+ The protocol to use for the OTLP exporter (http/protobuf, http) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf]
+ --user
+ User and password to use when fetching pacts from URLS or Pact Broker in user:password form
+ --log-level
+ Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]
+ -t, --token
+ Bearer token to use when fetching pacts from URLS or Pact Broker
+ -p, --port
+ Port to run on (defaults to random port assigned by the OS)
+ -o, --cors
+ Automatically respond to OPTIONS requests and return default CORS headers
+ --cors-referer
+ Set the CORS Access-Control-Allow-Origin header to the Referer
+ --insecure-tls
+ Disables TLS certificate validation
+ -s, --provider-state
+ Provider state regular expression to filter the responses by
+ --provider-state-header-name
+ Name of the header parameter containing the provider state to be used in case multiple matching interactions are found
+ --empty-provider-state
+ Include empty provider states when filtering with --provider-state
+ --consumer-name
+ Consumer name or regex to use to filter the Pacts fetched from the Pact broker (can be repeated)
+ --provider-name
+ Provider name or regex to use to filter the Pacts fetched from the Pact broker (can be repeated)
+ -v, --version
+ Print version information
+ -h, --help
+ Print help
```
### pact-provider-verifier
-To connect to a Pact Broker that uses custom SSL cerificates, set the environment variable `$SSL_CERT_FILE` or `$SSL_CERT_DIR` to a path that contains the appropriate certificate.
-
```
-Usage:
- pact-provider-verifier PACT_URL ... -h, --provider-base-url=PROVIDER_BASE_URL
+Standalone pact verifier for provider pact verification
-Options:
- -h, --provider-base-url=PROVIDER_BASE_URL # Provider host URL
- -c, [--provider-states-setup-url=PROVIDER_STATES_SETUP_URL] # Base URL to setup the provider states at
- [--pact-broker-base-url=PACT_BROKER_BASE_URL] # Base URL of the Pact Broker from which to retrieve the pacts. Can also be set using the environment variable PACT_BROKER_BASE_URL.
- -n, [--broker-username=BROKER_USERNAME] # Pact Broker basic auth username. Can also be set using the environment variable PACT_BROKER_USERNAME.
- -p, [--broker-password=BROKER_PASSWORD] # Pact Broker basic auth password. Can also be set using the environment variable PACT_BROKER_PASSWORD.
- -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token. Can also be set using the environment variable PACT_BROKER_TOKEN.
- [--provider=PROVIDER]
- [--consumer-version-tag=TAG] # Retrieve the latest pacts with this consumer version tag. Used in conjunction with --provider. May be specified multiple times.
- [--provider-version-tag=TAG] # Tag to apply to the provider application version. May be specified multiple times.
- [--provider-version-branch=BRANCH] # The name of the branch the provider version belongs to.
- -g, [--tag-with-git-branch], [--no-tag-with-git-branch], [--skip-tag-with-git-branch] # Tag provider version with the name of the current git branch. Default: false
- # Default: false
- -a, [--provider-app-version=PROVIDER_APP_VERSION] # Provider application version, required when publishing verification results
- -r, [--publish-verification-results], [--no-publish-verification-results], [--skip-publish-verification-results] # Publish verification results to the broker. This can also be enabled by setting the environment variable PACT_BROKER_PUBLISH_VERIFICATION_RESULTS=true
- # Default: false
- [--enable-pending], [--no-enable-pending], [--skip-enable-pending] # Allow pacts which are in pending state to be verified without causing the overall task to fail. For more information, see https://pact.io/pending
- # Default: false
- [--custom-provider-header=CUSTOM_PROVIDER_HEADER] # Header to add to provider state set up and pact verification requests. eg 'Authorization: Basic cGFjdDpwYWN0'. May be specified multiple times.
- [--custom-middleware=FILE] # Ruby file containing a class implementing Pact::ProviderVerifier::CustomMiddleware. This allows the response to be modified before replaying. Use with caution!
- -v, [--verbose=VERBOSE] # Verbose output. Can also be set by setting the environment variable VERBOSE=true.
- -f, [--format=FORMATTER] # RSpec formatter. Defaults to custom Pact formatter. Other options are json and RspecJunitFormatter (which outputs xml).
- -o, [--out=FILE] # Write output to a file instead of $stdout.
- [--wait=SECONDS] # The number of seconds to poll for the provider to become available before running the verification
- # Default: 0
- [--log-dir=LOG_DIR] # The directory for the pact.log file
- [--log-level=LOG_LEVEL] # The log level
- # Default: debug
- [--fail-if-no-pacts-found], [--no-fail-if-no-pacts-found], [--skip-fail-if-no-pacts-found] # If specified, will fail when no pacts are found
- # Default: false
-
-Description:
- The parameters used when fetching pacts dynamically from a Pact Broker are:
-
- --pact-broker-base-url (REQUIRED)
- --provider (REQUIRED)
- --broker-username/--broker-password or --broker-token
- --consumer-version-tag or --consumer-version-selector
- --enable-pending
- --include-wip-pacts-since
-
- To
- verify a pact at a known URL (eg. when a verification is triggered by a
- 'contract content changed' webhook), pass in the pact URL(s) as the first
- argument(s) to the command, and do NOT set any of the other parameters apart
- from the base URL and credentials.
-
- To publish verification results for either of the above
- scenarios, set:
-
- --publish-verification-results (REQUIRED)
- --provider-app-version (REQUIRED)
- --provider-version-tag or --tag-with-git-branch
-
-
- Selectors: These are specified using JSON strings.
- The keys are 'tag' (the name of the consumer version tag), 'latest'
- (true|false), 'consumer', and 'fallbackTag'. For example '{\"tag\":
- \"master\", \"latest\": true}'. For a detailed explanation of selectors, see https://pact.io/selectors#consumer-version-selectors
+Usage: pact verifier [OPTIONS]
+Options:
+ --enable-otel
+ Enable OpenTelemetry tracing
+ --help
+ Print help and exit
+ --enable-otel-logs
+ Enable OpenTelemetry logging
+ -v, --version
+ Print version information and exit
+ --enable-otel-traces
+ Enable OpenTelemetry traces
+ --otel-exporter
+ The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
+ --otel-exporter-endpoint
+ The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
+ --otel-exporter-protocol
+ The protocol to use for the OTLP exporter (http/protobuf, http) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf]
+ --log-level
+ Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]
+
+Logging options:
+ -l, --loglevel Log level to emit log events at (defaults to warn) [possible values: error, warn, info, debug, trace, none]
+ --pretty-log Emits excessively pretty, multi-line logs, optimized for human readability.
+ --full-log This emits human-readable, single-line logs for each event that occurs, with the current span context displayed before the formatted representation of the event.
+ --compact-log Emit logs optimized for short line lengths.
+ -j, --json Generate a JSON report of the verification [env: PACT_VERIFIER_JSON_REPORT=]
+ -x, --junit Generate a JUnit XML report of the verification (requires the junit feature) [env: PACT_VERIFIER_JUNIT_REPORT=]
+ --no-colour Disables ANSI escape codes in the output [aliases: --no-color]
+
+Loading pacts options:
+ -f, --file
+ Pact file to verify (can be repeated)
+ -d, --dir
+ Directory of pact files to verify (can be repeated)
+ -u, --url
+ URL of pact file to verify (can be repeated)
+ -b, --broker-url
+ URL of the pact broker to fetch pacts from to verify (requires the provider name parameter) [env: PACT_BROKER_BASE_URL=]
+ --webhook-callback-url
+ URL of a Pact to verify via a webhook callback. Requires the broker-url to be set. [env: PACT_WEBHOOK_CALLBACK_URL=]
+ --ignore-no-pacts-error
+ Do not fail if no pacts are found to verify
+
+Authentication options:
+ --user Username to use when fetching pacts from URLS [env: PACT_BROKER_USERNAME=]
+ --password Password to use when fetching pacts from URLS [env: PACT_BROKER_PASSWORD=]
+ -t, --token Bearer token to use when fetching pacts from URLS [env: PACT_BROKER_TOKEN=]
+
+Provider options:
+ -h, --hostname
+ Provider hostname (defaults to localhost) [env: PACT_PROVIDER_HOSTNAME=]
+ -p, --port
+ Provider port (defaults to protocol default 80/443) [env: PACT_PROVIDER_PORT=]
+ --transport
+ Provider protocol transport to use (http, https, grpc, etc.) [env: PACT_PROVIDER_TRANSPORT=] [default: http]
+ --transports
+ Allows multiple protocol transports to be configured (http, https, grpc, etc.) with their associated port numbers separated by a colon. For example, use --transports http:8080 grpc:5555 to configure both.
+ -n, --provider-name
+ Provider name (defaults to provider) [env: PACT_PROVIDER_NAME=]
+ --base-path
+ Base path to add to all requests [env: PACT_PROVIDER_BASE_PATH=]
+ --request-timeout
+ Sets the HTTP request timeout in milliseconds for requests to the target API and for state change requests. [env: PACT_PROVIDER_REQUEST_TIMEOUT=]
+ -H, --header
+ Add a custom header to be included in the calls to the provider. Values must be in the form KEY=VALUE, where KEY and VALUE contain ASCII characters (32-127) only. Can be repeated.
+ --disable-ssl-verification
+ Disables validation of SSL certificates
+
+Provider state options:
+ -s, --state-change-url
+ URL to post state change requests to [env: PACT_PROVIDER_STATE_CHANGE_URL=]
+ --state-change-as-query
+ State change request data will be sent as query parameters instead of in the request body [env: PACT_PROVIDER_STATE_CHANGE_AS_QUERY=]
+ --state-change-teardown
+ State change teardown requests are to be made after each interaction [env: PACT_PROVIDER_STATE_CHANGE_TEARDOWN=]
+
+Filtering interactions:
+ --filter-description
+ Only validate interactions whose descriptions match this filter (regex format) [env: PACT_DESCRIPTION=]
+ --filter-state
+ Only validate interactions whose provider states match this filter (regex format) [env: PACT_PROVIDER_STATE=]
+ --filter-no-state
+ Only validate interactions that have no defined provider state [env: PACT_PROVIDER_NO_STATE=]
+ -c, --filter-consumer
+ Consumer name to filter the pacts to be verified (can be repeated)
+
+Publishing options:
+ --publish
+ Enables publishing of verification results back to the Pact Broker. Requires the broker-url and provider-version parameters.
+ --provider-version
+ Provider version that is being verified. This is required when publishing results.
+ --build-url
+ URL of the build to associate with the published verification results.
+ --provider-tags
+ Provider tags to use when publishing results. Accepts comma-separated values.
+ --provider-branch
+ Provider branch to use when publishing results
+
+Pact Broker options:
+ --consumer-version-tags
+ Consumer tags to use when fetching pacts from the Broker. Accepts comma-separated values.
+ --consumer-version-selectors
+ Consumer version selectors to use when fetching pacts from the Broker. Accepts a JSON string as per https://docs.pact.io/pact_broker/advanced_topics/consumer_version_selectors/. Can be repeated.
+ --enable-pending
+ Enables Pending Pacts
+ --include-wip-pacts-since
+ Allow pacts that don't match given consumer selectors (or tags) to be verified, without causing the overall task to fail. For more information, see https://pact.io/wip
+
+Development options:
+ --exit-on-first-error Stops the verifier at the first failure
+ --last-failed Only runs the interactions that failed on the previous verifier run. Requires --json-file to have been set
```
@@ -240,127 +333,309 @@ To connect to a Pact Broker that uses custom SSL cerificates, set the environmen
#### publish
```
-Usage:
- pact-broker publish PACT_DIRS_OR_FILES ... -b, --broker-base-url=BROKER_BASE_URL
+Publishes pacts to the Pact Broker
+
+Usage: pact broker publish [OPTIONS] --broker-base-url ...
+
+Arguments:
+ ...
+
+ Glob pattern to match pact files to publish
+
+ ? matches any single character.
+ * matches any (possibly empty) sequence of characters.
+ ** matches the current directory and arbitrary subdirectories. This sequence must form
+ a single path component, so both **a and b** are invalid and will result in an
+ error. A sequence of more than two consecutive * characters is also invalid.
+ [...] matches any character inside the brackets. Character sequences can also specify
+ ranges of characters, as ordered by Unicode, so e.g. [0-9] specifies any character
+ between 0 and 9 inclusive. An unclosed bracket is invalid.
+ [!...] is the negation of [...], i.e. it matches any characters not in the brackets.
+
+ The metacharacters ?, *, [, ] can be matched by using brackets (e.g. [?]). When a ]
+ occurs immediately following [ or [! then it is interpreted as being part of, rather
+ then ending, the character set, so ] and NOT ] can be matched by []] and [!]] respectively.
+ The - character can be specified inside a character sequence pattern by placing it at
+ the start or the end, e.g. [abc-].
+
+ See https://docs.rs/glob/0.3.0/glob/struct.Pattern.html
Options:
- -a, [--consumer-app-version=CONSUMER_APP_VERSION] # The consumer application version
- -h, [--branch=BRANCH] # Repository branch of the consumer version
- -r, [--auto-detect-version-properties], [--no-auto-detect-version-properties], [--skip-auto-detect-version-properties] # Automatically detect the repository commit, branch and build URL from known CI environment variables or git CLI. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and Azure DevOps.
- # Default: false
- -t, [--tag=TAG] # Tag name for consumer version. Can be specified multiple times.
- -g, [--tag-with-git-branch], [--no-tag-with-git-branch], [--skip-tag-with-git-branch] # Tag consumer version with the name of the current git branch. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and Azure DevOps.
- # Default: false
- [--build-url=BUILD_URL] # The build URL that created the pact
- [--merge], [--no-merge], [--skip-merge] # If a pact already exists for this consumer version and provider, merge the contents. Useful when running Pact tests concurrently on different build nodes.
- # Default: false
- -o, [--output=OUTPUT] # json or text
- # Default: text
- -b, --broker-base-url=BROKER_BASE_URL # The base URL of the Pact Broker
- -u, [--broker-username=BROKER_USERNAME] # Pact Broker basic auth username
- -p, [--broker-password=BROKER_PASSWORD] # Pact Broker basic auth password
- -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token
- -v, [--verbose], [--no-verbose], [--skip-verbose] # Verbose output.
- # Default: false
-
-Publish pacts to a Pact Broker.
-
+ -b, --broker-base-url
+ The base URL of the Pact Broker
+
+ [env: PACT_BROKER_BASE_URL=]
+
+ --enable-otel
+ Enable OpenTelemetry tracing
+
+ --enable-otel-logs
+ Enable OpenTelemetry logging
+
+ -u, --broker-username
+ Pact Broker basic auth username
+
+ [env: PACT_BROKER_USERNAME=]
+
+ --enable-otel-traces
+ Enable OpenTelemetry traces
+
+ -p, --broker-password
+ Pact Broker basic auth password
+
+ [env: PACT_BROKER_PASSWORD=]
+
+ -k, --broker-token
+ Pact Broker bearer token
+
+ [env: PACT_BROKER_TOKEN=]
+
+ --otel-exporter
+ The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp)
+
+ [env: OTEL_TRACES_EXPORTER=]
+
+ --otel-exporter-endpoint
+ The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp)
+
+ [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
+
+ --validate
+ Validate the Pact files before publishing.
+
+ --otel-exporter-protocol
+ The protocol to use for the OTLP exporter (http/protobuf, http)
+
+ [env: OTEL_EXPORTER_OTLP_PROTOCOL=]
+ [default: http]
+ [possible values: http, http/protobuf]
+
+ --strict
+ Require strict validation.
+
+ -a, --consumer-app-version
+ The consumer application version
+
+ --branch
+ Repository branch of the consumer version
+
+ --log-level
+ Set the log level (none, off, error, warn, info, debug, trace)
+
+ [default: off]
+ [possible values: off, none, error, warn, info, debug, trace]
+
+ -r, --auto-detect-version-properties
+ Automatically detect the repository commit, branch and build URL from known CI environment variables or git CLI. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and Azure DevOps.
+
+ -t, --tag [...]
+ Tag name for consumer version. Can be specified multiple times (delimiter ,).
+
+ --tag-with-git-branch
+ Tag consumer version with the name of the current git branch. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and Azure DevOps.
+
+ --build-url
+ The build URL that created the pact
+
+ --merge
+ If a pact already exists for this consumer version and provider, merge the contents. Useful when running Pact tests concurrently on different build nodes.
+
+ -o, --output