From: shuai.fu Date: Tue, 11 Jul 2017 09:19:17 +0000 (+0900) Subject: Specify building script when docker startup in obsworker. X-Git-Tag: submit/devel/20190730.074441~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=741daf79a0941cd87513ec4c134e67ad806605e9;p=tools%2Fbuild.git Specify building script when docker startup in obsworker. Change-Id: I8efa44d576e0e209120726c538280aa47eb53a02 Signed-off-by: shuai.fu --- diff --git a/build-vm-docker b/build-vm-docker index cd1558d..5e8e2d5 100644 --- a/build-vm-docker +++ b/build-vm-docker @@ -29,13 +29,14 @@ vm_verify_options_docker() { vm_startup_docker() { local name="obsbuild.${BUILD_ROOT##*/}" + local vm_init_script_docker="/.build/build" local docker_server=`cat /etc/hosts | grep docker | cut -f 1` local docker_port=`cat /etc/hosts | grep docker | cut -f 2` docker_port=${docker_port#docker} docker -H $docker_server:$docker_port rm --privileged "$name" >/dev/null 2>&1 || true docker -H $docker_server:$docker_port run --privileged\ --rm --name "$name" --cap-add=sys_admin --net=none \ - -v "$BUILD_ROOT:/mnt" busybox /bin/chroot /mnt "$vm_init_script" + -v "$BUILD_ROOT:/mnt" busybox /bin/chroot /mnt "$vm_init_script_docker" BUILDSTATUS="$?" test "$BUILDSTATUS" != 255 || BUILDSTATUS=3 cleanup_and_exit "$BUILDSTATUS"