From a6e127112e38a6e4b64933cd3d6cc9c7e06ccc45 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Thu, 16 Jul 2026 14:39:54 +0200 Subject: [PATCH 1/2] vendor-testing: add OCI In this commit, we setup oraclecloud testing using SDK and Mantle. Signed-off-by: Mathieu Tortuyaux --- ci-automation/ci-config.env | 10 ++++ ci-automation/vendor-testing/oraclecloud.sh | 57 +++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100755 ci-automation/vendor-testing/oraclecloud.sh diff --git a/ci-automation/ci-config.env b/ci-automation/ci-config.env index f54c7d2cda8..f647059204b 100644 --- a/ci-automation/ci-config.env +++ b/ci-automation/ci-config.env @@ -166,3 +166,13 @@ STACKIT_IMAGE_NAME="flatcar_production_stackit_image.img" : ${STACKIT_arm64_INSTANCE_TYPE:="g1r.4d"} : ${STACKIT_arm64_LOCATION:="eu01-2"} : ${STACKIT_amd64_LOCATION:="eu01-2"} + +# -- OracleCloud -- +ORACLECLOUD_PARALLEL="${PARALLEL_TESTS:-1}" +ORACLECLOUD_IMAGE_NAME="flatcar_production_oraclecloud_image.img" +ORACLECLOUD_SUBNET_ID="ocid1.subnet.oc1.iad.aaaaaaaaafwj2g3ojrn7j2mlk4nnbaq27o4cxelrxstlaymm6ecs76xtb2aa" +: ${ORACLECLOUD_amd64_INSTANCE_TYPE:="VM.Standard.B1.1"} +# TODO: Use actual values for ARM64 +: ${ORACLECLOUD_arm64_INSTANCE_TYPE:="g1r.4d"} +: ${ORACLECLOUD_arm64_LOCATION:="YQPA:US-ASHBURN-AD-1"} +: ${ORACLECLOUD_amd64_LOCATION:="YQPA:US-ASHBURN-AD-1"} diff --git a/ci-automation/vendor-testing/oraclecloud.sh b/ci-automation/vendor-testing/oraclecloud.sh new file mode 100755 index 00000000000..ab79b3ef180 --- /dev/null +++ b/ci-automation/vendor-testing/oraclecloud.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# Copyright (c) 2025 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 OracleCloud vendor. +# This script is supposed to run in the mantle container. + +source ci-automation/vendor_test.sh + +oraclecloud_instance_type_var="ORACLECLOUD_${CIA_ARCH}_INSTANCE_TYPE" +oraclecloud_instance_type="${!oraclecloud_instance_type_var}" + +oraclecloud_location_var="ORACLECLOUD_${CIA_ARCH}_LOCATION" +oraclecloud_location="${!oraclecloud_location_var}" + +copy_from_buildcache "images/${CIA_ARCH}/${CIA_VERNUM}/${ORACLECLOUD_IMAGE_NAME}" . + +config_file='' +secret_to_file config_file "${ORACLECLOUD_CONFIG_FILE}" + +kola_test_basename="ci-${CIA_VERNUM//[+.]/-}" + +# Upload the image on OracleCloud. +IMAGE_ID=$(ore oracle \ + --oracle-config-file="${config_file}" \ + --oracle-compartment-id="${ORACLECLOUD_COMPARTMENT_ID}" \ + create-image \ + --board "${CIA_ARCH}-usr" \ + --name "${kola_test_basename}" \ + --file="${ORACLECLOUD_IMAGE_NAME}" +) + +set -x + +timeout --signal=SIGQUIT 2h kola run \ + --board="${CIA_ARCH}-usr" \ + --parallel="${ORACLECLOUD_PARALLEL}" \ + --tapfile="${CIA_TAPFILE}" \ + --channel="${CIA_CHANNEL}" \ + --basename="${kola_test_basename}" \ + --platform=oraclecloud \ + --oraclecloud-tenancy="${ORACLECLOUD_TENANCY}" \ + --oraclecloud-user="${ORACLECLOUD_USER}" \ + --oraclecloud-fingerprint="${ORACLECLOUD_FINGERPRINT}" \ + --oraclecloud-private-key=<(echo "${ORACLECLOUD_PRIVATE_KEY}" | base64 --decode) \ + --oraclecloud-image-id="${IMAGE_ID}" \ + --oraclecloud-shape="${oraclecloud_instance_type}" \ + --oraclecloud-subnet-id="${ORACLECLOUD_SUBNET_ID}" \ + --oraclecloud-availability-domain="${oraclecloud_location}" \ + --oraclecloud-compartment-id="${ORACLECLOUD_COMPARTMENT_ID}" \ + --image-version "${CIA_VERNUM}" \ + "${@}" + +set +x From 2a16c2acdd100a74acecc2ebecbc072deb1b11b6 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Thu, 16 Jul 2026 16:13:25 +0200 Subject: [PATCH 2/2] ci-automation/gc: add oci Signed-off-by: Mathieu Tortuyaux --- ci-automation/garbage_collect_cloud.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci-automation/garbage_collect_cloud.sh b/ci-automation/garbage_collect_cloud.sh index 2bfa1862fd5..ab21bf8d35a 100755 --- a/ci-automation/garbage_collect_cloud.sh +++ b/ci-automation/garbage_collect_cloud.sh @@ -25,3 +25,9 @@ for channel in alpha beta stable lts; do --aws-credentials="${aws_credentials_config_file}" done done +timeout --signal=SIGQUIT 60m ore oraclecloud gc --duration 6h \ + --oraclecloud-tenancy="${ORACLECLOUD_TENANCY}" \ + --oraclecloud-user="${ORACLECLOUD_USER}" \ + --oraclecloud-fingerprint="${ORACLECLOUD_FINGERPRINT}" \ + --oraclecloud-private-key=<(echo "${ORACLECLOUD_PRIVATE_KEY}" | base64 --decode) \ + --oraclecloud-compartment-id="${ORACLECLOUD_COMPARTMENT_ID}"