summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
494c42c)
CSIT-1505
Parse {os} parameter from job and use it to separate the correct
image for each distro and the correct stable package versions.
Use two vpp device image names, one for Ubuntu and one for Centos.
Centos sut image is in https://hub.docker.com/r/snergster/csit-sut-centos
Source for Centos sut image:
https://github.com/snergfdio/multivppcache/tree/master/csit-sut-centos
Change-Id: I568c82710d730c4ed0ca25bc12cb6074e1cbe27e
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
--- /dev/null
+snergster/csit-sut-centos:latest
get_test_code "${1-}" || die
get_test_tag_string || die
select_topology || die
get_test_code "${1-}" || die
get_test_tag_string || die
select_topology || die
gather_build || die
check_download_dir || die
activate_virtualenv || die
gather_build || die
check_download_dir || die
activate_virtualenv || die
# - TOPOLOGIES - Available topologies.
# - NODENESS - Node multiplicity of desired testbed.
# - FLAVOR - Node flavor string, usually describing the processor.
# - TOPOLOGIES - Available topologies.
# - NODENESS - Node multiplicity of desired testbed.
# - FLAVOR - Node flavor string, usually describing the processor.
+ # - IMAGE_VER_FILE - Name of file that contains the image version.
# Variables set:
# - WORKING_TOPOLOGY - Path to topology file.
# Variables set:
# - WORKING_TOPOLOGY - Path to topology file.
- device_image="$(< ${CSIT_DIR}/VPP_DEVICE_IMAGE)"
+ device_image="$(< ${CSIT_DIR}/${IMAGE_VER_FILE})"
case_text="${NODENESS}_${FLAVOR}"
case "${case_text}" in
"1n_skx")
case_text="${NODENESS}_${FLAVOR}"
case "${case_text}" in
"1n_skx")
+function select_os () {
+
+ set -exuo pipefail
+
+ # Variables read:
+ # - OS - os or distro for selecting container image.
+ # Variables set:
+ # - VPP_VER_FILE - Name of File in CSIT dir containing vpp stable version.
+ # - IMAGE_VER_FILE - Name of File in CSIT dir containing the image name.
+ # - PKG_SUFFIX - Suffix of OS package file name, "rpm" or "deb."
+
+ case "${OS}" in
+ "ubuntu"*)
+ IMAGE_VER_FILE="VPP_DEVICE_IMAGE_UBUNTU"
+ VPP_VER_FILE="VPP_STABLE_VER_UBUNTU_BIONIC"
+ PKG_SUFFIX="deb"
+ ;;
+ "centos"*)
+ IMAGE_VER_FILE="VPP_DEVICE_IMAGE_CENTOS"
+ VPP_VER_FILE="VPP_STABLE_VER_CENTOS"
+ PKG_SUFFIX="rpm"
+ ;;
+ *)
+ die "Unable to identify distro or os from ${OS}"
+ ;;
+ esac
+}
+
function select_topology () {
function select_topology () {
# - ${DOWNLOAD_DIR} - Files needed by tests are gathered here.
# Functions called:
# - die - Print to stderr and exit, defined in common.sh
# - ${DOWNLOAD_DIR} - Files needed by tests are gathered here.
# Functions called:
# - die - Print to stderr and exit, defined in common.sh
+ # - gather_os - Parse os parameter for OS/distro name.
# - gather_dpdk, gather_vpp, gather_ligato - See their definitions.
# Multiple other side effects are possible,
# see functions called from here for their current description.
# - gather_dpdk, gather_vpp, gather_ligato - See their definitions.
# Multiple other side effects are possible,
# see functions called from here for their current description.
# - TEST_CODE - The test selection string from environment or argument.
# - DOWNLOAD_DIR - Path to directory pybot takes the build to test from.
# - CSIT_DIR - Path to existing root of local CSIT git repository.
# - TEST_CODE - The test selection string from environment or argument.
# - DOWNLOAD_DIR - Path to directory pybot takes the build to test from.
# - CSIT_DIR - Path to existing root of local CSIT git repository.
+ # Variables set:
+ # - VPP_VERSION - VPP stable version under test.
# Files read:
# - ${CSIT_DIR}/DPDK_STABLE_VER - DPDK version to use
# by csit-vpp not-timed jobs.
# Files read:
# - ${CSIT_DIR}/DPDK_STABLE_VER - DPDK version to use
# by csit-vpp not-timed jobs.
- # - ${CSIT_DIR}/VPP_STABLE_VER_UBUNTU - VPP version to use by those.
- # - ../vpp*.deb - Relative to ${DOWNLOAD_DIR}, copied for vpp-csit jobs.
+ # - ${CSIT_DIR}/VPP_STABLE_VER_UBUNTU - Ubuntu VPP version to usee.
+ # - ../vpp*.deb|rpm - Relative to ${DOWNLOAD_DIR}, copied for vpp-csit jobs.
# Directories updated:
# - ${DOWNLOAD_DIR}, vpp-*.deb files are copied here for vpp-csit jobs.
# Directories updated:
# - ${DOWNLOAD_DIR}, vpp-*.deb files are copied here for vpp-csit jobs.
- # - ./ - Assumed ${DOWNLOAD_DIR}, vpp-*.deb files
+ # - ./ - Assumed ${DOWNLOAD_DIR}, vpp-*.deb|rpm files
# are downloaded here for csit-vpp.
# Functions called:
# - die - Print to stderr and exit, defined in common_functions.sh
# are downloaded here for csit-vpp.
# Functions called:
# - die - Print to stderr and exit, defined in common_functions.sh
warn "Downloading latest VPP packages from Packagecloud."
else
warn "Downloading stable VPP packages from Packagecloud."
warn "Downloading latest VPP packages from Packagecloud."
else
warn "Downloading stable VPP packages from Packagecloud."
- VPP_VERSION="$(<"${CSIT_DIR}/VPP_STABLE_VER_UBUNTU_BIONIC")" || {
+ VPP_VERSION="$(<"${CSIT_DIR}/${VPP_VER_FILE}")" || {
die "Read VPP stable version failed."
}
fi
die "Read VPP stable version failed."
}
fi
;;
"vpp-csit-"*)
# Use locally built packages.
;;
"vpp-csit-"*)
# Use locally built packages.
- mv "${DOWNLOAD_DIR}"/../"vpp"*".deb" "${DOWNLOAD_DIR}"/ || {
+ mv "${DOWNLOAD_DIR}"/../"vpp"*".${PKG_SUFFIX}" "${DOWNLOAD_DIR}"/ || {
die "Move command failed."
}
;;
die "Move command failed."
}
;;