From: Gwenael Lambrouin Date: Mon, 13 Dec 2021 13:33:07 +0000 (+0100) Subject: nfvbenchvm: add 2 debug features to build-image.sh X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=nfvbench.git;a=commitdiff_plain;h=ebf68732e277ab06175df8a0fcde46dc7a730321 nfvbenchvm: add 2 debug features to build-image.sh - The new option -t (enable debug traces) allows to show in the build log the commands run in the shell scripts, including the commands defined in the disk image builder elements. - The new option -d (debug) instructs disk-image-create to drop the developer in a shell inside the chroot in case an error occurs. This makes troubleshooting of the image possible (inspect files, run commands, ...) Change-Id: I5f76e7dec64fc4c86b1515f6b81a16e11e03eadf Signed-off-by: Gwenael Lambrouin --- diff --git a/nfvbenchvm/dib/build-image.sh b/nfvbenchvm/dib/build-image.sh index 3423140..445807b 100755 --- a/nfvbenchvm/dib/build-image.sh +++ b/nfvbenchvm/dib/build-image.sh @@ -9,37 +9,65 @@ # Stop on error (see https://wizardzines.com/comics/bash-errors/) set -euo pipefail -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 -} - +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 <