Skip to content

Commit ed8c712

Browse files
robinschneidertormath1
authored andcommitted
Add STACKIT
Signed-off-by: Robin Schneider <[email protected]> Signed-off-by: Mathieu Tortuyaux <[email protected]>
1 parent fca70e4 commit ed8c712

File tree

4 files changed

+61
-0
lines changed

4 files changed

+61
-0
lines changed

ci-automation/ci-config.env

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,11 @@ HETZNER_PARALLEL="${PARALLEL_TESTS:-1}"
158158
AKAMAI_PARALLEL="${PARALLEL_TESTS:-1}"
159159
AKAMAI_REGION="us-ord"
160160
AKAMAI_INSTANCE_TYPE="g6-standard-2"
161+
162+
# -- STACKIT --
163+
STACKIT_PARALLEL="${PARALLEL_TESTS:-1}"
164+
STACKIT_IMAGE_NAME="flatcar_production_stackit_image.img"
165+
: ${STACKIT_amd64_INSTANCE_TYPE:="c2i.8"}
166+
: ${STACKIT_arm64_INSTANCE_TYPE:="g1r.4d"}
167+
: ${STACKIT_arm64_LOCATION:="eu01-2"}
168+
: ${STACKIT_amd64_LOCATION:="eu01-2"}

ci-automation/garbage_collect.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ function _garbage_collect_impl() {
262262
--env VMWARE_ESX_CREDS \
263263
--env BRIGHTBOX_CLIENT_ID --env BRIGHTBOX_CLIENT_SECRET \
264264
--env AKAMAI_TOKEN \
265+
--env STACKIT_SERVICE_ACCOUNT \
265266
-w /work -v "$PWD":/work "${mantle_ref}" /work/ci-automation/garbage_collect_cloud.sh
266267

267268
echo

ci-automation/garbage_collect_cloud.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ timeout --signal=SIGQUIT 60m ore brightbox gc --duration 6h \
99
--brightbox-client-id="${BRIGHTBOX_CLIENT_ID}" --brightbox-client-secret="${BRIGHTBOX_CLIENT_SECRET}"
1010
timeout --signal=SIGQUIT 60m ore akamai gc --duration 6h \
1111
--akamai-token="${AKAMAI_TOKEN}"
12+
timeout --signal=SIGQUIT 60m ore stackit gc --duration 6h \
13+
--stackit-service-account-key-path=<(echo "${STACKIT_SERVICE_ACCOUNT}" | base64 --decode)
1214
secret_to_file aws_credentials_config_file "${AWS_CREDENTIALS}"
1315
for channel in alpha beta stable lts; do
1416
for arch in amd64 arm64; do
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
# Copyright (c) 2025 The Flatcar Maintainers.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
6+
set -euo pipefail
7+
8+
# Test execution script for STACKIT vendor.
9+
# This script is supposed to run in the mantle container.
10+
11+
source ci-automation/vendor_test.sh
12+
13+
stackit_instance_type_var="STACKIT_${CIA_ARCH}_INSTANCE_TYPE"
14+
stackit_instance_type="${!stackit_instance_type_var}"
15+
16+
stackit_location_var="STACKIT_${CIA_ARCH}_LOCATION"
17+
stackit_location="${!stackit_location_var}"
18+
19+
copy_from_buildcache "images/${CIA_ARCH}/${CIA_VERNUM}/${STACKIT_IMAGE_NAME}" .
20+
21+
kola_test_basename="ci-${CIA_VERNUM//[+.]/-}"
22+
23+
# Upload the image on STACKIT.
24+
IMAGE_ID=$(ore stackit \
25+
--stackit-service-account-key-path=<(echo "${STACKIT_SERVICE_ACCOUNT}" | base64 --decode) \
26+
--stackit-project-id="${STACKIT_PROJECT_ID}" \
27+
create-image \
28+
--board "${CIA_ARCH}-usr" \
29+
--name "${kola_test_basename}" \
30+
--file="${STACKIT_IMAGE_NAME}"
31+
)
32+
33+
set -x
34+
35+
timeout --signal=SIGQUIT 2h kola run \
36+
--board="${CIA_ARCH}-usr" \
37+
--parallel="${STACKIT_PARALLEL}" \
38+
--tapfile="${CIA_TAPFILE}" \
39+
--channel="${CIA_CHANNEL}" \
40+
--basename="${kola_test_basename}" \
41+
--platform=stackit \
42+
--stackit-service-account-key-path=<(echo "${STACKIT_SERVICE_ACCOUNT}" | base64 --decode) \
43+
--stackit-project-id="${STACKIT_PROJECT_ID}" \
44+
--stackit-image-id="${IMAGE_ID}" \
45+
--stackit-type="${stackit_instance_type}" \
46+
--stackit-availability-zone="${stackit_location}" \
47+
--image-version "${CIA_VERNUM}" \
48+
"${@}"
49+
50+
set +x

0 commit comments

Comments
 (0)