Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

METAL-1087: Soft pin yq version #1668

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions 01_install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,19 @@ case $DISTRO in
;;
esac

# We use yq in a few places for processing YAML but it isn't packaged
# for CentOS/RHEL so we have to install from pip. We do not want to
# overwrite an existing installation of the golang version, though,
# so check if we have a yq before installing.
if ! which yq 2>&1 >/dev/null; then
sudo python -m pip install 'yq>=3,<4'
else
echo "Using yq from $(which yq)"
fi

# Hijack metal3-dev-env update module to use nobest
# during dnf upgrade
sudo dnf -y install jq
sudo python -m pip install yq
yq -iy '.[3].dnf.nobest = "true"' ${METAL3_DEV_ENV_PATH}/vm-setup/roles/packages_installation/tasks/centos_required_packages.yml

GO_VERSION=${GO_VERSION:-1.22.3}
Expand Down Expand Up @@ -146,16 +155,6 @@ if [[ "${NODES_PLATFORM}" == "baremetal" ]] ; then
sudo dnf -y install ipmitool
fi

# We use yq in a few places for processing YAML but it isn't packaged
# for CentOS/RHEL so we have to install from pip. We do not want to
# overwrite an existing installation of the golang version, though,
# so check if we have a yq before installing.
if ! which yq 2>&1 >/dev/null; then
sudo python -m pip install 'yq>=2.10.0'
else
echo "Using yq from $(which yq)"
fi

# needed if we are using locally built images
# We stop any systemd service so we can run in a container, since
# there's no RPM/systemd version available for RHEL8
Expand Down