2 ################################################################################
3 # Copyright (c) 2019 AT&T Intellectual Property. #
4 # Copyright (c) 2019 Nokia. #
6 # Licensed under the Apache License, Version 2.0 (the "License"); #
7 # you may not use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
10 # http://www.apache.org/licenses/LICENSE-2.0 #
12 # Unless required by applicable law or agreed to in writing, software #
13 # distributed under the License is distributed on an "AS IS" BASIS, #
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15 # See the License for the specific language governing permissions and #
16 # limitations under the License. #
17 ################################################################################
19 source ./runric_env.sh
20 if [ -z $__RICENV_SET__ ]; then
21 echo "Edit your ric_env.sh for local infrastyructure values first"
25 echo "Copy files to generated fir"
26 DIRS='kubernetes ricplt xapps'
30 cp -rf $d ./generated/
33 echo "env substitude vars in .yaml and .sh files"
34 FILELIST=$(find . \( -name "*.sh" -o -name "*.yaml" \))
35 for f in $FILELIST; do
36 echo "$f to ./generated/$f":
37 envsubst '${__RUNRICENV_GERRIT_HOST__}
38 ${__RUNRICENV_GERRIT_IP__}
39 ${__RUNRICENV_DOCKER_HOST__}
40 ${__RUNRICENV_DOCKER_IP__}
41 ${__RUNRICENV_DOCKER_PORT__}
42 ${__RUNRICENV_DOCKER_USER__}
43 ${__RUNRICENV_DOCKER_PASS__}
44 ${__RUNRICENV_HELMREPO_HOST__}
45 ${__RUNRICENV_HELMREPO_PORT__}
46 ${__RUNRICENV_HELMREPO_IP__}
47 ${__RUNRICENV_HELMREPO_USER__}
48 ${__RUNRICENV_HELMREPO_PASS__} '< $f > "./generated/$f";