feat(branding): update ZStack build tooling

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
lofyer
2026-08-04 14:37:07 +08:00
co-authored by factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent 145023a204
commit daffece57d
4 changed files with 19 additions and 15 deletions
+12 -8
View File
@@ -1,17 +1,17 @@
#!/usr/bin/env bash
#
# verify-image: smoke test a built MesaStack image.
# verify-image: smoke test a built ZStack AIOS image.
#
# Checks, in order:
# 1. static - gpustack version, API_KEY_PREFIX, UI assets carry our brand
# and no leftover upstream brand in index.html
# 2. runtime - boots the server, confirms / serves the MesaStack title,
# logs in and creates an API key to prove the mesastack_ prefix
# is live end to end, and that old gpustack_ keys are rejected
# 2. runtime - boots the server, confirms / serves the ZStack AIOS title,
# logs in and creates an API key to prove the zstack_ prefix
# is live end to end, and that old brand prefixes are rejected
#
# Usage:
# scripts/verify-image # verify ${NAMESPACE}/${REPOSITORY}:<workspace version>
# IMAGE=mesastack/gpustack:v2.2.1 scripts/verify-image
# IMAGE=mesastack/gpustack:v2.2.2 scripts/verify-image
# scripts/verify-image --static-only # skip booting a container
#
set -o errexit
@@ -39,10 +39,10 @@ if [[ -z "${IMAGE:-}" ]]; then
fi
SMOKE_PORT="${SMOKE_PORT:-18080}"
CONTAINER="${CONTAINER:-mesastack-verify}"
CONTAINER="${CONTAINER:-zstack-verify}"
SITE_PACKAGES="/usr/local/lib/python3.11/dist-packages"
BRAND="${BRAND:-MesaStack}"
EXPECTED_PREFIX="${EXPECTED_PREFIX:-mesastack}"
BRAND="${BRAND:-ZStack AIOS}"
EXPECTED_PREFIX="${EXPECTED_PREFIX:-zstack}"
docker image inspect "${IMAGE}" >/dev/null 2>&1 || fail "image not found locally: ${IMAGE}"
log "verifying ${IMAGE}"
@@ -74,6 +74,10 @@ check "old gpustack_ keys rejected" \
docker run --rm --entrypoint python3 "${IMAGE}" -c \
"from gpustack.security import is_valid_format as v; assert not v('gpustack_aaaa_bbbb')[0]"
check "old mesastack_ keys rejected" \
docker run --rm --entrypoint python3 "${IMAGE}" -c \
"from gpustack.security import is_valid_format as v; assert not v('mesastack_aaaa_bbbb')[0]"
check "masked value uses ${EXPECTED_PREFIX}_" \
docker run --rm --entrypoint python3 "${IMAGE}" -c \
"from gpustack.utils.api_keys import get_masked_api_key_value as m; assert m('abcd1234') == '${EXPECTED_PREFIX}_abcd***', m('abcd1234')"