Hi Everyone :wave: I have a question. I added all...
# general
o
Hi Everyone 👋 I have a question. I added all process (webhooks included). Contract creating, publishing, triggering webhooks and verifying (included provider pipeline and webhooks triggered) are running perfectly. But i couln't pass can-i-deploy stage. What am i missing? I'm using this command for can-i-deploy stage by the way. Can anyone help please?
Copy code
pact-broker can-i-deploy --pacticipant $APP_NAME --version $CI_COMMIT_SHORT_SHA --branch=$CI_COMMIT_BRANCH --to-environment $ENVIRONMENT --retry-while-unknown=12 --retry-interval=10 --verbose
👋 1
f
what is the output of the command?
o
On provider side:
There is no verified pact between the version of ShipmentAPI currently deployed to dev (75e21c4a) and version 33cf4ee4 of AddressAPI
On consumer side:
There is no verified pact between version f5e7fb28 of ShipmentAPI and the version of AddressAPI currently deployed to dev (no such version exists)
m
So for that to pass: all providers deployed to
$ENVIRONMENT
must have verified the contract associated with
$APP_NAME
version
$CI_COMMIT_SHORT_SHA
and the provider must also have a matching branch
$CI_COMMIT_BRANCH
👍 1
y
Has your provider been deployed to dev, and recorded a deployment to signify? https://docs.pact.io/pact_broker/recording_deployments_and_releases
m
My guess, is that your provider is not verifying the pact for version
f5e7fb28
of your consumer
It could be that your webhook is not verifying the correct pact
o
Interesting. I just disable can-i-deploy part once on the pipeline, after time i enable again and now passed all steps. Why we need to record env for new providers before can-i-deploy?
m
because you’re asking the question “can I deploy APP_NAME to environment ENVIRONMENT”. If the provider is not in “ENVIRONMENT” then it is not safe to deploy APP_NAME to it
recording a deployment lets Pactflow know the provider is there, and so can-i-deploy will be aware of this and succeed