File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Copyright 2019-2020 Intel Corporation.
4+ #
5+ # SPDX-License-Identifier: Apache-2.0
6+ #
7+ # Invoke this script with a imagePullPolicy as parameter
8+ # and it will update all hard-coded imagePullPolicy
9+ # in the deployments, demos and controller code
10+ #
11+ # Adapted from https://github.com/intel/pmem-csi/
12+
13+ if [[ $# != 1 ]] || [[ " $1 " == " ?" ]] || [[ " $1 " == " --help" ]] ||
14+ [[ ! $1 =~ IfNotPresent| Always ]]; then
15+ echo " Usage: $0 <IfNotPresent|Always>" >&2
16+ exit 1
17+ fi
18+
19+ IMAGE_PULL_POLICY=$1
20+
21+ echo IMAGE_PULL_POLICY=$IMAGE_PULL_POLICY
22+
23+ sed -i -e " s;\(imagePullPolicy\:\ \).*;\1$IMAGE_PULL_POLICY ;" $( git grep -l ' imagePullPolicy' deployments/* .yaml demo/* .yaml)
24+
25+ sed -i -e " s;\(ImagePullPolicy\:\ \).*;\1\" $IMAGE_PULL_POLICY \" ,;" $( git grep -l ' ImagePullPolicy' pkg/controllers/* /* .go)
You can’t perform that action at this time.
0 commit comments