From e3ba7092fbdc5f49efb763de03aa08705726e30c Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Thu, 12 Nov 2020 09:10:18 -0500 Subject: Cirrus: Add support for Ubuntu 20.x Previously automation always dropped the minor version number for distributions. This was intended for presentation and conditional simplicity. Bash does not support non-integer comparison natively. With the release of version 20.10, supporting testing with it and the LTS release (20.04) requires scripts to consider minor version numbers for Ubuntu VMs. This is necessary because many times in the past, some behaviors needed to be conditional on the release version number. With this commit, the images and embedded scripts/tooling uses an altered format of `$UBUNTU_NAME', `$PRIOR_UBUNTU_NAME`, and (crucially) `$OS_RELEASE_VER` and `$OS_REL_VER`. Any `.` characters appearing in the official version (from `/etc/os-release`) are dropped, and the result is concatenated. For example the current Ubuntu LTS version is `20.04`. Prior to this commit, `$OS_RELEASE_VER` would have been `20`. With this change, `$OS_RELEASE_VER` will now show `2004`. Similarly `20.10` is shown as `2010`. Signed-off-by: Chris Evich --- contrib/cirrus/runner.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'contrib/cirrus/runner.sh') diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index cc6d155f9..7f9afd1fd 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -41,7 +41,7 @@ function _run_automation() { req_env_vars CI DEST_BRANCH IMAGE_SUFFIX TEST_FLAVOR TEST_ENVIRON \ PODBIN_NAME PRIV_NAME DISTRO_NV CONTAINER USER HOME \ UID AUTOMATION_LIB_PATH SCRIPT_BASE OS_RELEASE_ID \ - OS_RELEASE_VER CG_FS_TYPE + CG_FS_TYPE bigto ooe.sh dnf install -y ShellCheck # small/quick addition $SCRIPT_BASE/shellcheck.sh } @@ -64,12 +64,6 @@ function _run_unit() { } function _run_apiv2() { - # TODO Remove once VM's with dependency - if [[ "$OS_RELEASE_ID" == "fedora" ]]; then - dnf install -y python3-docker - else - apt-get -qq -y install python3-docker - fi make localapiv2 |& logformatter } -- cgit v1.2.3-54-g00ecf