Fix resources isues 25

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

View File

@@ -72,25 +72,39 @@ spec:
# Handle "all" case by discovering services from workspace
if [ "$SERVICES_PARAM" = "all" ]; then
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=""
# Find all services with Dockerfiles
for dir in "$WORKSPACE"/services/*/; do
if [ -f "${dir}Dockerfile" ]; then
svc_name=$(basename "$dir")
if [ -z "$SERVICES" ]; then
SERVICES="$svc_name"
else
SERVICES="$SERVICES,$svc_name"
# Find all services with Dockerfiles using ls
if [ -d "$WORKSPACE/services" ]; then
for svc_name in $(ls "$WORKSPACE/services/"); do
if [ -f "$WORKSPACE/services/$svc_name/Dockerfile" ]; then
if [ -z "$SERVICES" ]; then
SERVICES="$svc_name"
else
SERVICES="$SERVICES,$svc_name"
fi
fi
fi
done
done
fi
# Add gateway if it has Dockerfile
if [ -f "$WORKSPACE/gateway/Dockerfile" ]; then
SERVICES="$SERVICES,gateway"
if [ -z "$SERVICES" ]; then
SERVICES="gateway"
else
SERVICES="$SERVICES,gateway"
fi
fi
# Add frontend if it has Dockerfile.kubernetes
if [ -f "$WORKSPACE/frontend/Dockerfile.kubernetes" ]; then
SERVICES="$SERVICES,frontend"
if [ -z "$SERVICES" ]; then
SERVICES="frontend"
else
SERVICES="$SERVICES,frontend"
fi
fi
echo "Discovered services: $SERVICES"
else