When we PUT the pact to with a powershell script, ...
# pact-broker
f
When we PUT the pact to with a powershell script, we set the uri as
Copy code
$version = 1.0.0.0
$buildId = $(Build.BuildId)   # e.g. 12345
$uri = "$brokerUri/pacts/provider/$provider/consumer/$consumer/version/$version_$buildId"
I was expecting the version to be 1.0.0.0_12345 but in the broker the consumer version is shown only as 12345. At https://docs.pact.io/pact_broker/pacticipant_version_numbers i read
When publishing a pact or a verification, the resource is associated with a particular version of the pacticipant (application), which is identified by a version number. Just to make it very clear - the version number that is specified in the URL of a pact or a verification is the application version number, not the pact version. Pact versioning is done for you behind the scenes by the Broker, and is based on the content of the pact.
How do I set the pact version? I don't see any version reference in my c# source using PACT.V3 (I know i need to upgrade to V4) Thanks
m
Remember you're never setting a pact version, you're always setting a version of the pacticipant
...in the case of this resource, that's the consumer
I suspect an issue with your script, the version can definitely include those characters
f
Thanks Matt. It happens in my azure pipeline. I see the parameters versions and buildId being passed correctly. I need to upgrade to the cli instead of the CRUD api (also need to upgrade to V4) As soon as i have some spare cycles, i'll take care of it.
👍 1