diff options
-rw-r--r-- | activiti-extension/src/main/docker/activiti-docker-build_image.sh | 25 | ||||
-rw-r--r-- | wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh | 10 |
2 files changed, 27 insertions, 8 deletions
diff --git a/activiti-extension/src/main/docker/activiti-docker-build_image.sh b/activiti-extension/src/main/docker/activiti-docker-build_image.sh index 0e8d9d6..67e9e7e 100644 --- a/activiti-extension/src/main/docker/activiti-docker-build_image.sh +++ b/activiti-extension/src/main/docker/activiti-docker-build_image.sh @@ -14,6 +14,10 @@ IMAGE="wfengine-activiti" DOCKER_REPOSITORY="nexus3.onap.org:10003" IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" +if [ -z $NEXUS_REPOS_URL ]; then + NEXUS_REPOS_URL="https://nexus.onap.org" +fi + POM_DIR="../../../" cd ${POM_DIR} @@ -79,8 +83,8 @@ mkdir build cp -Rf ./Dockerfile ./build echo "download Tomcat 8.5.23" -#curl "${CURLPROXY}" -m 300 -O -J -L "http://mirrors.shuosc.org/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz" -wget "http://repo1.maven.org/maven2/org/apache/tomcat/tomcat/8.5.23/tomcat-8.5.23.tar.gz" +#curl "${CURLPROXY}" -m 300 -O -J -L "${NEXUS_REPOS_URL}/content/repositories/central/org/apache/tomcat/tomcat/8.5.23/tomcat-8.5.23.tar.gz" +wget "${NEXUS_REPOS_URL}/content/repositories/central/org/apache/tomcat/tomcat/8.5.23/tomcat-8.5.23.tar.gz" tar -zxf tomcat-8.5.23.tar.gz mv apache-tomcat-8.5.23 ./build/apache-tomcat @@ -96,8 +100,8 @@ unzip -o -q activiti-5.22.0.zip "activiti-5.22.0/wars/activiti-rest.war" -d ./ mv activiti-5.22.0/wars/activiti-rest.war . echo "download activiti-extension ${VERSION}" -#curl "${CURLPROXY}" -m 600 -O -J -L "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}" -wget -O activiti-extension.jar "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}" +#curl "${CURLPROXY}" -m 600 -O -J -L "${NEXUS_REPOS_URL}/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}" +wget -O activiti-extension.jar "${NEXUS_REPOS_URL}/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}" rm -Rf ./temp/ mkdir -p ./temp/WEB-INF/lib/ cp -f activiti-extension*.jar ./temp/WEB-INF/lib/activiti-extension.jar @@ -107,13 +111,24 @@ jarcmd=$(whereis jar | grep ^jar |awk '{print $2}') if [ 1$jarcmd != 1 ]; then echo $jarcmd elif [ $JAVA_HOME ]; then - jarcmd=$JAVA_HOME/bin/jar + if [ -f "$JAVA_HOME/bin/jar"]; then + jarcmd=$JAVA_HOME/bin/jar + elif [ -f "$JAVA_HOME/../bin/jar"]; then + jarcmd=$JAVA_HOME/../bin/jar + else + echo "Jar is not installed, JAVA_HOME=$JAVA_HOME" + exit 1 + fi elif [ -f "/usr/lib/jvm/java-8-openjdk-amd64/bin/jar" ]; then jarcmd="/usr/lib/jvm/java-8-openjdk-amd64/bin/jar" +elif [ -f "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/jar" ]; then + jarcmd="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/jar" else + echo "Jar is not installed, jarcmd=$jarcmd" exit 1 fi echo "jarcmd=${jarcmd}" + $jarcmd -uvf activiti-rest.war -C ./temp/ ./ #. >/dev/null 2>&1 -C ./temp cp activiti-rest.war ./build/apache-tomcat/webapps/ diff --git a/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh b/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh index 33b1130..3cb0918 100644 --- a/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh +++ b/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh @@ -14,6 +14,10 @@ IMAGE="wfengine-mgrservice" DOCKER_REPOSITORY="nexus3.onap.org:10003" IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" +if [ -z $NEXUS_REPOS_URL ]; then + NEXUS_REPOS_URL="https://nexus.onap.org" +fi + POM_DIR="../../../" cd ${POM_DIR} env @@ -68,9 +72,9 @@ fi echo "CURLPROXY=${CURLPROXY}" rm -f ./bin/workflow-engine-mgr-service*.jar -echo "${CURLPROXY}" -m 300 -O -J -L "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=workflow-engine-mgr-service&e=jar&v=${VERSION}" LATEST -#curl "${CURLPROXY}" -m 300 -O -J -L "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=workflow-engine-mgr-service&e=jar&v=${VERSION}" -wget -O workflow-engine-mgr-service.jar "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=workflow-engine-mgr-service&e=jar&v=${VERSION}" +echo "${CURLPROXY}" -m 300 -O -J -L "${NEXUS_REPOS_URL}/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=workflow-engine-mgr-service&e=jar&v=${VERSION}" LATEST +#curl "${CURLPROXY}" -m 300 -O -J -L "${NEXUS_REPOS_URL}/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=workflow-engine-mgr-service&e=jar&v=${VERSION}" +wget -O workflow-engine-mgr-service.jar "${NEXUS_REPOS_URL}/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=workflow-engine-mgr-service&e=jar&v=${VERSION}" mv workflow-engine-mgr-service*.jar ./bin/workflow-engine-mgr-service.jar function build_image { |