[DOCKER] Ignore jenkins-settings.xml
[sdnc/oam.git] / installation / sdnc / src / main / scripts / installZips.sh
1 #!/bin/bash
2
3 ###
4 # ============LICENSE_START=======================================================
5 # openECOMP : SDN-C
6 # ================================================================================
7 # Copyright (C) 2017 AT&T Intellectual Property. All rights
8 #                         reserved.
9 # ================================================================================
10 # Licensed under the Apache License, Version 2.0 (the "License");
11 # you may not use this file except in compliance with the License.
12 # You may obtain a copy of the License at
13 #
14 #      http://www.apache.org/licenses/LICENSE-2.0
15 #
16 # Unless required by applicable law or agreed to in writing, software
17 # distributed under the License is distributed on an "AS IS" BASIS,
18 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 # See the License for the specific language governing permissions and
20 # limitations under the License.
21 # ============LICENSE_END=========================================================
22 ###
23
24 SDNC_HOME=${SDNC_HOME:-/opt/openecomp/sdnc}
25
26 targetDir=${1:-${SDNC_HOME}}
27 featureDir=${targetDir}/features
28
29 SDNC_CORE_FEATURES=" \
30  dblib \
31  filters \
32  sli \
33  sliPluginUtils \
34  sliapi"
35
36 SDNC_ADAPTORS_FEATURES=" \
37   aai-service \
38   mdsal-resource \
39   resource-assignment \
40   sql-resource"
41
42 SDNC_NORTHBOUND_FEATURES=" \
43   asdcApi \
44   dataChange \
45   vnfapi \
46   vnftools"
47
48 SDNC_PLUGINS_FEATURES=" \
49   properties-node \
50   restapi-call-node"
51
52
53 SDNC_CORE_VERSION=${SDNC_CORE_VERSION:-0.1.1}
54 SDNC_ADAPTORS_VERSION=${SDNC_ADAPTORS_VERSION:-0.1.1}
55 SDNC_NORTHBOUND_VERSION=${SDNC_NORTHBOUND_VERSION:-0.1.1}
56 SDNC_PLUGINS_VERSION=${SDNC_PLUGINS_VERSION:-0.1.1}
57 SDNC_OAM_VERSION=${SDNC_OAM_VERSION:-0.1.1}
58
59 if [ ! -d ${targetDir} ]
60 then
61   mkdir -p ${targetDir}
62 fi
63
64 if [ ! -d ${featureDir} ]
65 then
66   mkdir -p ${featureDir}
67 fi
68
69 cwd=$(pwd)
70
71 #mavenOpts=${2:-"-s $cwd/../../jenkins-settings.xml"}
72 cd /tmp
73
74 echo "Installing SDN-C core version ${SDNC_CORE_VERSION}"
75 for feature in ${SDNC_CORE_FEATURES}
76 do
77  rm -f /tmp/${feature}-installer*.zip
78 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.core:${feature}-installer:${SDNC_CORE_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
79  unzip -d ${featureDir} /tmp/${feature}-installer*zip
80 done
81
82 echo "Installing SDN-C adaptors version ${SDNC_ADAPTORS_VERSION}"
83 for feature in ${SDNC_ADAPTORS_FEATURES}
84 do
85  rm -f /tmp/${feature}-installer*.zip
86 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.adaptors:${feature}-installer:${SDNC_ADAPTORS_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
87  unzip -d ${featureDir} /tmp/${feature}-installer*zip
88 done
89
90 echo "Installing SDN-C northbound version ${SDNC_NORTHBOUND_VERSION}"
91 for feature in ${SDNC_NORTHBOUND_FEATURES}
92 do
93  rm -f /tmp/${feature}-installer*.zip
94 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.northbound:${feature}-installer:${SDNC_NORTHBOUND_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
95  unzip -d ${featureDir} /tmp/${feature}-installer*zip
96 done
97
98 echo "Installing SDN-C plugins version ${SDNC_PLUGINS_VERSION}"
99 for feature in ${SDNC_PLUGINS_FEATURES}
100 do
101  rm -f /tmp/${feature}-installer*.zip
102 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.plugins:${feature}-installer:${SDNC_PLUGINS_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
103  unzip -d ${featureDir} /tmp/${feature}-installer*zip
104 done
105
106
107
108 echo "Installing platform-logic"
109 rm -f /tmp/platform-logic-installer*.zip
110 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.openecomp.sdnc.oam:platform-logic-installer:${SDNC_OAM_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
111 unzip -d ${targetDir} /tmp/platform-logic-installer*.zip
112
113 find ${targetDir} -name '*.sh' -exec chmod +x '{}' \;
114
115 cd $cwd
116