aboutsummaryrefslogtreecommitdiffstats
path: root/build/build.sh
blob: 96c08358f5fdde00932eb7781146845caf23ad21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
# force any errors to cause the script and job to end in failure
set -u

DIRNAME=`dirname $0`
RUNHOME=`cd $DIRNAME/; pwd`
# set variable
. $RUNHOME/env.sh

#create workdir
cd $buildDir
rm -rf $workDir
mkdir -p $workDir

cp $dockerDir/build_docker_image.sh  $workDir/
cp $dockerDir/Dockerfile  $workDir/

#build binary
cd $codeDir

export GOPATH=$GOPATH
make clean
make

cp kube2msb $workDir/

#build image
cd $workDir/
chmod a+x *.sh
ls -l

docker rmi $dockerRegistry/$appName:$appVersion
./build_docker_image.sh -n=$dockerRegistry/$appName -v=$appVersion -d=./docker