Fix resources isues 25

This commit is contained in:
2026-01-22 21:17:58 +01:00
parent a0128c3f7e
commit 9328d65a73

View File

@@ -72,11 +72,16 @@ spec:
# Handle "all" case by discovering services from workspace # Handle "all" case by discovering services from workspace
if [ "$SERVICES_PARAM" = "all" ]; then if [ "$SERVICES_PARAM" = "all" ]; then
echo "Building all services - discovering from workspace..." echo "Building all services - discovering from workspace..."
echo "Workspace contents:"
ls -la "$WORKSPACE/"
echo "Services directory contents:"
ls -la "$WORKSPACE/services/" || echo "No services directory"
SERVICES="" SERVICES=""
# Find all services with Dockerfiles # Find all services with Dockerfiles using ls
for dir in "$WORKSPACE"/services/*/; do if [ -d "$WORKSPACE/services" ]; then
if [ -f "${dir}Dockerfile" ]; then for svc_name in $(ls "$WORKSPACE/services/"); do
svc_name=$(basename "$dir") if [ -f "$WORKSPACE/services/$svc_name/Dockerfile" ]; then
if [ -z "$SERVICES" ]; then if [ -z "$SERVICES" ]; then
SERVICES="$svc_name" SERVICES="$svc_name"
else else
@@ -84,14 +89,23 @@ spec:
fi fi
fi fi
done done
fi
# Add gateway if it has Dockerfile # Add gateway if it has Dockerfile
if [ -f "$WORKSPACE/gateway/Dockerfile" ]; then if [ -f "$WORKSPACE/gateway/Dockerfile" ]; then
if [ -z "$SERVICES" ]; then
SERVICES="gateway"
else
SERVICES="$SERVICES,gateway" SERVICES="$SERVICES,gateway"
fi fi
fi
# Add frontend if it has Dockerfile.kubernetes # Add frontend if it has Dockerfile.kubernetes
if [ -f "$WORKSPACE/frontend/Dockerfile.kubernetes" ]; then if [ -f "$WORKSPACE/frontend/Dockerfile.kubernetes" ]; then
if [ -z "$SERVICES" ]; then
SERVICES="frontend"
else
SERVICES="$SERVICES,frontend" SERVICES="$SERVICES,frontend"
fi fi
fi
echo "Discovered services: $SERVICES" echo "Discovered services: $SERVICES"
else else
SERVICES="$SERVICES_PARAM" SERVICES="$SERVICES_PARAM"