X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fcommon%2Fdgbuilder%2Fresources%2Fscripts%2FcreateReleaseDir.sh;h=b037058c2be7a26494a15d5ee65a0ef39840c735;hb=d236cfc17adb248d5bd747781fd28490f255e92e;hp=38f7fe2720d73c5770d3f98eff7e29d4c4433a33;hpb=7963e804749c3e9aac77ad98baef80a3b8f9d018;p=oom.git diff --git a/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh b/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh index 38f7fe2720..b037058c2b 100755 --- a/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh +++ b/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh @@ -1,3 +1,17 @@ +# Copyright © 2018 AT&T, Amdocs, Bell Canada +# +# 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. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/bin/bash export PATH=$PATH:. appDir=$(pwd) @@ -6,7 +20,7 @@ then echo "Usage $0 releaseDir loginId emailAddress [gitLocalRepository]" echo "Note: Specify the gitLocalRepository path if you would want to be able to import flows from your local git repository" exit -fi +fi if [ ! -e "releases" ] then mkdir releases @@ -15,11 +29,11 @@ releaseDir="$1" name="Release $releaseDir" loginId="$2" emailid="$3" -dbHost="{{.Values.dbServiceName}}.{{.Release.Namespace}}" +dbHost="{{.Values.config.dbServiceName}}.{{.Release.Namespace}}" dbPort="3306" dbName="sdnctl" dbUser="sdnctl" -dbPassword="gamma" +dbPassword="{{.Values.config.dbSdnctlPassword}}" gitLocalRepository="$4" lastPort=$(find "releases/" -name "customSettings.js" |xargs grep uiPort|cut -d: -f2|sed -e s/,//|sort|tail -1) @@ -71,12 +85,18 @@ then echo " 'dbUser': '$dbUser'," >>$customSettingsFile echo " 'dbPassword': '$dbPassword'," >>$customSettingsFile echo " 'gitLocalRepository': '$gitLocalRepository'" >>$customSettingsFile + echo " 'restConfUrl': '$restConfUrl'," >>$customSettingsFile + echo " 'restConfUser': '$restConfUser'," >>$customSettingsFile + echo " 'restConfPassword': '$restConfPassword'," >>$customSettingsFile + echo " 'formatXML': '$formatXML'," >>$customSettingsFile + echo " 'formatJSON': '$formatJSON'," >>$customSettingsFile + echo " 'enableHttps': true" >>$customSettingsFile echo " }" >>$customSettingsFile fi #echo "Created custom settings file $customSettingsFile" echo "Done ....." else - echo "ERROR:customSettings file $customSettingsFile already exists for $releaseDir" + echo "ERROR:customSettings file $customSettingsFile already exists for $releaseDir" exit fi #echo "Content of custom settings file" @@ -86,20 +106,20 @@ fi svclogicPropFile="./conf/svclogic.properties" if [ ! -d "${appDir}/yangFiles" ] then - mkdir -p "${appDir}/yangFiles" + mkdir -p "${appDir}/yangFiles" fi if [ ! -d "${appDir}/generatedJS" ] then - mkdir -p "${appDir}/generatedJS" + mkdir -p "${appDir}/generatedJS" fi if [ ! -e "./$svclogicPropFile" ] then echo "org.onap.ccsdk.sli.dbtype=jdbc" >$svclogicPropFile - echo "org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.dbServiceName}}.{{.Release.Namespace}}:3306/sdnctl" >>$svclogicPropFile + echo "org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.dbServiceName}}.{{.Release.Namespace}}:3306/sdnctl" >>$svclogicPropFile echo "org.onap.ccsdk.sli.jdbc.database=sdnctl" >>$svclogicPropFile echo "org.onap.ccsdk.sli.jdbc.user=sdnctl" >>$svclogicPropFile - echo "org.onap.ccsdk.sli.jdbc.password=gamma" >>$svclogicPropFile + echo "org.onap.ccsdk.sli.jdbc.password={{.Values.config.dbSdnctlPassword}}" >>$svclogicPropFile fi if [ ! -e "${appDir}/flowShareUsers.js" ] then