ci-automation: add akamai testing

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Mathieu Tortuyaux 2025-05-05 15:38:40 +02:00
parent 8f9aa2130a
commit c193d0894d
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
4 changed files with 51 additions and 0 deletions

View File

@ -173,3 +173,9 @@ BRIGHTBOX_PARALLEL="${PARALLEL_TESTS:-1}"
: ${HETZNER_arm64_LOCATION:="fsn1"}
: ${HETZNER_amd64_LOCATION:="hel1"}
HETZNER_PARALLEL="${PARALLEL_TESTS:-1}"
# -- Akamai --
: ${AKAMAI_IMAGE_NAME:='flatcar_production_akamai_image.bin.gz'}
AKAMAI_PARALLEL="${PARALLEL_TESTS:-1}"
AKAMAI_REGION="us-ord"
AKAMAI_INSTANCE_TYPE="g6-standard-2"

View File

@ -263,6 +263,7 @@ function _garbage_collect_impl() {
--env VMWARE_ESX_CREDS \
--env OPENSTACK_CREDS \
--env BRIGHTBOX_CLIENT_ID --env BRIGHTBOX_CLIENT_SECRET \
--env AKAMAI_TOKEN \
-w /work -v "$PWD":/work "${mantle_ref}" /work/ci-automation/garbage_collect_cloud.sh
echo

View File

@ -11,6 +11,8 @@ timeout --signal=SIGQUIT 60m ore openstack gc --duration 6h \
--config-file=<(echo "${OPENSTACK_CREDS}" | base64 --decode)
timeout --signal=SIGQUIT 60m ore brightbox gc --duration 6h \
--brightbox-client-id="${BRIGHTBOX_CLIENT_ID}" --brightbox-client-secret="${BRIGHTBOX_CLIENT_SECRET}"
timeout --signal=SIGQUIT 60m ore akamai gc --duration 6h \
--akamai-token="${AKAMAI_TOKEN}"
secret_to_file aws_credentials_config_file "${AWS_CREDENTIALS}"
for channel in alpha beta stable lts; do
for arch in amd64 arm64; do

View File

@ -0,0 +1,42 @@
#!/bin/bash
# Copyright (c) 2023 The Flatcar Maintainers.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -euo pipefail
# Test execution script for Akamai vendor.
# This script is supposed to run in the mantle container.
source ci-automation/vendor_test.sh
copy_from_buildcache "images/${CIA_ARCH}/${CIA_VERNUM}/${AKAMAI_IMAGE_NAME}" .
kola_test_basename="ci-${CIA_VERNUM//[+.]/-}"
# Upload the image on Akamai.
IMAGE_ID=$(ore akamai \
--akamai-token="${AKAMAI_TOKEN}" \
--akamai-region="${AKAMAI_REGION}" \
create-image \
--name "${kola_test_basename}" \
--file="${AKAMAI_IMAGE_NAME}"
)
set -x
timeout --signal=SIGQUIT 2h kola run \
--board="${CIA_ARCH}-usr" \
--parallel="${AKAMAI_PARALLEL}" \
--tapfile="${CIA_TAPFILE}" \
--channel="${CIA_CHANNEL}" \
--basename="${kola_test_basename}" \
--platform=akamai \
--akamai-token="${AKAMAI_TOKEN}" \
--akamai-type="${AKAMAI_INSTANCE_TYPE}" \
--akamai-region="${AKAMAI_REGION}" \
--akamai-image="${IMAGE_ID}" \
--image-version "${CIA_VERNUM}" \
"${@}"
set +x