So, some more info, I tried following the instruct...
# general
j
So, some more info, I tried following the instructions in the description for the
pact-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:
Copy code
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:
Copy code
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:
Copy code
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 ๐Ÿ˜•
m
I donโ€™t think
-d
is a repeated flag for the
create-or-update-webhook
command
j
Okay, that's a good tip. It is for curl, so I assumed it would translate
๐Ÿ‘ 1
m
Howโ€™d you go?
j
Still prototyping my whole pipeline, so I just created the webhook via a curl post and side-stepped this issue for now (my original intention was to create it via the cli app using the create-or-update-webhook command in source control so if anyone edits it there and checks it in, it automatically updates in the pact-broker, but that's a stretch-goal now)
๐Ÿ‘ 1
Thanks for following up though! ๐Ÿ™‚
๐Ÿ‘ 1