[FAB-5576] -f flag to choose docker-compose on byfn.sh

Using the -f flag is possible to specify the docker-compose file to use on the
byfn.sh script to have a standar way to test the different configurations for
the samples project. The defautl is 'docker-compose-cli.yaml'

-h output updated as well.

Fix Issue # FAB-5576.

Change-Id: I8766ab930f05d9c4934b149872b9de3a299ff345
Signed-off-by: dsanchezseco <d.seco@protonmail.com>
This commit is contained in:
dsanchezseco 2017-08-03 12:18:50 +02:00
parent 6b99925773
commit 592114010e

View file

@ -34,7 +34,7 @@ export FABRIC_CFG_PATH=${PWD}
# Print the usage message
function printHelp () {
echo "Usage: "
echo " byfn.sh -m up|down|restart|generate [-c <channel name>] [-t <timeout>] [-d <delay>] "
echo " byfn.sh -m up|down|restart|generate [-c <channel name>] [-t <timeout>] [-d <delay>] [-f <docker-compose-file>]"
echo " byfn.sh -h|--help (print this message)"
echo " -m <mode> - one of 'up', 'down', 'restart' or 'generate'"
echo " - 'up' - bring up the network with docker-compose up"
@ -44,6 +44,7 @@ function printHelp () {
echo " -c <channel name> - channel name to use (defaults to \"mychannel\")"
echo " -t <timeout> - CLI timeout duration in microseconds (defaults to 10000)"
echo " -d <delay> - delay duration in seconds (defaults to 3)"
echo " -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)"
echo
echo "Typically, one would first generate the required certificates and "
echo "genesis block, then bring up the network. e.g.:"
@ -318,6 +319,8 @@ while getopts "h?m:c:t:d:" opt; do
;;
d) CLI_DELAY=$OPTARG
;;
f) COMPOSE_FILE=$OPTARG
;;
esac
done