Another (unrelated) question: I'm trying to use <t...
# pact-broker
j
Another (unrelated) question: I'm trying to use the pact-broker CLI to publish a directory containing pact files. Since the first option is called
PACT_DIRS_OR_FILES
I assume that means it's possible to point at a directory and the pact-broker cli will simply upload all the pact files it finds. However, when I try and run it this way, I get:
Copy code
docker run --network host pactfoundation/pact-cli broker publish ./tests/ --consumer-app-version=ca3abdc
Specified pact file './tests/' does not exist. This sometimes indicates one of the arguments has been specified with the wrong name and has been incorrectly identified as a file path.
Am I missing something? Do I need to format my argument differently? Or is there a flag to enable directory mode or something?
oh damn, this one might actually be because I'm using the docker executable. I tried just running the same command from the pact-broker stand-alone CLI instead and it worked. Maybe I need to like, volume the file into the container?
b
Yes, you need to mount your local file system into the docker image.
See the example on the docker home page for the image @json
j
Got it! Thanks 🙂