Afternoon , I have set up a PactFlow integration w...
# general
d
Afternoon , I have set up a PactFlow integration with my SwagerHub, I have the correct URL and Token and have assigned a PactFlow Applications (which appeared in the relevant drop down - I assigned my consumer here - is this correct ? ) and created the integration. When I check "Check Compatibility" I see 'Compatible' but when I click "view compatibility result' I see "_This API does not yet have any consumer contracts_". Why is this , I have a contract in PactFlow which is assigned in the integration , would anyone know how to fix this error ? I think I have misunderstood the PactFlow application , could someone define that for me and how topush it to PactFlow . Thanks
y
Hello best asking in the PactFlow channel. You need to select the provider name in the integration option page in SwaggerHub
The provider name is used to get any associated consumer contracts. 👌🏾have asked for us to clarify the wording there 👊🏾
d
OK Thanks . That would be the provider contract uploaded to PactFlow or the provider in the pact between the consumer and provider ?
y
The consumer contract in PactFlow has a provider name associated with it, that associates a provider with a consumer. Once you’ve uploaded a consumer contract it should show at least two applications in the integrations list in SHUB. Your consumer and provider
d
OK I have done that but still see the error , I must be doing something incorrectly. I'm afraid the documentation isn't clear for me. But thanks for your help
y
Can you show a screenshot of your pactflow main page and SwaggerHub PactFlow integration options? I can have a quick squiz to see if it’s correct
d
message has been deleted
y
There are some other caveats, you haven’t followed from the docs. You need to upload your consumer contract with a branch property set
🙌 1
d
My provider name is GeoProvider
y
It uses the branch and recording deployments feature to ascertain which contracts to verify. You need the consumer publishing to a main branch ( main/master ) or whatever you set ( it is configurable in the broker )
🙌 1
d
Apologise how would I edit the branch in PactFlow I do not see that option ? I published the consumer contract via a gitHub action and do not see a option to set the branch there either.
OK I see your repo https://github.com/pactflow/example-consumer , I'll use that as a basis to publish my contract it seems to set a branch in the workflow. I appreciate your help thanks for your time . Have a good weekend
🙌 1
y
you would pass in the
--branch
property in the CLI call. This action does it https://github.com/pactflow/actions/tree/main/publish-pact-files https://github.com/pactflow/actions/blob/ffdabd8bf795ec7c769a977d82002e3e9add759f/publish-pact-files/publishPactfiles.sh#L15-L34 it gets the branch via the command
git rev-parse --abbrev-ref HEAD
and passes it into the CLI in the
--branch
call. The Pact CI/CD workshop introduces the concepts of branches and environments if it may be helpful https://docs.pactflow.io/docs/workshops/ci-cd/ Good luck chap and thanks for trying out the feature
🙌 1
1