summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRashmi Pujar <rashmi.pujar@bell.ca>2017-03-08 17:17:17 -0500
committerRashmi Pujar <rashmi.pujar@bell.ca>2017-03-08 17:17:17 -0500
commit6aa59a7141dfb66b1099ba4481b45076edb1544e (patch)
tree043a77cf47b9d0a8859e7726f0e2c0385093cdba
parent6878ca9312b05400f9f1018e6e9250fa2458f0d4 (diff)
Add default path for mvn settings file
I believe Jenkins is settings these env variables. However, having defaults when env is not set is helpful to build images locally. Change-Id: I0a40d5ce85e114a8ebb8003c94b7f0f7e3eb6d41 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Former-commit-id: 86b789e39591f2cbe7810806d196b8b342e89883
-rw-r--r--[-rwxr-xr-x]installation/sdnc/src/main/scripts/installZips.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/installation/sdnc/src/main/scripts/installZips.sh b/installation/sdnc/src/main/scripts/installZips.sh
index c1493969..ecff5a5f 100755..100644
--- a/installation/sdnc/src/main/scripts/installZips.sh
+++ b/installation/sdnc/src/main/scripts/installZips.sh
@@ -5,14 +5,14 @@
# openECOMP : SDN-C
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights
-# reserved.
+# reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,6 +21,13 @@
# ============LICENSE_END=========================================================
###
+if [ -z "$SETTINGS_FILE" -a -z "$GLOBAL_SETTINGS_FILE" -a -s "$HOME"/.m2/settings.xml ]
+then
+ DEFAULT_MAVEN_SETTINGS=${HOME}/.m2/settings.xml
+ SETTINGS_FILE=${SETTINGS_FILE:-${DEFAULT_MAVEN_SETTINGS}}
+ GLOBAL_SETTINGS_FILE=${GLOBAL_SETTINGS_FILE:-${DEFAULT_MAVEN_SETTINGS}}
+fi
+
SDNC_HOME=${SDNC_HOME:-/opt/openecomp/sdnc}
targetDir=${1:-${SDNC_HOME}}