This commit is contained in:
@@ -16,6 +16,9 @@ jobs:
|
||||
name: nix label smoke
|
||||
runs-on: nix
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af6832 # v4.2.2
|
||||
|
||||
- name: Nix version and cache configuration
|
||||
run: |
|
||||
set -eu
|
||||
|
||||
+5
-2
@@ -6,8 +6,8 @@
|
||||
|
||||
Common labels for zero-idle runners:
|
||||
|
||||
- `ubuntu-latest` — default Ubuntu-style smoke / host runner path
|
||||
- `nix` — Nix-capable runner path
|
||||
- `ubuntu-latest` — persistent Ubuntu 24.04 `cx23` worker
|
||||
- `nix` — persistent Nix-capable Ubuntu `cx23` worker
|
||||
- `gross-x86` — x86 fallback chain `cx53` / `cx43` / `cx33`
|
||||
- `gross-arm` — ARM fallback chain `cax41` / `cax31` / `cax21`
|
||||
- `gross-x86-perf` — x86 performance chain `cx53` / `cpx62` / `cpx52`
|
||||
@@ -19,5 +19,8 @@ Common labels for zero-idle runners:
|
||||
|
||||
Region order for fallback: `nbg1`, then `fsn1`, then `hel1`.
|
||||
|
||||
`nix` and `ubuntu-latest` are persistent workers; only `gross-*` labels use
|
||||
zero-idle ephemeral VMs.
|
||||
|
||||
Operational details: `infra/gitea-runners/runbook.md` and
|
||||
`package/gitea-runner-controller/decide.sh`.
|
||||
|
||||
@@ -54,7 +54,9 @@ let
|
||||
"GCR_ACT_RUNNER_SHA256=${cfg.actRunnerSha256}"
|
||||
]
|
||||
++ lib.optionals (cfg.imageId != null) [ "GCR_IMAGE_ID=${cfg.imageId}" ]
|
||||
++ lib.optionals (cfg.armImageId != null) [ "GCR_ARM_IMAGE_ID=${cfg.armImageId}" ];
|
||||
++ lib.optionals (cfg.armImageId != null) [ "GCR_ARM_IMAGE_ID=${cfg.armImageId}" ]
|
||||
++ lib.optionals (cfg.nixImageId != null) [ "GCR_NIX_IMAGE_ID=${cfg.nixImageId}" ]
|
||||
++ lib.optionals (cfg.armNixImageId != null) [ "GCR_ARM_NIX_IMAGE_ID=${cfg.armNixImageId}" ];
|
||||
in
|
||||
{
|
||||
options = {
|
||||
@@ -129,6 +131,18 @@ in
|
||||
whose fallback chain includes ARM server types.
|
||||
'';
|
||||
};
|
||||
nixImageId = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
default = null;
|
||||
example = "161547269";
|
||||
description = "Hetzner Ubuntu image id used by Nix-capable x86 runners.";
|
||||
};
|
||||
armNixImageId = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
default = null;
|
||||
example = "161547270";
|
||||
description = "Hetzner Ubuntu image id used by Nix-capable ARM runners.";
|
||||
};
|
||||
actRunnerVersion = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "1.0.6";
|
||||
|
||||
@@ -111,6 +111,8 @@ in {
|
||||
enable = true;
|
||||
imageId = "424558114"; # MicroOS x86 + Hetzner datasource dhcpcd fix
|
||||
armImageId = "423979717"; # OpenSUSE MicroOS ARM K3S 2026-08-24 snapshot
|
||||
nixImageId = "161547269"; # Ubuntu 24.04 x86; Nix needs writable root
|
||||
armNixImageId = "161547270"; # Ubuntu 24.04 ARM; Nix needs writable root
|
||||
allowedRepos = [
|
||||
"hinterland/*"
|
||||
"yukkop/*"
|
||||
|
||||
@@ -22,8 +22,6 @@ gcr_server_hourly_rate() {
|
||||
|
||||
gcr_label_ttl() {
|
||||
case "$1" in
|
||||
ubuntu-latest) printf '60' ;;
|
||||
nix) printf '180' ;;
|
||||
gross-x86) printf '180' ;;
|
||||
gross-arm) printf '180' ;;
|
||||
gross-x86-perf) printf '180' ;;
|
||||
@@ -40,12 +38,6 @@ gcr_label_ttl() {
|
||||
gcr_label_candidates() {
|
||||
label="$1"
|
||||
case "$label" in
|
||||
ubuntu-latest)
|
||||
printf '%s\n' 'cx33 nbg1 amd64' 'cx33 fsn1 amd64' 'cx33 hel1 amd64'
|
||||
;;
|
||||
nix)
|
||||
printf '%s\n' 'cx33 nbg1 amd64' 'cx33 fsn1 amd64' 'cx33 hel1 amd64'
|
||||
;;
|
||||
gross-x86)
|
||||
printf '%s\n' \
|
||||
'cx53 nbg1 amd64' 'cx53 fsn1 amd64' 'cx53 hel1 amd64' \
|
||||
|
||||
@@ -8,9 +8,14 @@
|
||||
GCR_API="https://api.hetzner.cloud/v1"
|
||||
|
||||
gcr_image_id_for_arch() {
|
||||
case "$1" in
|
||||
amd64) [ -n "${GCR_IMAGE_ID:-}" ] && printf '%s' "$GCR_IMAGE_ID" ;;
|
||||
arm64) [ -n "${GCR_ARM_IMAGE_ID:-}" ] && printf '%s' "$GCR_ARM_IMAGE_ID" ;;
|
||||
arch="$1"; label="${2:-}"
|
||||
nix_image=0
|
||||
case "$label" in nix|gross-nix-*) nix_image=1 ;; esac
|
||||
case "$arch:$nix_image" in
|
||||
amd64:0) [ -n "${GCR_IMAGE_ID:-}" ] && printf '%s' "$GCR_IMAGE_ID" ;;
|
||||
arm64:0) [ -n "${GCR_ARM_IMAGE_ID:-}" ] && printf '%s' "$GCR_ARM_IMAGE_ID" ;;
|
||||
amd64:1) [ -n "${GCR_NIX_IMAGE_ID:-}" ] && printf '%s' "$GCR_NIX_IMAGE_ID" ;;
|
||||
arm64:1) [ -n "${GCR_ARM_NIX_IMAGE_ID:-}" ] && printf '%s' "$GCR_ARM_NIX_IMAGE_ID" ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
@@ -168,7 +173,7 @@ gcr_vm_create() {
|
||||
while read -r candidate_type candidate_loc candidate_arch; do
|
||||
[ -n "${candidate_type:-}" ] || continue
|
||||
candidate_n=$((candidate_n + 1))
|
||||
image_id="$(gcr_image_id_for_arch "$candidate_arch")" || {
|
||||
image_id="$(gcr_image_id_for_arch "$candidate_arch" "$label")" || {
|
||||
gcr_log warn --ns=hcloud "skip candidate[$candidate_n] label=$label arch=$candidate_arch no image"
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user