Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
ci: update the way we get crio version
Browse files Browse the repository at this point in the history
We need to update how we get the value of the crio version
as the output of `crio --version` has changed since
crio 1.18.0.
This change now works with new and old versions of crio.

Fixes: #2506.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
  • Loading branch information
chavafg committed Oct 15, 2020
1 parent 97e60ee commit 265d0ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .ci/configure_crio_for_kata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ crio_config_dir="/etc/crio/crio.conf.d"
runc_flag="\/usr\/local\/bin\/crio-runc"
kata_flag="\/usr\/local\/bin\/containerd-shim-kata-v2"

minor_crio_version=$(crio --version | head -1 | cut -d '.' -f2)
minor_crio_version=$(crio --version | egrep -o "[0-9]+\.[0-9]+\.[0-9]+" | head -1 | cut -d '.' -f2)

if [ "$minor_crio_version" -ge "18" ]; then
echo "Configure runtimes map for RuntimeClass feature with drop-in configs"
Expand Down
2 changes: 1 addition & 1 deletion .ci/install_crio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ popd
echo "Set manage_ns_lifecycle to true"
network_ns_flag="manage_ns_lifecycle"
# Set ns_network_flag for CRI-O versions less than 1.17
crio_version_current=$(crio --version | head -1 | cut -d ' ' -f3)
crio_version_current=$(crio --version | egrep -o "[0-9]+\.[0-9]+\.[0-9]+" | head -1)
if [ "$(compare_versions "$crio_version_current" "1.17.0")" -eq "1" ]; then
network_ns_flag="manage_network_ns_lifecycle"
fi
Expand Down

0 comments on commit 265d0ae

Please # to comment.