1 ##############################################################################
\r
2 # Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
\r
4 # All rights reserved. This program and the accompanying materials
\r
5 # are made available under the terms of the Apache License, Version 2.0
\r
6 # which accompanies this distribution, and is available at
\r
7 # http://www.apache.org/licenses/LICENSE-2.0
\r
8 ##############################################################################
\r
10 # get the absolute path of this shell file.
\r
11 basepath=$(cd `dirname $0`; pwd)
\r
12 tmppath=$basepath/tmp_files
\r
13 docker_tmppath=/home/noroot/build_dir/conductor
\r
15 plugin_image="$group/conductor:builder"
\r
16 plugin_container="conductor-builder"
\r
17 #build the gradle project in a temp container.
\r
20 docker build -t $plugin_image -f $basepath/Dockerfile $basepath
\r
21 docker run -d --name $plugin_container $plugin_image
\r
22 docker cp $plugin_container:$docker_tmppath $tmppath/
\r
23 docker rm -f $plugin_container
\r
24 #docker rmi $plugin_image
\r
26 #build the images of conductor.
\r
27 cd $tmppath/conductor/docker
\r
28 docker-compose build
\r