Bogireddy Gnanendra Reddy
07/19/2024, 11:07 AMYousaf Nabi (pactflow.io)
Bogireddy Gnanendra Reddy
07/19/2024, 11:17 AMYousaf Nabi (pactflow.io)
Bogireddy Gnanendra Reddy
07/19/2024, 1:18 PMYousaf Nabi (pactflow.io)
Matt (pactflow.io / pact-js / pact-go)
pact-broker help publish
Usage:
pact-broker publish PACT_DIRS_OR_FILES ... -b, --broker-base-url=BROKER_BASE_URL
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.
Note the --merge flag.
The issue is that a partially complete pact file will still trigger a verification, and then it will trigger another once you’ve finished uploading.
I personally am not sure about this workflow, but I know we used to use it at PactFlow. So we know what we’re doing (apparently) trollparrotBogireddy Gnanendra Reddy
07/22/2024, 5:13 PM