From 93a52455f67482f97c0af642d9018c0ecc3c41ff Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Thu, 20 Apr 2017 10:11:06 +0000 Subject: start-container-docker.sh: Add --prefix option and v2 interface Change-Id: I4d16c5e09d5cf155a45e066c918d5238beec72e3 --- start-container-docker.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'start-container-docker.sh') diff --git a/start-container-docker.sh b/start-container-docker.sh index fa56a001..9eebb2e0 100755 --- a/start-container-docker.sh +++ b/start-container-docker.sh @@ -13,10 +13,11 @@ set -e # - definition of ${session_host} and ${session_port}, can be used for # a remote connexion to the container usage() { - echo "Usage: $0 --arch container-arch --distro flavour [--session-host host] [--session-name name] [--task {build|test}] [--weight weight]" + echo "Usage: $0 --arch container-arch --distro flavour [--prefix prefix] [--session-host host] [--session-name name] [--task {build|test}] [--weight weight]" echo echo " container-arch: architecture (eg: amd64, i386, arm64, armhf)" echo " distro: distribution (eg: trusty)" + echo " prefix: prefix to prepend to output variables and functions" echo " session-host: hostname where the container will run, defaults to localhost" echo " useful if the name resolution does not work correctly" echo " session-name: session, in case the default '$BUILD_NUMBER-$JOB_NAME' is not suitable" @@ -33,6 +34,7 @@ exec 1>&2 container_arch= distro= +prefix= session_host= session_name= task="build" @@ -51,6 +53,11 @@ do [ x${distro} = x ] && usage shift 2 ;; + --prefix) + prefix=$2 + [ x${prefix} = x ] && usage + shift 2 + ;; --session-host) session_host=$2 [ x${session_host} = x ] && usage @@ -180,8 +187,18 @@ trap EXIT exec 1>&3 2>&4 cat <