From 6aa59a7141dfb66b1099ba4481b45076edb1544e Mon Sep 17 00:00:00 2001 From: Rashmi Pujar Date: Wed, 8 Mar 2017 17:17:17 -0500 Subject: 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 Former-commit-id: 86b789e39591f2cbe7810806d196b8b342e89883 --- installation/sdnc/src/main/scripts/installZips.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) mode change 100755 => 100644 installation/sdnc/src/main/scripts/installZips.sh diff --git a/installation/sdnc/src/main/scripts/installZips.sh b/installation/sdnc/src/main/scripts/installZips.sh old mode 100755 new mode 100644 index c1493969..ecff5a5f --- 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}} -- cgit 1.2.3-korg