flatcar-scripts/ci-automation/ci-config.env
Thilo Fromm 2d5c17cb3c ci-automation/garbage_collect: add cached release artifacts
This change extends the garbage collector for the build cache server to
remove cached release artifacts. Release artifacts are copied to the
official mirrors and do not need to remain on the build cache after a
release was published.

By default, the 10 latest releases of all channels (including LTS and
previous LTS) are kept.

Also excluded from garbage collection are:
 - Emerging new major releases (i.e. major number larger than the
   latest Alpha release)
 - channel progressions (major number exists in the lists of releases to
   keep but minor is bigger than any release)
 - patch releases (major and minor exist in list of releases to keep but
   patch level is newer than in any release)
 - SDKs (tarballs and containers) of any release in the list of releases
   to keep; i.e. the SDK in <MAJOR>.0.0 for any release to keep.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2024-01-30 14:59:00 +01:00

164 lines
6.2 KiB
Bash

# Copyright (c) 2021 The Flatcar Maintainers.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Flatcar CI static configuration
# Build cache server for build artifacts.
# Required services:
# - http and https (WITHOUT auto-redirect)
# - ssh for BUILDCACHE_USER
BUILDCACHE_SERVER="${BUILDCACHE_SERVER:-bincache.flatcar-linux.net}"
BUILDCACHE_PATH_PREFIX="/srv/bincache"
BUILDCACHE_USER="bincache"
RELEASES_SERVER="mirror.release.flatcar-linux.net"
CONTAINER_REGISTRY="ghcr.io/flatcar"
RELEASES_JSON_FEED="https://www.flatcar.org/releases-json/releases.json"
GC_BUCKET="flatcar-linux"
DEFAULT_HTTP_IMAGE_URL_TEMPLATE="@PROTO@://${BUILDCACHE_SERVER}/images/@ARCH@/@VERNUM@"
if ! command -v zstd > /dev/null; then
# we require zstd and it is included by default on flatcar
echo >&2 "zstd could not be found. unpacking container image may fail."
fi
CI_GIT_AUTHOR="flatcar-ci"
CI_GIT_EMAIL="infra+ci@flatcar-linux.org"
# build artifacts go here (in container)
CONTAINER_IMAGE_ROOT="/home/sdk/trunk/src/build/images"
# Set it to "1" or "true" or "t" or "y" or "yes" to always run a full
# nightly build. Any other value will allow build shortcuts.
: ${AVOID_NIGHTLY_BUILD_SHORTCUTS:=0}
#
# Image / vendor tests settings
#
# NOTE that these settings are evaluated by the vendor-tests script inside the
# SDK container. To override, new values must be passed into the container.
# Use something like
# echo "export [VAR]=\"${[VALUE]}\\"" > sdk_container/.env
# in your CI to override, e.g.
# echo "export PARALLEL_TESTS=\"5\"" > sdk_container/.env
# to override the number of test cases to be run in parallel.
# -- General --
# "tap" for TAP reports, "md" for markdown are currently supported
TEST_REPORT_FORMATS=("tap" "md")
# -- QEMU --
QEMU_IMAGE_NAME=${QEMU_IMAGE_NAME:-flatcar_production_image.bin}
QEMU_PARALLEL="${PARALLEL_TESTS:-20}"
# Whether kola can use loop devices to capture serial console output and check for error patterns
QEMU_KOLA_SKIP_MANGLE="${QEMU_KOLA_SKIP_MANGLE:-}"
# BIOS path within the SDK
QEMU_BIOS="/usr/share/qemu/bios-256k.bin"
# UEFI bios filename on build cache.
# Published by vms.sh as part of the qemu vendor build.
QEMU_UEFI_BIOS="${QEMU_UEFI_BIOS:-flatcar_production_qemu_uefi_efi_code.fd}"
# Update payload for the qemu_update.sh test.
# The default path set below is relative to TEST_WORK_DIR
QEMU_UPDATE_PAYLOAD="${QEMU_UPDATE_PAYLOAD:-tmp/flatcar_test_update.gz}"
# Devcontainer settings for isolated / local testing w/o a remote
# devcontainer server and/or binhost.
# Can optionally be set to http / https URLs to pull the dev container
# and the binpackages from.
QEMU_DEVCONTAINER_URL="${QEMU_DEVCONTAINER_URL:-}"
QEMU_DEVCONTAINER_BINHOST_URL="${QEMU_DEVCONTAINER_BINHOST_URL:-}"
QEMU_DEVCONTAINER_FILE="${QEMU_DEVCONTAINER_FILE:-}"
# -- Equinix Metal --
EQUINIXMETAL_PARALLEL="${PARALLEL_TESTS:-4}"
# Metro is a set of Equinix Metal regions
EQUINIXMETAL_amd64_METRO="${EQUINIXMETAL_amd64_METRO:-SV}"
EQUINIXMETAL_arm64_METRO="${EQUINIXMETAL_arm64_METRO:-DC}"
# Name of the Equinix Metal image
EQUINIXMETAL_IMAGE_NAME="flatcar_production_packet_image.bin.bz2"
# Storage URL required to store user-data
EQUINIXMETAL_STORAGE_URL="${EQUINIXMETAL_STORAGE_URL:-gs://flatcar-jenkins/mantle/packet}"
# Equinix Metal default AMD64 instance type
EQUINIXMETAL_amd64_INSTANCE_TYPE="${EQUINIXMETAL_amd64_INSTANCE_TYPE:-c3.small.x86}"
# Space separated list of instance types. On those instances the
# cl.internet kola test will be run if this test is selected to run.
EQUINIXMETAL_amd64_MORE_INSTANCE_TYPES="m3.small.x86 c3.medium.x86 m3.large.x86 s3.xlarge.x86 n2.xlarge.x86"
# Equinix Metal default ARM64 instance type
EQUINIXMETAL_arm64_INSTANCE_TYPE="c3.large.arm"
# Space separated list of instance types. On those instances the
# cl.internet kola test will be run if this test is selected to run.
EQUINIXMETAL_arm64_MORE_INSTANCE_TYPES=""
# -- PXE --
PXE_KERNEL_NAME="flatcar_production_pxe.vmlinuz"
PXE_IMAGE_NAME="flatcar_production_pxe_image.cpio.gz"
GCE_IMAGE_NAME="flatcar_production_gce.tar.gz"
GCE_GCS_IMAGE_UPLOAD="gs://flatcar-jenkins/developer/gce-ci"
GCE_MACHINE_TYPE="${GCE_MACHINE_TYPE:-n1-standard-2}"
GCE_PARALLEL="${PARALLEL_TESTS:-4}"
# -- Digital Ocean --
# Use the "@PROTO@" "@ARCH@", "@CHANNEL@" and "@VERNUM@" placeholders. They will
# be replaced.
: ${DIGITALOCEAN_IMAGE_URL_TEMPLATE:="${DEFAULT_HTTP_IMAGE_URL_TEMPLATE}/flatcar_production_digitalocean_image.bin.bz2"}
: ${DIGITALOCEAN_REGION:='sfo3'}
: ${DIGITALOCEAN_MACHINE_SIZE:='s-2vcpu-2gb'}
DIGITALOCEAN_PARALLEL="${PARALLEL_TESTS:-8}"
# DIGITALOCEAN_TOKEN_JSON env var is used for credentials, and should
# come from sdk_container/.env. It must be base64-encoded.
# -- VMware ESX --
: ${VMWARE_ESX_IMAGE_NAME:='flatcar_production_vmware_ova.ova'}
VMWARE_ESX_PARALLEL="${PARALLEL_TESTS:-4}"
# VMWARE_ESX_CREDS should come from sdk_container/.env and must be
# base64-encoded.
# -- AWS --
: ${AWS_amd64_INSTANCE_TYPE:="t3.small"}
# Space separated list of instance types. On those instances the
# cl.internet kola test will be run if this test is selected to run.
: ${AWS_amd64_MORE_INSTANCE_TYPES:="m4.2xlarge"}
: ${AWS_arm64_INSTANCE_TYPE:="a1.large"}
# Space separated list of instance types. On those instances the
# cl.internet kola test will be run if this test is selected to run.
: ${AWS_arm64_MORE_INSTANCE_TYPES:=""}
: ${AWS_IAM_PROFILE:="ciauto-test"}
: ${AWS_REGION:="us-east-1"}
: ${AWS_AMI_ID:=""}
AWS_PARALLEL="${PARALLEL_TESTS:-8}"
# AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY should come from
# sdk_container/.env
# -- Azure --
: ${AZURE_IMAGE_NAME:="flatcar_production_azure_image.vhd"}
: ${AZURE_amd64_MACHINE_SIZE:="Standard_D2s_v4"}
: ${AZURE_arm64_MACHINE_SIZE:="Standard_D2pls_v5"}
: ${AZURE_USE_GALLERY:=""}
: ${AZURE_USE_PRIVATE_IPS:=true}
: ${AZURE_VNET_SUBNET_NAME:="jenkins-vnet-westeurope"}
AZURE_PARALLEL="${PARALLEL_TESTS:-20}"
AZURE_LOCATION="${AZURE_LOCATION:-westeurope}"
# -- Openstack --
: ${OPENSTACK_IMAGE_NAME:='flatcar_production_openstack_image.img.gz'}
OPENSTACK_PARALLEL="${PARALLEL_TESTS:-3}"
# -- Brightbox --
: ${BRIGHTBOX_IMAGE_NAME:='flatcar_production_openstack_image.img'}
BRIGHTBOX_PARALLEL="${PARALLEL_TESTS:-1}"
: ${BRIGHTBOX_SERVER_TYPE:="2gb.ssd"}