3 if [ "$#" -ne 2 ]; then
4 echo This script adds new docker images from OOM helm charts into docker-manifest.csv
5 echo "$0 <docker-manifest.csv> <oom repo directory>"
10 MANIFEST=$(realpath $1)
11 OOM_DIR=$(realpath $2)
13 if [ -z "$WORKSPACE" ]; then
14 export WORKSPACE=`git rev-parse --show-toplevel`
17 DIR=$(dirname $(readlink -f "$0"))
18 TARGET_DIR=$DIR/target
24 rgrep "image: .*" --include=values.yaml -h | cut -d ' ' -f 2 | tr -d '"'| grep -v '<' | grep -e "^onap" -e "^openecomp" | LC_ALL=C sort -u > $TARGET_DIR/oom-manifest.txt
25 touch $TARGET_DIR/docker-manifest-new-entries.txt
27 for line in $(cat $TARGET_DIR/oom-manifest.txt); do
28 image=$(echo $line | cut -d : -f 1)
29 tag=$(echo $line | cut -s -d : -f 2)
30 if [ -z "$tag" ]; then
33 if ! grep -q "$image" $MANIFEST; then
34 echo $image,$tag >> $TARGET_DIR/docker-manifest-new-entries.txt
38 cat $MANIFEST $TARGET_DIR/docker-manifest-new-entries.txt | LC_ALL=C sort -u > $MANIFEST.tmp
39 mv $MANIFEST.tmp $MANIFEST