Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
66 lines
1.5 KiB
Bash
Executable File
66 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script to validate secret files before Docker Compose operations
|
|
|
|
SECRETS_DIR="./secrets"
|
|
ERRORS=0
|
|
|
|
echo "Validating secret files..."
|
|
|
|
# Check if secrets directory exists
|
|
if [ ! -d "$SECRETS_DIR" ]; then
|
|
echo "Error: Secrets directory not found at $SECRETS_DIR"
|
|
exit 1
|
|
fi
|
|
|
|
# List of required secret files
|
|
REQUIRED_SECRETS=(
|
|
"postgres_password"
|
|
"db_password_server"
|
|
"db_password_hocuspocus"
|
|
"redis_password"
|
|
"crypto_key"
|
|
"token_secret_key"
|
|
"nextauth_secret"
|
|
)
|
|
|
|
for secret in "${REQUIRED_SECRETS[@]}"; do
|
|
file="$SECRETS_DIR/$secret"
|
|
|
|
# Check if file exists
|
|
if [ ! -f "$file" ]; then
|
|
echo "❌ Missing: $file"
|
|
ERRORS=$((ERRORS + 1))
|
|
continue
|
|
fi
|
|
|
|
# Check if file is empty
|
|
if [ ! -s "$file" ]; then
|
|
echo "❌ Empty: $file"
|
|
ERRORS=$((ERRORS + 1))
|
|
continue
|
|
fi
|
|
|
|
# Check for trailing newline (required for 'read' command)
|
|
if [ "$(tail -c 1 "$file" | wc -l)" -eq 0 ]; then
|
|
echo "⚠️ No trailing newline: $file (fixing...)"
|
|
echo "" >> "$file"
|
|
fi
|
|
|
|
# Check for multiple lines (passwords should be single line)
|
|
lines=$(wc -l < "$file")
|
|
if [ "$lines" -gt 1 ]; then
|
|
echo "⚠️ Multiple lines detected in $file (expected single line)"
|
|
fi
|
|
|
|
echo "✅ Valid: $file"
|
|
done
|
|
|
|
if [ $ERRORS -gt 0 ]; then
|
|
echo ""
|
|
echo "❌ Validation failed with $ERRORS errors"
|
|
exit 1
|
|
else
|
|
echo ""
|
|
echo "✅ All secrets validated successfully"
|
|
fi |