4 DOCKER_BUILD_DIR=`cd $DIRNAME/; pwd`
5 echo "DOCKER_BUILD_DIR=${DOCKER_BUILD_DIR}"
8 BUILD_ARGS="--no-cache"
12 IMAGE="smsquorumclient"
13 DOCKER_REPOSITORY="nexus3.onap.org:10003"
14 IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
15 TIMESTAMP=$(date +"%Y%m%dT%H%M%S")
17 if [ $HTTP_PROXY ]; then
18 BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}"
20 if [ $HTTPS_PROXY ]; then
21 BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
23 #Need to create makefile
24 function generate_binary {
25 pushd ../src/quorumclient
28 cp ../target/quorumclient .
31 function copy_certificates {
32 cp ../src/sms/certs/aaf_root_ca.cer .
40 function build_image {
41 echo "Start build docker image: ${IMAGE_NAME}"
42 docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:latest -f quorumdockerfile .
45 function push_image_tag {
47 echo "Start push ${TAG_NAME}"
48 docker tag ${IMAGE_NAME}:latest ${TAG_NAME}
49 docker push ${TAG_NAME}
53 echo "Start push ${IMAGE_NAME}:latest"
54 docker push ${IMAGE_NAME}:latest
56 push_image_tag ${IMAGE_NAME}:${VERSION}-SNAPSHOT-latest