Skip to content
Snippets Groups Projects

Stop using lsb_release

Merged Alex Iribarren requested to merge lsb_release into master
All threads resolved!
2 files
+ 30
29
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
5
@@ -342,12 +342,12 @@ while [[ ${#TOBETESTED[@]} -gt 0 ]]; do
deleteServer "${p_name}" "${TESTTYPE}-${flavor}" "puppet_tests"
else
t_Log "We're in! Running upstream tests"
if [[ $OS_DISTRO == 'RHEL' ]]; then
t_Log "Host is RHEL, setting up dependencies"
runOnServer "${p_name}" "yum -y install redhat-lsb-core"
fi
# Find the OS we're running, and the commit hash of the latest passing test. Tested machines may not have external connectivity.
centos_ver=$(runOnServer "${p_name}" "lsb_release -rs | cut -f 1 -d '.'")
centos_ver=$(runOnServer "${p_name}" "sed '/VERSION_ID/!d; s/.*\"\([0-9]\)\"/\1/' /etc/os-release")
if [[ "$centos_ver" -eq 9 ]]; then
# CentOS 9 doesn't CI tests where we expect them, so we'll use the 8 ones
centos_ver=8
fi
PASSING=$(curl -s https://ci.centos.org/job/CentOS-Core-QA-t_functional-c${centos_ver}-64/lastSuccessfulBuild/api/json | jq -r '.actions[] | select(.lastBuiltRevision) | .lastBuiltRevision.SHA1')
testStart "${TESTTYPE}-${flavor}" "upstream_centos_tests"
# Now run the actual tests
Loading