Hi everyone, general question about pacticipant i ...
# general
j
Hi everyone, general question about pacticipant i environments. In our company, we have two teams, first team develops consumer with 4 environments (dev, qa, uat, prod) and the other team develops provider (dev, prod) Consumer and Provider versions are deployed/released on dev, and this moment “consumer team” wants “recordDeployment & recordRelease” on qa. Our problem is when we try to publish consumer in our pipeline, when we try to “can-i-deploy —to-environment=qa” we get this error. There is no verified pact between the latest version of pactflow-poc-consumer from branch main (e457ea1fbe744e8de0f5d7727054e69c416bc994) and a version of pactflow-poc-provider currently in qa (no version is currently recorded as deployed/released in this environment) 1. Is there some way to match differents environments between consumer-provider? 2. Is it mandatory that the consumer and the provider to have the same environments? 3. What would it be the best practice in our scenario? Many thanks
y
which provider does the consumer in qa & uat point to?
j
I am simplifying, but this is the scenario
I made a workaround, but i don't know if it is correct... In my consumer pipeline, when I try to release on qa, 1st.: I check if "can-i-deploy --to=dev" 2st: if I can, i record-deploy & i record-release -to=qa
hi, some suggestion? @Yousaf Nabi (pactflow.io)
s
I think, you need to create environments matching consumer (if there is a potential that there could be another consumer with similar environments). But not 100% sure with that approach though. may be @Yousaf Nabi (pactflow.io) can provide guidance
y
hmm hey dudes, have been mulling over this if you don’t have a provider deployed or released in dev, within pactflow, the consumer can i deploy will fail in can i deploy against dev. if consumers in dev/qa/uat always point to the same dev version of the provider, you could record deployments of a provider from dev to qa and uat. when a consumer publishes a pact from dev, how does thus get verified in the provider side? do you have webhooks setup? if so, a webhook would be triggered for all deployed and released versions of the provider, so this would verify the contract against dev and prod - 1 webhook per env correlating to a env + 1 for head of providers main branch. https://pact-foundation.slack.com/archives/C5F4KFKR8/p1722591894241479?thread_ts=1722522277.918569&channel=C5F4KFKR8&message_ts=1722591894.241479 this should work i think, as long as dev/qa/uat consumer all point to the same version of the dev provider. hope that helps a little. i often use an open source broker and test out hypothetical solutions just by using a couple of test pacts and the cli to test out what might happen in a certain scenario when i am unsure but dont want to mess too much with the workflow at work