Hi There! I am trying to implement `CI/CD` with p...
# documentation
s
Hi There! I am trying to implement
CI/CD
with pact but there some things that is not clear how to implement it with two different repository!
Copy code
CI CD scenario:
after contract changing event which it triggers by consumer, we should run provider test pipeline and after failing the the provider pipeline, we need to fail the consumer pipeline as well
I have read the documentation of the CI/CD workshop and followed how
can-i-deploy
could help but I could not completely implement these step on my own Do you have any blog post recommendation to share ?
m
The consumer test pipeline should fail before the provider test pipeline runs, because the can-i-deploy step would fail. You can add the retry options to can I deploy if you want to wait until the provider build has run
Who wrote the above scenario?
s
could you point out a reference to follow the ci cd implementation with pact except this since I have already read it but I could not implement it
when provider changes the contract it fails when it does not compatible with the contract which consumere is generated. now, we need to inform the consumer with failing its pipeline IMO, which I do not know how it’s possible
m
start 1. Consumer publishes pact βœ… 2. Consumer runs can-i-deploy, targeting an environment to deploy to (e.g.
prod
). ❌ <------- this should fail your consumer pipeline 3. ---> webhook from PactFlow triggers provider pipeline ❌ end
s
could you also help me in regard to pact-broker cli authentication I have installed the latest version with Docker but I still getting
Unauthorized
error when I am trying to test
can-i-deploy
with specifying my write access token
--broker-token
and my
--broker-base-url
m
how are you calling it?
s
Copy code
pact-broker can-i-deploy --pacticipant example-client --version 1.0.0-someconsumersha --to-environment production --broker-base-url https://******.<http://pactflow.io|pactflow.io> --broker-token ******
m
You mention you were using Docker, are you executing that command within the container? Can you share any logs? If you can add the
--verbose
flag to the command, that will help
πŸ‘ 1
How'd you go?
s
I found the issue but I have solved it yet
it’s my docker env issue
thanks for follow up πŸ™Œ
πŸ‘ 1