Konstantin Manna
02/28/2024, 1:58 PMpact-broker publish fails and returns exit code 1: How to figure out what is the reason for it to fail? It does not output anything (Version 1.68.0)Matt (pactflow.io / pact-js / pact-go)
Konstantin Manna
02/29/2024, 7:52 AMMatt (pactflow.io / pact-js / pact-go)
pact-broker help publish should get you all the available flagsMatt (pactflow.io / pact-js / pact-go)
β docker run pactfoundation/pact-cli:latest pact-broker help publish
Usage:
pact-broker publish PACT_DIRS_OR_FILES ... -a, --consumer-app-version=CONSUMER_APP_VERSION -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
[--auto-detect-version-properties], [--no-auto-detect-version-properties] # Automatically detect the repository branch 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] # Tag name for consumer version. Can be specified multiple times.
-g, [--tag-with-git-branch], [--no-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] # 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=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] # Verbose output. Default: false
Publish pacts to a Pact Broker.Matt (pactflow.io / pact-js / pact-go)
--verbose should do itKonstantin Manna
02/29/2024, 11:10 AMMatt (pactflow.io / pact-js / pact-go)
Konstantin Manna
02/29/2024, 1:07 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Konstantin Manna
03/01/2024, 2:56 PMFROM pactfoundation/pact-ref-verifier:0.10.6 as pact-ref-verifier
FROM pactfoundation/pact-cli:0.54.0-pactcli0.53.0
COPY --from=pact-ref-verifier /usr/local/bin/pact_verifier_cli /bin/pact-verifier
RUN chmod a+x /bin/pact-verifierYousaf Nabi (pactflow.io)
>-
docker run --rm -it pactfoundation/pact-cli:0.54.0-pactcli0.53.0 sh
~ # pact-broker publish example/pacts/pact.json --broker-base-url <https://test.pactflow.io> --broker-username dXfltyFMgNOFZAxr8io9wJ37iUpY42M --broker-password=O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1 -a 1.0.0
Updated docker-example-consumer version 1.0.0
Next steps:
Configure the version branch to be the value of your repository branch.
Pact successfully republished for docker-example-consumer version 1.0.0 and provider docker-example-provider with no content changes.
View the published pact at <https://test.pactflow.io/pacts/provider/docker-example-provider/consumer/docker-example-consumer/version/1.0.0>
Events detected: contract_published
No enabled webhooks found for the detected events
~ # pact-broker publish >- example/pacts/pact.json --broker-base-url <https://test.pactflow.io> --broker-username dXfltyFMgNOFZAxr8io9wJ37iUpY42M --broker-password=O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1 -a 1.0.0Konstantin Manna
03/05/2024, 9:47 AMMatt (pactflow.io / pact-js / pact-go)