fix(docs): export compose tool paths
This commit is contained in:
@@ -62,9 +62,19 @@ verify_server_public_contract() {
|
||||
|
||||
verify_manual_supported_path() {
|
||||
local profile="$1" manual="$2"
|
||||
local source_root_export='export THT_SOURCE_ROOT=/absolute/path/to/ThothII'
|
||||
local bindings_export='export THT_WORKSPACE_BINDINGS_ENV_FILE="$(pwd -P)/workspace-bindings.env"'
|
||||
local generator='"$THT_SOURCE_ROOT/scripts/generate-connector-secrets-override.sh" --bindings-env "$THT_WORKSPACE_BINDINGS_ENV_FILE" --operator-env .env --output connector-secrets.local.yaml'
|
||||
local wrapper='"$THT_SOURCE_ROOT/scripts/compose-with-preflight.sh" --env-file .env'
|
||||
|
||||
grep -Fq "$source_root_export" "$manual" || {
|
||||
echo "$profile manual does not export THT_SOURCE_ROOT for its shell commands" >&2
|
||||
return 1
|
||||
}
|
||||
grep -Fq "$bindings_export" "$manual" || {
|
||||
echo "$profile manual does not export THT_WORKSPACE_BINDINGS_ENV_FILE for its shell commands" >&2
|
||||
return 1
|
||||
}
|
||||
grep -Fq "$generator" "$manual" || {
|
||||
echo "$profile manual does not document the connector override generator" >&2
|
||||
return 1
|
||||
@@ -151,18 +161,21 @@ verify_connector_fixture() {
|
||||
}
|
||||
|
||||
verify_documented_operator_path() {
|
||||
local profile="$1" directory="$2" connector_override
|
||||
local profile="$1" directory="$2" documented_source_root="$3" connector_override
|
||||
connector_override="$directory/connector-secrets.local.yaml"
|
||||
"$root/scripts/generate-connector-secrets-override.sh" \
|
||||
--bindings-env "$directory/workspace-bindings.env" --operator-env "$directory/.env" \
|
||||
--output "$connector_override" >/dev/null
|
||||
(
|
||||
cd "$directory"
|
||||
"$root/scripts/compose-with-preflight.sh" --env-file .env \
|
||||
unset THT_SOURCE_ROOT THT_WORKSPACE_BINDINGS_ENV_FILE
|
||||
export THT_SOURCE_ROOT="$documented_source_root"
|
||||
export THT_WORKSPACE_BINDINGS_ENV_FILE="$(pwd -P)/workspace-bindings.env"
|
||||
"$THT_SOURCE_ROOT/scripts/generate-connector-secrets-override.sh" \
|
||||
--bindings-env "$THT_WORKSPACE_BINDINGS_ENV_FILE" --operator-env .env \
|
||||
--output connector-secrets.local.yaml >/dev/null
|
||||
"$THT_SOURCE_ROOT/scripts/compose-with-preflight.sh" --env-file .env \
|
||||
-f compose.workspace-registry.yaml -f git-ssh.workspace-registry.yaml \
|
||||
-f connector-secrets.local.yaml config --quiet
|
||||
)
|
||||
echo "$profile documented generator and preflight fixture passed"
|
||||
echo "$profile documented shell environment fixture passed"
|
||||
}
|
||||
|
||||
verify_copied_operator_fixtures() {
|
||||
@@ -225,8 +238,8 @@ verify_copied_operator_fixtures() {
|
||||
"THT_WS_NORTH_STAR_RESEARCH_DWH_PASSWORD_SOURCE=$ssh_dir/dwh-password" \
|
||||
"THT_WS_NORTH_STAR_RESEARCH_VECTOR_API_KEY_SOURCE=$ssh_dir/vector-api-key" >>"$ssh_dir/.env"
|
||||
cp "$root/docs/install/examples/git-ssh.workspace-registry.yaml" "$ssh_dir/git-ssh.workspace-registry.yaml"
|
||||
verify_documented_operator_path local "$ssh_dir"
|
||||
verify_documented_operator_path server "$server_dir"
|
||||
verify_documented_operator_path local "$ssh_dir" "$root"
|
||||
verify_documented_operator_path server "$server_dir" "$root"
|
||||
|
||||
cp "$root/docs/install/examples/local-compose.workspace-registry.yaml" "$connector_dir/compose.workspace-registry.yaml"
|
||||
: >"$connector_dir/dwh-password"; : >"$connector_dir/vector-password"
|
||||
|
||||
Reference in New Issue
Block a user