Skip to content

Commit

Permalink
patch operator manifests before the release
Browse files Browse the repository at this point in the history
Ensure that operator manifests are pointing to the right tag/version
before pushing a new tag.

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
  • Loading branch information
fmuyassarov authored and askervin committed Dec 29, 2023
1 parent 266f86f commit 6eb68e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hack/release-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ fi
version=$1
shift 1

container_image=ghcr.io/containers/nri-plugins/nri-plugins-operator:$version

if ! [[ $version =~ ^v[0-9]+\.[0-9]+\..+$ ]]; then
echo -e "ERROR: invalid VERSION '$version'"
exit 1
Expand All @@ -34,3 +36,9 @@ find deployment/helm -name Chart.yaml | xargs -I '{}' \
find deployment/helm -name values.yaml | xargs -I '{}' \
sed -e s"/pullPolicy:.*/pullPolicy: IfNotPresent/" -i '{}'

# Patch deployment templates
echo Patching kustomize templates to use $container_image
find deployment/operator/config/manifests/bases -name nri-plugins-operator.clusterserviceversion.yaml | xargs -I '{}' \
sed -E -e s",^([[:space:]]+)containerImage:.+$,\1containerImage: $container_image," -i '{}'
find deployment/operator/config/manager -name kustomization.yaml | xargs -I '{}' \
sed -E -e s",^([[:space:]]+)newTag:.+$,\1newTag: $version," -i '{}'

0 comments on commit 6eb68e8

Please sign in to comment.