diff options
-rw-r--r-- | activiti-extension/pom.xml | 33 | ||||
-rw-r--r-- | activiti-extension/src/main/docker/activiti-docker-build_image.sh | 39 | ||||
-rw-r--r-- | pom.xml | 30 | ||||
-rw-r--r-- | wfenginemgrservice/pom.xml | 33 | ||||
-rw-r--r-- | wfenginemgrservice/src/main/docker/bin/entrypoint.sh | 2 | ||||
-rw-r--r-- | wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh | 24 |
6 files changed, 151 insertions, 10 deletions
diff --git a/activiti-extension/pom.xml b/activiti-extension/pom.xml index fbb6364..4bb9006 100644 --- a/activiti-extension/pom.xml +++ b/activiti-extension/pom.xml @@ -17,15 +17,46 @@ <groupId>org.onap.vfc.nfvo.wfengine</groupId>
<modelVersion>4.0.0</modelVersion>
<artifactId>activiti-extension</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
<name>vfc-nfvo-wfengine-activiti-extension</name>
<packaging>jar</packaging>
<properties>
+ <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
<ant.version>1.9.6</ant.version>
<apache-velocity.version>1.6.2</apache-velocity.version>
<jgrapht.version>0.9.1</jgrapht.version>
</properties>
-
+ <repositories>
+ <repository>
+ <id>wfengine-releases</id>
+ <url>https://nexus.onap.org/content/repositories/releases</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ <checksumPolicy>fail</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>wfengine-snapshots</id>
+ <url>https://nexus.onap.org/content/repositories/snapshots</url>
+ <releases>
+ <enabled>false</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ <checksumPolicy>fail</checksumPolicy>
+ </snapshots>
+ </repository>
+ </repositories>
<build>
<plugins>
<plugin>
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 51c523c..b6aefec 100644 --- a/activiti-extension/src/main/docker/activiti-docker-build_image.sh +++ b/activiti-extension/src/main/docker/activiti-docker-build_image.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env /bin/bash DIRNAME=`dirname $0` DOCKER_BUILD_DIR=`cd $DIRNAME/; pwd` @@ -16,8 +16,28 @@ IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" POM_DIR="../../../" cd ${POM_DIR} -VERSION=$(printf 'VER\t${project.version}'|mvn help:evaluate|grep '^VER'|cut -f2|echo) -#VERSION=$(printf 'VER\t${project.version}'|mvn help:evaluate) + +mvncmd=$(whereis mvn | grep ^mvn |awk '{print $2}') +echo mvncmd=$mvncmd +if [[ 1$mvncmd != 1 ]]; then + echo $mvncmd +elif [ $MVN ]; then + mvncmd=$MVN +elif [ $M2_HOME ]; then + mvncmd=$M2_HOME/bin/mvn +elif [ -f "/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn" ]; then + mvncmd="/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn" +elif [ -f "/usr/share/maven/bin/mvn" ]; then + mvncmd="/usr/share/maven/bin/mvn" +else + echo "Maven is not installed, mvncmd=$mvncmd" + exit 1 +fi + +pwd +#VERSION=$(printf 'VER\t${project.version}\n0'|$mvncmd help:evaluate) +#echo "0VERSION=${VERSION}" +VERSION=$(printf 'VER\t${project.version}'|$mvncmd help:evaluate|grep '^VER'|cut -f2) echo "VERSION=${VERSION}" cd ${DOCKER_BUILD_DIR} @@ -80,7 +100,18 @@ mkdir -p ./temp/WEB-INF/lib/ cp -f activiti-extension*.jar ./temp/WEB-INF/lib/activiti-extension.jar echo "update activiti-rest.war" -$JAVA_HOME/bin/jar -uvf activiti-rest.war -C ./temp/ ./ +jarcmd=$(whereis jar | grep ^jar |awk '{print $2}') +if [ 1$jarcmd != 1 ]; then + echo $jarcmd +elif [ $JAVA_HOME ]; then + jarcmd=$JAVA_HOME/bin/jar +elif [ -f "/usr/lib/jvm/java-8-openjdk-amd64/bin/jar" ]; then + jarcmd="/usr/lib/jvm/java-8-openjdk-amd64/bin/jar" +else + 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/ cp -Rf bin/* ./build/apache-tomcat/bin @@ -27,4 +27,34 @@ <packaging>pom</packaging>
<name>vfc-nfvo-wfengine</name>
<description>vfc/nfvo/wfengine</description>
+ <repositories>
+ <repository>
+ <id>wfengine-releases</id>
+ <url>https://nexus.onap.org/content/repositories/releases</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ <checksumPolicy>fail</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>wfengine-snapshots</id>
+ <url>https://nexus.onap.org/content/repositories/snapshots</url>
+ <releases>
+ <enabled>false</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ <checksumPolicy>fail</checksumPolicy>
+ </snapshots>
+ </repository>
+ </repositories>
</project>
diff --git a/wfenginemgrservice/pom.xml b/wfenginemgrservice/pom.xml index b7ac3a2..c1ce756 100644 --- a/wfenginemgrservice/pom.xml +++ b/wfenginemgrservice/pom.xml @@ -17,15 +17,46 @@ <groupId>org.onap.vfc.nfvo.wfengine</groupId>
<modelVersion>4.0.0</modelVersion>
<artifactId>workflow-engine-mgr-service</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
<name>vfc-nfvo-wfengine-wfenginemgrservice</name>
<packaging>jar</packaging>
<properties>
+ <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
<ant.version>1.9.6</ant.version>
<apache-velocity.version>1.6.2</apache-velocity.version>
<jgrapht.version>0.9.1</jgrapht.version>
</properties>
-
+ <repositories>
+ <repository>
+ <id>wfengine-releases</id>
+ <url>https://nexus.onap.org/content/repositories/releases</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ <checksumPolicy>fail</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>wfengine-snapshots</id>
+ <url>https://nexus.onap.org/content/repositories/snapshots</url>
+ <releases>
+ <enabled>false</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ <checksumPolicy>fail</checksumPolicy>
+ </snapshots>
+ </repository>
+ </repositories>
<build>
<plugins>
<plugin>
diff --git a/wfenginemgrservice/src/main/docker/bin/entrypoint.sh b/wfenginemgrservice/src/main/docker/bin/entrypoint.sh index 8f9d084..0d056f7 100644 --- a/wfenginemgrservice/src/main/docker/bin/entrypoint.sh +++ b/wfenginemgrservice/src/main/docker/bin/entrypoint.sh @@ -27,7 +27,7 @@ echo "MSB_ADDR=${OPENPALETTE_MSB_IP}:${OPENPALETTE_MSB_PORT}" # Wait for MSB initialization echo "Wait for MSB initialization" for i in {1..5}; do - curl -sS -m 1 ${OPENPALETTE_MSB_IP}:${OPENPALETTE_MSB_PORT} > /dev/null && break + curl -sS -m 1 $OPENPALETTE_MSB_IP:$OPENPALETTE_MSB_PORT > /dev/null && break sleep $i done diff --git a/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh b/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh index 52595da..224e62d 100644 --- a/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh +++ b/wfenginemgrservice/src/main/docker/wfenginemgrservice-docker-build_image.sh @@ -1,4 +1,4 @@ -#!/bin/bash
+#!/usr/bin/env /bin/bash
DIRNAME=`dirname $0`
DOCKER_BUILD_DIR=`cd $DIRNAME/; pwd`
@@ -16,8 +16,26 @@ IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" POM_DIR="../../../"
cd ${POM_DIR}
-VERSION=$(printf 'VER\t${project.version}'|mvn help:evaluate|grep '^VER'|cut -f2|echo)
-# VERSION=$(printf 'VER\t${project.version}'|mvn help:evaluate)
+
+mvncmd=$(whereis mvn | grep ^mvn |awk '{print $2}')
+echo mvncmd=$mvncmd
+if [[ 1$mvncmd != 1 ]]; then
+ echo $mvncmd
+elif [ $MVN ]; then
+ mvncmd=$MVN
+elif [ $M2_HOME ]; then
+ mvncmd=$M2_HOME/bin/mvn
+elif [ -f "/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn" ]; then
+ mvncmd="/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn"
+elif [ -f "/usr/share/maven/bin/mvn" ]; then
+ mvncmd="/usr/share/maven/bin/mvn"
+else
+ echo "Maven is not installed, mvncmd=$mvncmd"
+ exit 1
+fi
+
+pwd
+VERSION=$(printf 'VER\t${project.version}'|$mvncmd help:evaluate|grep '^VER'|cut -f2)
echo "VERSION=${VERSION}"
cd ${DOCKER_BUILD_DIR}
|