ci-automation: Opt-in the vendor tests into handling flaky setup

This commit is contained in:
Krzesimir Nowak 2022-11-08 14:01:46 +01:00
parent 818c4d0c8f
commit d416ab759a
9 changed files with 101 additions and 36 deletions

View File

@ -18,6 +18,16 @@ aws_instance_type="${!aws_instance_type_var}"
more_aws_instance_types_var="AWS_${CIA_ARCH}_MORE_INSTANCE_TYPES"
mapfile -t more_aws_instance_types < <(tr ' ' '\n' <<<"${!more_aws_instance_types_var}")
CIA_OUTPUT_MAIN_INSTANCE="${aws_instance_type}"
CIA_OUTPUT_ALL_TESTS=( "${@}" )
CIA_OUTPUT_EXTRA_INSTANCES=( "${more_aws_instance_types[@]}" )
CIA_OUTPUT_EXTRA_INSTANCE_TESTS=( 'cl.internet' )
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=aws --filter "${@}"
}
image_file='flatcar_production_ami_image.bin'
tarball="${image_file}.bz2"
@ -59,11 +69,6 @@ run_kola_tests() {
"${@}"
}
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=aws --filter "${@}"
}
# these are set in ci-config.env
export AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY

View File

@ -18,6 +18,21 @@ azure_instance_type_var="AZURE_${CIA_ARCH}_MACHINE_SIZE"
azure_instance_type="${!azure_instance_type_var}"
azure_vnet_subnet_name="jenkins-vnet-${AZURE_LOCATION}"
other_instance_types=()
if [[ "${CIA_ARCH}" = 'amd64' ]]; then
other_instance_types+=('V1')
fi
CIA_OUTPUT_MAIN_INSTANCE="${azure_instance_type}"
CIA_OUTPUT_ALL_TESTS=( "${@}" )
CIA_OUTPUT_EXTRA_INSTANCES=( "${other_instance_types[@]}" )
CIA_OUTPUT_EXTRA_INSTANCE_TESTS=( 'cl.internet' )
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=azure --filter "${@}"
}
azure_profile_config_file=''
secret_to_file azure_profile_config_file "${AZURE_PROFILE}"
azure_auth_config_file=''
@ -69,16 +84,6 @@ run_kola_tests() {
"${@}"
}
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=azure --filter "${@}"
}
other_instance_types=()
if [[ "${CIA_ARCH}" = 'amd64' ]]; then
other_instance_types+=('V1')
fi
run_kola_tests_on_instances \
"${azure_instance_type}" \
"${CIA_TAPFILE}" \

View File

@ -22,6 +22,16 @@ if [[ "${CIA_ARCH}" == "arm64" ]]; then
exit 1
fi
CIA_OUTPUT_MAIN_INSTANCE="${DIGITALOCEAN_MACHINE_SIZE}"
CIA_OUTPUT_ALL_TESTS=( "${@}" )
CIA_OUTPUT_EXTRA_INSTANCES=()
CIA_OUTPUT_EXTRA_INSTANCE_TESTS=()
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=do --filter "${@}"
}
image_name="ci-${CIA_VERNUM//+/-}"
image_url="$(url_from_template "${DIGITALOCEAN_IMAGE_URL_TEMPLATE}" "${CIA_ARCH}" "${CIA_CHANNEL}" 'https' "${CIA_VERNUM}")"

View File

@ -20,6 +20,16 @@ EQUINIXMETAL_INSTANCE_TYPE="${!EQUINIXMETAL_INSTANCE_TYPE_VAR}"
MORE_INSTANCE_TYPES_VAR="EQUINIXMETAL_${CIA_ARCH}_MORE_INSTANCE_TYPES"
mapfile -t MORE_INSTANCE_TYPES < <(tr ' ' '\n' <<<"${!MORE_INSTANCE_TYPES_VAR}")
CIA_OUTPUT_MAIN_INSTANCE="${EQUINIXMETAL_INSTANCE_TYPE}"
CIA_OUTPUT_ALL_TESTS=( "${@}" )
CIA_OUTPUT_EXTRA_INSTANCES=( "${MORE_INSTANCE_TYPES[@]}" )
CIA_OUTPUT_EXTRA_INSTANCE_TESTS=( 'cl.internet' )
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=equinixmetal --filter "${@}"
}
# The maximum is 6h coming from the ore GC duration parameter
timeout=6h
@ -49,11 +59,6 @@ run_kola_tests() {
"${@}"
}
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=equinixmetal --filter "${@}"
}
run_kola_tests_on_instances \
"${EQUINIXMETAL_INSTANCE_TYPE}" \
"${CIA_TAPFILE}" \

View File

@ -22,6 +22,16 @@ if [[ "${CIA_ARCH}" == "arm64" ]]; then
exit 1
fi
CIA_OUTPUT_MAIN_INSTANCE='default'
CIA_OUTPUT_ALL_TESTS=( "${@}" )
CIA_OUTPUT_EXTRA_INSTANCES=( 'gvnic' )
CIA_OUTPUT_EXTRA_INSTANCE_TESTS=( 'cl.internet' )
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=gce --filter "${@}"
}
GCP_JSON_KEY_PATH=''
secret_to_file GCP_JSON_KEY_PATH "${GCP_JSON_KEY}"
@ -66,11 +76,6 @@ run_kola_tests() {
"${@}"
}
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=gce --filter "${@}"
}
run_kola_tests_on_instances \
"default" \
"${CIA_TAPFILE}" \

View File

@ -22,6 +22,16 @@ if [[ "${CIA_ARCH}" == "arm64" ]]; then
exit 1
fi
CIA_OUTPUT_MAIN_INSTANCE='default'
CIA_OUTPUT_ALL_TESTS=( "${@}" )
CIA_OUTPUT_EXTRA_INSTANCES=()
CIA_OUTPUT_EXTRA_INSTANCE_TESTS=()
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=openstack --filter "${@}"
}
# OPENSTACK_CREDS, OPENSTACK_USER, OPENSTACK_HOST, OPENSTACK_KEYFILE should be provided by sdk_container/.env
config_file=''
secret_to_file config_file "${OPENSTACK_CREDS}"

View File

@ -21,6 +21,16 @@ if [ "${CIA_ARCH}" = "arm64" ] && [ "${CIA_TESTSCRIPT}" != "qemu_uefi.sh" ] ; th
exit 1
fi
CIA_OUTPUT_MAIN_INSTANCE='default'
CIA_OUTPUT_ALL_TESTS=( "${@}" )
CIA_OUTPUT_EXTRA_INSTANCES=()
CIA_OUTPUT_EXTRA_INSTANCE_TESTS=()
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=qemu --filter "${@}"
}
# Fetch image and BIOS if not present
if [ -f "${QEMU_IMAGE_NAME}" ] ; then
echo "++++ ${CIA_TESTSCRIPT}: Using existing ${QEMU_IMAGE_NAME} for testing ${CIA_VERNUM} (${CIA_ARCH}) ++++"

View File

@ -23,6 +23,22 @@ if [ "$*" != "" ] && [ "$*" != "*" ] && [[ "$*" != *"cl.update.payload" ]]; then
exit 1
fi
CIA_OUTPUT_MAIN_INSTANCE='previous'
CIA_OUTPUT_ALL_TESTS=( 'cl.update.payload' )
CIA_OUTPUT_EXTRA_INSTANCES=( 'first_dual' )
CIA_OUTPUT_EXTRA_INSTANCE_TESTS=( 'cl.update.payload' )
query_kola_tests() {
shift; # ignore the instance type
local arg
arg="${*}"
if [ "${arg}" != "" ]; then
# Empty calls are ok, which mean no tests, but otherwise we restrict the tests to run
arg="cl.update.payload"
fi
kola list --platform=qemu --filter "${arg}"
}
mkdir -p tmp/
if [ -f tmp/flatcar_test_update.gz ] ; then
echo "++++ ${CIA_TESTSCRIPT}: Using existing ./tmp/flatcar_test_update.gz for testing ${CIA_VERNUM} (${CIA_ARCH}) ++++"
@ -73,17 +89,6 @@ if [ "${CIA_ARCH}" = "arm64" ]; then
fi
fi
query_kola_tests() {
shift; # ignore the instance type
local arg
arg="${*}"
if [ "${arg}" != "" ]; then
# Empty calls are ok, which mean no tests, but otherwise we restrict the tests to run
arg="cl.update.payload"
fi
kola list --platform=qemu --filter "${arg}"
}
run_kola_tests() {
local instance_type="${1}"; shift;
local instance_tapfile="${1}"; shift

View File

@ -22,6 +22,16 @@ if [[ "${CIA_ARCH}" == "arm64" ]]; then
exit 1
fi
CIA_OUTPUT_MAIN_INSTANCE='default'
CIA_OUTPUT_ALL_TESTS=( "${@}" )
CIA_OUTPUT_EXTRA_INSTANCES=()
CIA_OUTPUT_EXTRA_INSTANCE_TESTS=()
query_kola_tests() {
shift; # ignore the instance type
kola list --platform=esx --filter "${@}"
}
# Fetch image if not present.
if [ -f "${VMWARE_ESX_IMAGE_NAME}" ] ; then
echo "++++ ${CIA_TESTSCRIPT}: Using existing ${VMWARE_ESX_IMAGE_NAME} for testing ${CIA_VERNUM} (${CIA_ARCH}) ++++"