aboutsummaryrefslogtreecommitdiffstats
path: root/version-manifest/src/main/scripts/update-oom-image-versions.sh
blob: 6342857c7d4dab2876a3eadae6aca550ec572969 (plain)

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single 
#!/bin/bash

if [ "$#" -ne 2 ]; then
    echo This script updates OOM helm charts to use versions in docker-manifest.csv
    echo "$0 <docker-manifest.csv> <oom repo directory>"
    exit 1
fi

# expected parameters
MANIFEST=$(realpath $1)
OOM_DIR=$(realpath $2)

if [ -z "$WORKSPACE" ]; then
    export WORKSPACE=`git rev-parse --show-toplevel`
fi

cd $OOM_DIR/kubernetes

for line in $(tail -n +2 $MANIFEST); do
    image=$(echo $line | cut -d , -f 1)
    tag=$(echo $line | cut -s -d , -f 2)
    perl -p -i -e "s|$image(:.*$\|$)|$image:$tag|g" $(find ./ -name values.yaml)
done