json
06/01/2022, 7:39 PMpact-broker create-or-update-webhook
command, where it suggested I write a curl command and then change it from curl
to pact-broker create-or-update-webhook
and I did, this worked to kick off my jenkins job:
curl \
"http://$JENKINS_BASE_URL/job/Pact%20Verify%20Provider/buildWithParameters" \
-X POST \
-u "$USERNAME:$PASSWORD" \
-d project=\${pactbroker.providerName} \
-d version=\${pactbroker.providerVersionNumber} \
-d pactfile_url=\${pactbroker.pactUrl}
but when I change it to this:
pact-broker create-or-update-webhook \
"http://$JENKINS_BASE_URL/job/Pact%20Verify%20Provider/buildWithParameters" \
-X POST \
-u "$USERNAME:$PASSWORD" \
-d project=\${pactbroker.providerName} \
-d version=\${pactbroker.providerVersionNumber} \
-d pactfile_url=\${pactbroker.pactUrl} \
--contract-requiring-verification-published \
--broker-base-url "$PACT_BROKER_URL" \
--description 'Automatically trigger pact verification on contract change.' \
--uuid "$PROVIDER_VERIFICATION_WEBHOOK_UUID"
I get the exact same error:
ERROR: "pact-broker create_or_update_webhook" was called with arguments ["<http://jenkins-base-url/job/Pact%20Verify%20Provider/buildWithParameters>", "version=${pactbroker.providerVersionNumber}", "pactfile_url=${pactbroker.pactUrl}"]
Usage: "pact-broker create-or-update-webhook URL --uuid=UUID -X, --request=METHOD -b, --broker-base-url=BROKER_BASE_URL"
Very perplexing ๐Matt (pactflow.io / pact-js / pact-go)
-d
is a repeated flag for the create-or-update-webhook
commandjson
06/02/2022, 1:01 PMMatt (pactflow.io / pact-js / pact-go)
json
06/03/2022, 12:42 PMjson
06/03/2022, 12:42 PM