Hello, me again. I'm implementing webhooks now, an...
# pactflow
d
Hello, me again. I'm implementing webhooks now, and when testing some variables are not being populated.
Copy code
{
  "target": {
    "ref_type": "branch",
    "type": "pipeline_ref_target",
    "ref_name": "${pactbroker.providerVersionBranch}",
    "selector": {
      "type": "custom",
      "pattern": "pi-verify-pacts"
    }
  },
  "variables": [
    {
      "key": "PACT_URL",
      "value": "${pactbroker.pactUrl}"
    },
    {
      "key": "PACT_PROVIDER_VERSION",
      "value": "${pactbroker.providerVersionNumber}"
    },
    {
      "key": "PACT_PROVIDER_BRANCH",
      "value": "${pactbroker.providerVersionBranch}"
    },
    {
      "key": "PACT_PROVIDER_NAME",
      "value": "${pactbroker.providerName}"
    },
    {
      "key": "PACT_CONSUMER_VERSION",
      "value": "${pactbroker.consumerVersionNumber}"
    },
    {
      "key": "PACT_CONSUMER_BRANCH",
      "value": "${pactbroker.consumerVersionBranch}"
    },
    {
      "key": "PACT_CONSUMER_NAME",
      "value": "${pactbroker.consumerName}"
    }
  ]
}
${pactbroker.providerVersionBranch}
and
${pactbroker.providerVersionNumber}
are resolving to an empty string, which causes the webhook to fail. For now I'll hope that this is just the "test webhook" functionality that's broken at the moment. I'll let you know if the problem persists.
Oh, may have spoke too soon 😄 After enabling the webhook and testing one more time it's started filling in those variables. So I guess it's just a bug in testing disabled webhooks that affects some provider variables, odd 🙂
thankyou 1
m
Thanks, I'll follow that up!