Fix resources isues 34
This commit is contained in:
@@ -102,9 +102,12 @@ spec:
|
||||
add_service "frontend"
|
||||
fi
|
||||
|
||||
# Check for changes in shared/ directory (might affect multiple services)
|
||||
# Check for changes in shared/ directory
|
||||
# shared/ contains code used by services and gateway (NOT frontend), so rebuild them
|
||||
if echo "$CHANGED_FILES" | grep -q '^shared/'; then
|
||||
add_service "shared"
|
||||
echo "Detected changes in shared/ - triggering rebuild of all services and gateway"
|
||||
echo "services-and-gateway" > $(results.changed-services.path)
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "$CHANGED_SERVICES" ]; then
|
||||
|
||||
@@ -86,9 +86,15 @@ spec:
|
||||
|
||||
echo "Trimmed services param: '$SERVICES_PARAM'"
|
||||
|
||||
# Handle "all" case by discovering services from workspace
|
||||
if [ "$SERVICES_PARAM" = "all" ]; then
|
||||
echo "Building all services - discovering from workspace..."
|
||||
# Handle special cases for service discovery
|
||||
# "all" = all services + gateway + frontend
|
||||
# "services-and-gateway" = all services + gateway (no frontend) - used when shared/ changes
|
||||
if [ "$SERVICES_PARAM" = "all" ] || [ "$SERVICES_PARAM" = "services-and-gateway" ]; then
|
||||
if [ "$SERVICES_PARAM" = "all" ]; then
|
||||
echo "Building all services (including frontend) - discovering from workspace..."
|
||||
else
|
||||
echo "Building services and gateway (shared/ changed) - discovering from workspace..."
|
||||
fi
|
||||
echo "Workspace contents:"
|
||||
ls -la "$WORKSPACE/"
|
||||
echo "Services directory contents:"
|
||||
@@ -115,8 +121,8 @@ spec:
|
||||
SERVICES="$SERVICES,gateway"
|
||||
fi
|
||||
fi
|
||||
# Add frontend if it has Dockerfile.kubernetes
|
||||
if [ -f "$WORKSPACE/frontend/Dockerfile.kubernetes" ]; then
|
||||
# Add frontend ONLY for "all" (not for "services-and-gateway")
|
||||
if [ "$SERVICES_PARAM" = "all" ] && [ -f "$WORKSPACE/frontend/Dockerfile.kubernetes" ]; then
|
||||
if [ -z "$SERVICES" ]; then
|
||||
SERVICES="frontend"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user