Initial OpenECOMP appc/deployment commit
[appc/deployment.git] / installation / appc / src / main / scripts / installZips.sh
1 #!/bin/bash
2
3 APPC_HOME=${APPC_HOME:-/opt/openecomp/appc}
4 SDNC_HOME=${SDNC_HOME:-/opt/openecomp/sdnc}
5
6 targetDir=${1:-${APPC_HOME}}
7 sdnc_targetDir=${1:-${SDNC_HOME}}
8
9 featureDir=${targetDir}/features
10
11 APPC_FEATURES=" \
12  appc-iaas-adapter \
13  appc-provider \
14  appc-event-listener \
15  appc-dispatcher \
16  appc-chef-adapter \
17  appc-netconf-adapter \
18  appc-rest-adapter \
19  appc-dmaap-adapter \
20  appc-dg-util \
21  appc-metric \
22  appc-dg-shared \
23  appc-asdc-listener"
24
25 APPC_VERSION=${APPC_VERSION:-0.0.1}
26 APPC_OAM_VERSION=${APPC_OAM_VERSION:-0.1.1}
27
28 if [ ! -d ${targetDir} ]
29 then
30   mkdir -p ${targetDir}
31 fi
32
33 if [ ! -d ${featureDir} ]
34 then
35   mkdir -p ${featureDir}
36 fi
37
38 cwd=$(pwd)
39
40 mavenOpts=${2:-"-s $cwd/../../jenkins-settings.xml"}
41 cd /tmp
42
43 echo "Installing APP-C version ${APPC_VERSION}"
44 for feature in ${APPC_FEATURES}
45 do
46  rm -f /tmp/${feature}-installer*.zip
47  mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.appc:${feature}-installer:${APPC_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
48  unzip -d ${featureDir} /tmp/${feature}-installer*zip
49 done
50
51 echo "Installing platform-logic for APP-C"
52 rm -f /tmp/platform-logic-installer*.zip
53 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.appc.deployment:platform-logic-installer:${APPC_OAM_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
54 unzip -d ${targetDir} /tmp/platform-logic-installer*.zip
55
56 find ${targetDir} -name '*.sh' -exec chmod +x '{}' \;
57
58 cd $cwd
59