Adding build commands within the bash script
This will then be called in the nightly docker
push
Issue-ID: AAF-100
Change-Id: Iab29de26c7f9feac1b3f76666f1674ad7a267da8
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
EXPOSE 10443
-ADD auth /sms/auth/
+RUN mkdir -p /sms/auth
ADD sms /sms/bin/sms
RUN chmod +x /sms/bin/sms
BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
fi
+function generate_binary {
+ pushd ../src/sms
+ make build
+ popd
+ cp ../target/sms .
+}
+
+function remove_binary {
+ rm sms
+}
+
function build_image {
echo "Start build docker image: ${IMAGE_NAME}"
docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:latest .
push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-${TIMESTAMP}
}
+generate_binary
build_image
-#push_image
\ No newline at end of file
+push_image
+remove_binary
\ No newline at end of file
+++ /dev/null
-#!/bin/bash
-DIRNAME=`dirname $0`
-DOCKER_BUILD_DIR=`cd $DIRNAME/; pwd`
-cd ${DOCKER_BUILD_DIR}
-
-(cd ../src/sms && make build)
-cp ../target/sms .
-
-sudo ./build_image.sh