blob: 6342857c7d4dab2876a3eadae6aca550ec572969 [file] [log] [blame]
Gary Wu4885ce62018-05-07 12:27:37 -07001#!/bin/bash
2
3if [ "$#" -ne 2 ]; then
4 echo This script updates OOM helm charts to use versions in docker-manifest.csv
Gary Wu64c540b2018-05-09 15:04:32 -07005 echo "$0 <docker-manifest.csv> <oom repo directory>"
Gary Wu4885ce62018-05-07 12:27:37 -07006 exit 1
7fi
8
9# expected parameters
10MANIFEST=$(realpath $1)
11OOM_DIR=$(realpath $2)
12
13if [ -z "$WORKSPACE" ]; then
14 export WORKSPACE=`git rev-parse --show-toplevel`
15fi
16
Gary Wu4885ce62018-05-07 12:27:37 -070017cd $OOM_DIR/kubernetes
18
19for line in $(tail -n +2 $MANIFEST); do
20 image=$(echo $line | cut -d , -f 1)
21 tag=$(echo $line | cut -s -d , -f 2)
Gary Wu44f836b2018-05-10 23:54:22 -070022 perl -p -i -e "s|$image(:.*$\|$)|$image:$tag|g" $(find ./ -name values.yaml)
Gary Wu4885ce62018-05-07 12:27:37 -070023done
24