diff --git a/ci-automation/ci-config.env b/ci-automation/ci-config.env index 50d36577ec..cfacd06297 100644 --- a/ci-automation/ci-config.env +++ b/ci-automation/ci-config.env @@ -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" diff --git a/ci-automation/garbage_collect.sh b/ci-automation/garbage_collect.sh index 90e1df6601..bef1db3fc8 100644 --- a/ci-automation/garbage_collect.sh +++ b/ci-automation/garbage_collect.sh @@ -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 diff --git a/ci-automation/garbage_collect_cloud.sh b/ci-automation/garbage_collect_cloud.sh index a3e105ba9f..56d9191f67 100755 --- a/ci-automation/garbage_collect_cloud.sh +++ b/ci-automation/garbage_collect_cloud.sh @@ -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 diff --git a/ci-automation/vendor-testing/akamai.sh b/ci-automation/vendor-testing/akamai.sh new file mode 100755 index 0000000000..7d5b210035 --- /dev/null +++ b/ci-automation/vendor-testing/akamai.sh @@ -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