diff options
author | Arun Arora <aroraarun@vmware.com> | 2017-10-31 19:18:24 +0530 |
---|---|---|
committer | Arun Arora <aroraarun@vmware.com> | 2017-10-31 19:18:24 +0530 |
commit | b8c721dcadb78025368de9516f5f669c3c694a01 (patch) | |
tree | 4402884daa86ac38e419d313d1b10a39cf52e9fb /vesagent/docker/docker-build.sh | |
parent | d84b547bf4aa3b12109677d7d0c5a7759ead80b5 (diff) |
VMWare VESAgent changes for Staging image
1. Added rules to create and push staging image
2. Modified JAR file name to remove SNAPSHOT
3. Modified start-manager.sh to use new JAR file name
4. Optimizations in docker build script
Change-Id: I154f8a6a5d2b42f914b09c8f7a09190596483fca
Issue-ID: MULTICLOUD-8
Signed-off-by: Arun Arora <aroraarun@vmware.com>
Diffstat (limited to 'vesagent/docker/docker-build.sh')
-rwxr-xr-x | vesagent/docker/docker-build.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vesagent/docker/docker-build.sh b/vesagent/docker/docker-build.sh index 256ec04..ac2ea33 100755 --- a/vesagent/docker/docker-build.sh +++ b/vesagent/docker/docker-build.sh @@ -1,6 +1,7 @@ #!/bin/bash echo "WORKSPACE: ${WORKSPACE}" VERSION="1.0.0-SNAPSHOT" +STAGING="1.0.0-STAGING" # # Copy configurations directory @@ -32,16 +33,14 @@ fi if [ -d "${PY_DIR}" ] then - echo "Remove all dummy & test scripts" - rm -f ${PY_DIR}/dummy* - rm -f ${PY_DIR}/test* -fi - -APP_DIR=${WORKSPACE}/vesagent/docker/opt + [ -d "${APP_DIR}/py" ] && rm -rf "${APP_DIR}/py" -[ -d "${APP_DIR}/py" ] && rm -rf "${APP_DIR}/py" + cp -a ${PY_DIR} ${APP_DIR} -cp -a ${PY_DIR} ${APP_DIR} + echo "Remove all dummy & test scripts" + rm -f ${APP_DIR}/py/dummy* + rm -f ${APP_DIR}/py/test* +fi # # build the docker image. tag and then push to the remote repo @@ -65,7 +64,7 @@ function build_image { # build the image echo "Start build docker image: ${IMAGE_NAME}" cd ${WORKSPACE}/vesagent/docker/ - docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest . + docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest -t ${IMAGE_NAME}:${STAGING} . } function push_image { @@ -73,6 +72,7 @@ function push_image { echo "Start push docker image: ${IMAGE_NAME}" docker push ${IMAGE_NAME}:${VERSION} docker push ${IMAGE_NAME}:latest + docker push ${IMAGE_NAME}:${STAGING} } build_image |