Fix resources isues 25
This commit is contained in:
@@ -72,25 +72,39 @@ 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
|
||||||
SERVICES="$SERVICES,$svc_name"
|
SERVICES="$SERVICES,$svc_name"
|
||||||
|
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
|
||||||
SERVICES="$SERVICES,gateway"
|
if [ -z "$SERVICES" ]; then
|
||||||
|
SERVICES="gateway"
|
||||||
|
else
|
||||||
|
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
|
||||||
SERVICES="$SERVICES,frontend"
|
if [ -z "$SERVICES" ]; then
|
||||||
|
SERVICES="frontend"
|
||||||
|
else
|
||||||
|
SERVICES="$SERVICES,frontend"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Discovered services: $SERVICES"
|
echo "Discovered services: $SERVICES"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user