GitHub
01/11/2023, 4:32 PMpact-broker can-i-deploy --pacticipant {Consumer} --version {consumerVersion} --pacticipant {Provider} -l --in_environment {environment} --broker-base-url {broker.base.url} -k {token} -o json
Actual Response.
I've only included the relevant part in the json output example!
{
"summary": {
"deployable": null,
"reason": "There is no verified pact between version s712-consumerVersion-g1723 of AConsumer and the latest version of AProvider (b123-providerVersion-901)",
"success": 0,
"failed": 0,
"unknown": 1
},
"notices": [
{
"type": "error",
"text": "There is no verified pact between version s712-consumerVersion-g1723 of AConsumer and the latest version of AProvider (b123-providerVersion-901)"
}
],
"matrix": [
{
"consumer": {
"name": "AConsumer",
"version": {
"number": "s712-consumerVersion-g1723"
}
},
"provider": {
"name": "AProvider",
"version": null
},
"verificationResult": null
}
]
}
Expected Response.
I was hoping to receive a json that contains the provider version. Example
{
"summary": {
"deployable": null,
"reason": "There is no verified pact between version s712-consumerVersion-g1723 of AConsumer and the latest version of AProvider (b123-providerVersion-901)",
"success": 0,
"failed": 0,
"unknown": 1
},
"notices": [
{
"type": "error",
"text": "There is no verified pact between version s712-consumerVersion-g1723 of AConsumer and the latest version of AProvider (b123-providerVersion-901)"
}
],
"matrix": [
{
"consumer": {
"name": "AConsumer",
"version": {
"number": "s712-consumerVersion-g1723"
}
},
"provider": {
"name": "AProvider",
"version": "b123-providerVersion-901"
},
"verificationResult": null
}
]
}
Why this would be useful
We would like to use the ouput of this command to determine the version of the Provider in a specific environment. It's probably not the best place to look at but it feels correct to return the version of the provider deployed in that environment considering that is part of the error message.
Let me know if you need anything else, I am happy to open a Pull request if this makes sense!
pact-foundation/pact_broker