test: align release gates with installation config

This commit is contained in:
Codex
2026-08-31 15:59:39 +02:00
parent b4b97436e1
commit e82fe8d322
7 changed files with 28 additions and 15 deletions
+12 -7
View File
@@ -20,7 +20,8 @@ done
printf '%s\n' '{}' >"$tmp/pi-auth.json"
printf '%s\n' 'THT_MODEL_API_KEY=fixture-model-api-key' >"$tmp/thothii.secrets"
chmod 0600 "$tmp/pi-auth.json" "$tmp/thothii.secrets"
printf '%s\n' 'schema_version: 1' >"$tmp/thothii-installation.yaml"
chmod 0600 "$tmp/pi-auth.json" "$tmp/thothii.secrets" "$tmp/thothii-installation.yaml"
mkdir -p "$tmp/data" "$tmp/pi-state" "$tmp/workspace-registry" "$tmp/auth"
chmod 0700 "$tmp/auth"
"$root/scripts/prepare-server-pi-state.sh" "$tmp/pi-state" "$(id -u)" "$(id -g)" >/dev/null
@@ -37,6 +38,7 @@ for profile in local server; do
'THT_WORKSPACE_GIT_REMOTE=https://git.example.invalid/platform/thoth-workspaces.git' \
"PI_AUTH_FILE=$tmp/pi-auth.json" \
"THT_SECRETS_FILE=$tmp/thothii.secrets" \
"THT_INSTALLATION_CONFIG_SOURCE=$tmp/thothii-installation.yaml" \
"THT_AUTH_CONFIG_ROOT=$tmp/auth"
if [[ "$profile" == server ]]; then
printf '%s\n' \
@@ -108,15 +110,18 @@ if (JSON.stringify(config).includes("fixture-model-api-key")) {
NODE
done
for profile in local server; do
manual="$root/docs/install/$profile-workspace-registry.md"
grep -Fq -- '--env-file "$THT_OPERATOR_ENV"' "$manual" \
&& grep -Fq -- "-f \"\$THT_SOURCE_ROOT/compose.yaml\" -f \"\$THT_SOURCE_ROOT/deploy/compose.$profile.yaml\"" "$manual" || {
echo "$profile manual lacks the canonical base+profile command" >&2
for manual in "$root/README.md" "$root/docs/installazione-docker-4-contesti.md"; do
grep -Fq -- './scripts/run-stack.sh' "$manual" || {
echo "${manual#"$root/"} lacks the canonical local launcher" >&2
exit 1
}
grep -Fq -- 'docker compose --env-file deploy/env/server.env' "$manual" \
&& grep -Fq -- '-f compose.yaml -f deploy/compose.server.yaml' "$manual" || {
echo "${manual#"$root/"} lacks the canonical server base+profile command" >&2
exit 1
}
if rg -q 'local-compose\.workspace-registry|server-compose\.workspace-registry' "$manual"; then
echo "$profile manual still references a superseded standalone Compose example" >&2
echo "${manual#"$root/"} still references a superseded standalone Compose example" >&2
exit 1
fi
done