Update fluxcd manifests build python interpreter

The build_image_versions_to_fluxcd_manifests function is currently using
python2 interpreter and will throw an error on Debian build
environments:
  build-helm-charts.sh: line 220: python2: command not found
  Failed to update manifest file

This change just replicates what was done on this script for other
python calls that need to decide between python3 and python3.

TEST PLAN:
PASS - build-helm-charts.sh for stx-openstack-helm and
       make sure "stx-openstack-helm" tarball is generated.

Story: 2010317
Task: 46610

Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: Iab330c574c34ba548e3652fb0975e3184c462752
This commit is contained in:
Thales Elero Cervi 2022-10-19 14:56:49 -03:00
parent fc8db4848a
commit b2d1f4e745

View File

@ -217,7 +217,7 @@ function build_image_versions_to_fluxcd_manifests {
#
image_record=${IMAGE_RECORD_PATH}/$(basename ${image_record})
find ${manifest_folder} -name "*.yaml" | while read manifest_file; do
${PYTHON2:-python2} $BUILD_HELM_CHARTS_DIR/helm_chart_modify.py ${manifest_file} ${manifest_file}.tmp ${image_record}
${PYTHON_2_OR_3} $BUILD_HELM_CHARTS_DIR/helm_chart_modify.py ${manifest_file} ${manifest_file}.tmp ${image_record}
if [ $? -ne 0 ]; then
echo "Failed to update manifest file" >&2
exit 1