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:
co-authored by
factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent
145023a204
commit
daffece57d
+2
-2
@@ -13,7 +13,7 @@
|
||||
#
|
||||
# Usage:
|
||||
# scripts/bootstrap # clone both, checkout the default version
|
||||
# scripts/bootstrap v2.2.1 # checkout a specific v<version>-lofyer
|
||||
# scripts/bootstrap v2.2.2 # checkout a specific v<version>-lofyer
|
||||
#
|
||||
# Existing clones are left alone (only their remotes are verified).
|
||||
#
|
||||
@@ -24,7 +24,7 @@ set -o pipefail
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/lib/common.sh"
|
||||
|
||||
# Keep in sync with the version table in AGENTS.md.
|
||||
DEFAULT_VERSION="v2.2.1"
|
||||
DEFAULT_VERSION="v2.2.2"
|
||||
VERSION="${1:-${DEFAULT_VERSION}}"
|
||||
BRANCH="${VERSION}-lofyer"
|
||||
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# build-image: one-shot build of the MesaStack control-plane image from the
|
||||
# build-image: one-shot build of the ZStack AIOS control-plane image from the
|
||||
# workspace root. Builds the rebranded frontend, overlays it plus our patched
|
||||
# backend sources onto the matching official release image, then (by default)
|
||||
# smoke tests the result.
|
||||
@@ -59,9 +59,9 @@ step "Building frontend"
|
||||
if [[ "${UI_BUILD}" == "1" ]]; then
|
||||
require_cmd npm
|
||||
if [[ "${DRY_RUN}" == "1" ]]; then
|
||||
echo "(dry-run) (cd ${UI_REPO} && npm run build)"
|
||||
echo "(dry-run) (cd ${UI_REPO} && GPUSTACK_UI_VERSION=${VERSION} npm run build)"
|
||||
else
|
||||
(cd "${UI_REPO}" && npm run build)
|
||||
(cd "${UI_REPO}" && GPUSTACK_UI_VERSION="${VERSION}" npm run build)
|
||||
fi
|
||||
else
|
||||
log "skipping frontend build (--skip-ui-build)"
|
||||
@@ -99,4 +99,4 @@ fi
|
||||
step "Done"
|
||||
log "image: ${IMAGE}"
|
||||
log "run it with:"
|
||||
echo " docker run -d --name mesastack -p 80:80 -v /var/run/docker.sock:/var/run/docker.sock ${IMAGE}"
|
||||
echo " docker run -d --name zstack-aios -p 80:80 -v /var/run/docker.sock:/var/run/docker.sock ${IMAGE}"
|
||||
|
||||
@@ -48,7 +48,7 @@ require_repos() {
|
||||
repo_branch() { git -C "${1}" rev-parse --abbrev-ref HEAD 2>/dev/null; }
|
||||
|
||||
# Extract the upstream version from a v<version>-lofyer branch name.
|
||||
# Echoes the version (e.g. v2.2.1) or fails.
|
||||
# Echoes the version (e.g. v2.2.2) or fails.
|
||||
lofyer_branch_version() {
|
||||
local branch="${1}"
|
||||
if [[ "${branch}" =~ ^(v[0-9]+\.[0-9]+\.[0-9]+[0-9A-Za-z.]*)-lofyer$ ]]; then
|
||||
|
||||
+12
-8
@@ -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')"
|
||||
|
||||
Reference in New Issue
Block a user