X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=nfvbenchvm%2Fdib%2Fbuild-image.sh;h=445807b1f8084d98e9c375393429582943400dec;hb=refs%2Fchanges%2F34%2F73234%2F1;hp=4559bb63d70ff27d1f2133f18f75bd6d5ac2a3dc;hpb=1a9c875d35daf4e742cd980e824c862ad793a658;p=nfvbench.git diff --git a/nfvbenchvm/dib/build-image.sh b/nfvbenchvm/dib/build-image.sh index 4559bb6..445807b 100755 --- a/nfvbenchvm/dib/build-image.sh +++ b/nfvbenchvm/dib/build-image.sh @@ -6,37 +6,68 @@ # Ubuntu: sudo apt-get -y install python3 python3-venv qemu-utils kpartx # CentOS: sudo yum install -y python3 qemu-img kpartx -usage() { - echo "Usage: $0 [-l] [-g] [-v]" - echo " -l build NFVbench loop VM image" - echo " -g build NFVbench generator image" - echo " -v verify only (build but do not push to google storage)" - exit 1 -} +# Stop on error (see https://wizardzines.com/comics/bash-errors/) +set -euo pipefail +DEBUG=no verify_only=0 generator_only=0 loopvm_only=0 __prefix__="" + +# Artifact URL +gs_url=artifacts.opnfv.org/nfvbench/images + +# image version number +__version__=0.15 +loopvm_image_name=nfvbenchvm_centos-$__version__ +generator_image_name=nfvbenchvm_centos-generator-$__version__ + + # ---------------------------------------------------------------------------- # Parse command line options and configure the script # ---------------------------------------------------------------------------- -while getopts ":hglv" opt; do +usage() { + cat <