diff options
Diffstat (limited to 'build4docker.sh')
-rw-r--r-- | build4docker.sh | 46 |
1 files changed, 8 insertions, 38 deletions
diff --git a/build4docker.sh b/build4docker.sh index 33910d8..8ecd60c 100644 --- a/build4docker.sh +++ b/build4docker.sh @@ -20,48 +20,15 @@ DIRNAME=`dirname $0` RUNHOME=`cd $DIRNAME/; pwd` echo @RUNHOME@ $RUNHOME -echo @JAVA_HOME@ $JAVA_HOME - -#build -mvn clean install - - - -#cooy +#copy RELEASE_BASE_DIR=$RUNHOME/release -CONSUL_RELEASE_DIR=${RELEASE_BASE_DIR}/msb-consul - -rm -rf $CONSUL_RELEASE_DIR -mkdir $CONSUL_RELEASE_DIR -p - -DOCKER_RUN_NAME=msb_consul -DOCKER_IMAGE_NAME=msb_consul -DOCKER_RELEASE_VERSION=0.7.5 - -cp -r $RUNHOME/consul/target/version/* ${CONSUL_RELEASE_DIR} -cp $RUNHOME/ci/build_docker_image.sh ${CONSUL_RELEASE_DIR} -#build docker image -cd ${CONSUL_RELEASE_DIR} -chmod 777 build_docker_image.sh - -#clear old version -docker rm -f ${DOCKER_RUN_NAME} -docker rmi ${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION} - - -./build_docker_image.sh -n=${DOCKER_IMAGE_NAME} -v=${DOCKER_RELEASE_VERSION} -d=./docker - -#docker run -docker run -d --net=host --name ${DOCKER_RUN_NAME} ${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION} -docker ps |grep ${DOCKER_RUN_NAME} - - RELEASE_DIR=${RELEASE_BASE_DIR}/msb-discovery DOCKER_RUN_NAME=msb_discovery DOCKER_IMAGE_NAME=msb_discovery DOCKER_RELEASE_VERSION=latest +DOCKER_REPOSITORY=nexus3.onap.org:10003 rm -rf $RELEASE_DIR mkdir $RELEASE_DIR -p @@ -74,12 +41,15 @@ cd ${RELEASE_DIR} chmod 777 build_docker_image.sh docker rm -f ${DOCKER_RUN_NAME} -docker rmi ${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION} +docker rmi ${DOCKER_REPOSITORY}/onap/msb/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION} -./build_docker_image.sh -n=${DOCKER_IMAGE_NAME} -v=${DOCKER_RELEASE_VERSION} -d=./docker +./build_docker_image.sh -n=${DOCKER_REPOSITORY}/onap/msb/${DOCKER_IMAGE_NAME} -v=${DOCKER_RELEASE_VERSION} -d=./docker #docker run -docker run -d --net=host --name ${DOCKER_RUN_NAME} ${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION} +docker run -d --net=host --name ${DOCKER_RUN_NAME} ${DOCKER_REPOSITORY}/onap/msb/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION} docker ps |grep ${DOCKER_RUN_NAME} + +echo "Pushing ${DOCKER_REPOSITORY}/onap/msb/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION}" +docker push ${DOCKER_REPOSITORY}/onap/msb/${DOCKER_IMAGE_NAME}:${DOCKER_RELEASE_VERSION} |