summaryrefslogtreecommitdiffstats
path: root/vesagent
diff options
context:
space:
mode:
Diffstat (limited to 'vesagent')
-rw-r--r--vesagent/docker/Dockerfile2
-rwxr-xr-xvesagent/docker/docker-build.sh18
-rwxr-xr-xvesagent/docker/opt/start-manager.sh2
3 files changed, 11 insertions, 11 deletions
diff --git a/vesagent/docker/Dockerfile b/vesagent/docker/Dockerfile
index 732a263..290333b 100644
--- a/vesagent/docker/Dockerfile
+++ b/vesagent/docker/Dockerfile
@@ -21,7 +21,7 @@ ADD opt /opt
#Download vesagent jar from nexus repo and place in /opt
RUN cd /opt/ && \
- wget -O /opt/vesagent-1.0.0-SNAPSHOT.jar 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack.vmware&a=vesagent&v=LATEST&e=jar'
+ wget -O /opt/vesagent-1.0.0.jar 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack.vmware&a=vesagent&v=LATEST&e=jar'
# Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt
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
diff --git a/vesagent/docker/opt/start-manager.sh b/vesagent/docker/opt/start-manager.sh
index 76adfe4..735f0d9 100755
--- a/vesagent/docker/opt/start-manager.sh
+++ b/vesagent/docker/opt/start-manager.sh
@@ -1,4 +1,4 @@
#!/bin/bash
# TODO: Enable the below command to execute the VESAgent process
-exec java -jar /opt/vesagent-1.0.0-SNAPSHOT.jar /opt/etc/Agent.properties
+exec java -jar /opt/vesagent-1.0.0.jar /opt/etc/Agent.properties
#while :; do echo 'sleeping for 3600 secs'; sleep 3600; done