I am using pactflow starter plan to deploy event c...
# pactflow
l
I am using pactflow starter plan to deploy event consumer and producer API, the pact was successfully verified on pactflow and version of both consumer and provider match. however when I run the command "canideployeventprovider": "pact-broker can-i-deploy --pacticipant EventProducer --version=$GITHUB_SHA --to-environment production", it throw an error
Copy code
Computer says no ¯\_(ツ)_/¯

CONSUMER      | C.VERSION | PROVIDER      | P.VERSION | SUCCESS? | RESULT#
--------------|-----------|---------------|-----------|----------|--------
ConsumerEvent | 188888    | EventProducer | ???       | ???      |        

There is no verified pact between version 188888 of ConsumerEvent and a version of EventProducer currently in production (no version is currently recorded as deployed/released in this environment)
y
have you deployed a version of the provider EventProducer to production and recorded the deployment in the Pact Broker?
l
i see. so I need to run the script to record the
Copy code
event record:event:provider:deployment": "pact-broker record-deployment --pacticipant EventProducer --version $GITHUB_SHA --environment production",
i did run the script to deploy the provider but I didn't know I also have to record the deployment. so this recorded deployment apply to event based contract testing?
y
correct, if you don’t record the deployment, you cannot use can-i-deploy with
--to-environment
as there will be no environment in order to verify against