Tatiana
04/21/2023, 4:18 PM--state-change-url
of the pact_verifier_cli accepts several urls?
For example, if there are two provider states endpoints as
/app_one/pact/provider_states
and /app_two/pact/provider_states
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Tatiana
04/22/2023, 1:19 AMTatiana
04/22/2023, 1:19 AMTatiana
04/22/2023, 1:20 AMTatiana
04/22/2023, 1:24 AMscript:
- >-
pact-verifier
--broker-url="$PACTFLOW_URL"
--token="$TOKEN"
--provider-name="monolith"
----state-change-url=<http://mono_app_one/pact/provider_states>
--publish
- >-
pact-verifier
--broker-url="$PACTFLOW_URL"
--token="$TOKEN"
--provider-name="monolith"
----state-change-url=<http://mono_app_two/pact/provider_states>
--publish
but it doesn’t look nice and it will grow..😐Tatiana
04/22/2023, 1:27 AMmatrix
in gitLab, and will be something like:
parallel:
matrix:
- PATH: [mono_app_one, mono_app_two]
script:
- >-
pact-verifier
--broker-url="$PACTFLOW_URL"
--token="$TOKEN"
--provider-name="monolith"
----state-change-url=http://${PATH}/pact/provider_states
--publish
maybe it will work. If it works, it will create 2 parallel jobs with different provider states endpointsMatt (pactflow.io / pact-js / pact-go)
Tatiana
04/22/2023, 1:34 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Tatiana
04/22/2023, 1:40 AMYou should stub that out in your pact test and then have separate pact tests from each of your microservices to each monolothyes, it’s implemented like this. I am wondering if I can put different provider states endpoints into one ci/cd job. I’ll try implement it with matrix, let’s see if it works
Timothy Jones
04/22/2023, 3:41 AM