summaryrefslogtreecommitdiffstats
path: root/kubernetes/config/prepull_docker.sh
diff options
context:
space:
mode:
authormayankg2703 <mayank.gupta@amdocs.com>2018-01-31 14:09:38 +0000
committermayankg2703 <mayank.gupta@amdocs.com>2018-01-31 14:10:30 +0000
commitce1912dcd97fa23a22e31db483de6bef4e06b90b (patch)
treed8f670fbe58ef98c39bc5d920d584f4fae0c8cd4 /kubernetes/config/prepull_docker.sh
parentc2e4627285a01bae296b9097a604a9f02f98a2f9 (diff)
skip commented lines from values.yaml
Change-Id: I1dc5a109d6a98ce5f281f3cec07d423bfbb2565a Issue-ID: OOM-603 Signed-off-by: mayankg2703 <mayank.gupta@amdocs.com>
Diffstat (limited to 'kubernetes/config/prepull_docker.sh')
-rwxr-xr-xkubernetes/config/prepull_docker.sh45
1 files changed, 22 insertions, 23 deletions
diff --git a/kubernetes/config/prepull_docker.sh b/kubernetes/config/prepull_docker.sh
index e456c3e016..ef46334197 100755
--- a/kubernetes/config/prepull_docker.sh
+++ b/kubernetes/config/prepull_docker.sh
@@ -101,33 +101,32 @@ do
#parse yaml files
for line in `parse_yaml $filename`
do
- #find all image subtag inside converted values.yaml file's lines
- if echo $line | grep -q $IMAGE_TEXT ; then
- #find imageName inside line
- imageName=`echo $line | awk -F "=" '{print $2}'`
- #remove attional prefix and postfix
- imageNameFinal=`echo "$imageName" | sed -e 's/^"//' -e 's/"$//' `
-
- #check if line contain Version as a subtag in lines if yes then call docker pull with version
- if echo $line | grep -q $IMAGE_VERSION_TEXT ; then
- echo docker pull "$imageNameWithVersion":"$imageNameFinal"
- docker pull $imageNameWithVersion:$imageNameFinal &
- imageNameWithVersion=" "
- else
- #check Version is not in subtag and old scanned value is present then call docker pull without version
- if [ "$imageNameWithVersion" != " " ]; then
- echo docker pull "$imageNameWithVersion"
- docker pull $imageNameWithVersion &
- imageNameWithVersion=$imageNameFinal
+ #skiping commented line
+ if [[ ${line:0:1} != '#' ]]; then
+ #find all image subtag inside converted values.yaml file's lines
+ if echo $line | grep -q $IMAGE_TEXT ; then
+ #find imageName inside line
+ imageName=`echo $line | awk -F "=" '{print $2}'`
+ #remove attional prefix and postfix
+ imageNameFinal=`echo "$imageName" | sed -e 's/^"//' -e 's/"$//' `
+
+ #check if line contain Version as a subtag in lines if yes then call docker pull with version
+ if echo $line | grep -q $IMAGE_VERSION_TEXT ; then
+ echo docker pull "$imageNameWithVersion":"$imageNameFinal"
+ docker pull $imageNameWithVersion:$imageNameFinal &
+ imageNameWithVersion=" "
else
- imageNameWithVersion=$imageNameFinal
+ #check Version is not in subtag and old scanned value is present then call docker pull without version
+ if [ "$imageNameWithVersion" != " " ]; then
+ echo docker pull "$imageNameWithVersion"
+ docker pull $imageNameWithVersion &
+ imageNameWithVersion=$imageNameFinal
+ else
+ imageNameWithVersion=$imageNameFinal
+ fi
fi
fi
-
-
fi
-
-
done
done
# complete processing