Skip to content
build_tosca_parser.sh 1.2 KiB
Newer Older
Laurent Velez's avatar
Laurent Velez committed
#!/bin/bash
TOSCA_PARSER="Cloudnet-TOSCA-toolbox"
GIT_URL_TOSCA_TOOLBOX="https://github.com/Orange-OpenSource/Cloudnet-TOSCA-toolbox.git"
TOSCA_PARSER_FOLDER="tosca-parser/"

while getopts v: flag
do
        case "${flag}" in
                v) TOSCA_PARSER=${OPTARG};;
        esac
done

if [ ${TOSCA_PARSER} == "Cloudnet-TOSCA-toolbox" ] ; then
	# clone robot tests
    git clone $GIT_URL_TOSCA_TOOLBOX $TOSCA_PARSER_FOLDER
    cd $TOSCA_PARSER_FOLDER
	
    docker build -t cloudnet/toscaware bin/toscaware
	
	#pwd
	#docker run -v "${PWD}:/work" -v "${PWD}/bin/cloudnet:/cloudnet" --workdir="/work" cloudnet/toscaware /bin/sh -c "echo Building image"
	#docker run --name=tosca-parser -v "${PWD}:/work" --workdir="/work" cloudnet/toscaware /bin/sh -c "ls"
	#sleep 5;
	#container_to_update=`docker ps -n 1 --format '{{.Names}}'`
	#echo "Creating updated image from container ${container_to_update}"
	#docker container commit ${container_to_update} cloudnet/toscaware:latest
	#echo "Deleting old container ${container_to_update}"
	#docker container rm ${container_to_update}

elif [ ${TOSCA_PARSER} == "Puccini" ] ; then
	#Build Puccini docker from Dockerfile
	docker build -t puccini -f scripts/Dockerfile.puccini .
	
fi

exit