Updated pipeline

This commit is contained in:
Eric Gullickson
2025-12-18 12:17:21 -06:00
parent 72e23a8ba0
commit c2118bc8c1
3 changed files with 21 additions and 9 deletions

View File

@@ -25,7 +25,11 @@ echo "Injecting secrets..."
echo " Deploy path: $DEPLOY_PATH"
echo " Secrets dir: $SECRETS_DIR"
# Create secrets directory if it doesn't exist
# Clean up any incorrectly created directories and create secrets directory
if [ -e "$SECRETS_DIR" ] && [ ! -d "$SECRETS_DIR" ]; then
echo " Removing invalid secrets path..."
rm -rf "$SECRETS_DIR"
fi
mkdir -p "$SECRETS_DIR"
chmod 700 "$SECRETS_DIR"
@@ -48,6 +52,11 @@ inject_secret() {
return 1
fi
# Remove if exists as directory (cleanup from bad previous runs)
if [ -d "$target_path" ]; then
rm -rf "$target_path"
fi
# Copy the secret file
cp "$source_path" "$target_path"
chmod 600 "$target_path"