github.com/cilium/cilium@v1.16.2/images/runtime/update-cilium-runtime-image.sh (about) 1 #!/usr/bin/env bash 2 3 # Copyright Authors of Cilium 4 # SPDX-License-Identifier: Apache-2.0 5 6 set -o xtrace 7 set -o errexit 8 set -o pipefail 9 set -o nounset 10 11 image_full=${1} 12 root_dir="$(git rev-parse --show-toplevel)" 13 14 cd "${root_dir}" 15 16 image="quay.io/cilium/cilium-runtime" 17 18 # shellcheck disable=SC2207 19 used_by=($(git grep -l CILIUM_RUNTIME_IMAGE= images/*/Dockerfile)) 20 21 for i in "${used_by[@]}" ; do 22 sed -E "s#((CILIUM_RUNTIME|BASE)_IMAGE=)${image}:.*\$#\1${image_full}#" "${i}" > "${i}.sedtmp" && mv "${i}.sedtmp" "${i}" 23 done 24 25 # shellcheck disable=SC2207 26 github_used_by=($(git grep -l "${image}:" .github/workflows/)) 27 28 for i in "${github_used_by[@]}" ; do 29 sed -E "s#${image}:.*#${image_full}#" "${i}" > "${i}.sedtmp" && mv "${i}.sedtmp" "${i}" 30 done 31 32 do_check="${CHECK:-false}" 33 if [ "${do_check}" = "true" ] ; then 34 git diff --exit-code "${used_by[@]}" || (echo "Runtime images out of date, " \ 35 "see https://docs.cilium.io/en/latest/contributing/development/images/#update-cilium-builder-runtime-images." && \ 36 exit 1) 37 fi