Remove service image overrides from kustomization - use base manifest tags [skip ci]
This commit is contained in:
@@ -50,7 +50,7 @@ spec:
|
||||
if [ "$COMMIT_COUNT" -lt 2 ]; then
|
||||
echo "Not enough git history for change detection (need at least 2 commits)"
|
||||
echo "Building all services as fallback"
|
||||
echo "all" > $(results.changed-services.path)
|
||||
echo -n "all" > $(results.changed-services.path)
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -60,7 +60,7 @@ spec:
|
||||
if [ -z "$CHANGED_FILES" ]; then
|
||||
# Empty commit or something unusual - skip build
|
||||
echo "No file changes detected in last commit"
|
||||
echo "infrastructure" > $(results.changed-services.path)
|
||||
echo -n "infrastructure" > $(results.changed-services.path)
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -106,15 +106,17 @@ spec:
|
||||
# shared/ contains code used by services and gateway (NOT frontend), so rebuild them
|
||||
if echo "$CHANGED_FILES" | grep -q '^shared/'; then
|
||||
echo "Detected changes in shared/ - triggering rebuild of all services and gateway"
|
||||
echo "services-and-gateway" > $(results.changed-services.path)
|
||||
echo -n "services-and-gateway" > $(results.changed-services.path)
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# IMPORTANT: Use echo -n (no newline) to avoid trailing newline in results
|
||||
# Trailing newlines cause Tekton when expressions to fail matching
|
||||
if [ -z "$CHANGED_SERVICES" ]; then
|
||||
# Changes are in infrastructure or other non-service files
|
||||
echo "Detected: infrastructure changes only"
|
||||
echo "infrastructure" > $(results.changed-services.path)
|
||||
echo -n "infrastructure" > $(results.changed-services.path)
|
||||
else
|
||||
echo "Detected changed services: $CHANGED_SERVICES"
|
||||
echo "$CHANGED_SERVICES" > $(results.changed-services.path)
|
||||
echo -n "$CHANGED_SERVICES" > $(results.changed-services.path)
|
||||
fi
|
||||
@@ -235,17 +235,19 @@ spec:
|
||||
echo "==================================================================="
|
||||
|
||||
# Set result based on outcome
|
||||
# IMPORTANT: Use echo -n (no newline) to avoid trailing newline in results
|
||||
# Trailing newlines cause Tekton when expressions to fail matching
|
||||
if [ "$FAILED_COUNT" -gt 0 ]; then
|
||||
if [ "$SUCCESS_COUNT" -gt 0 ]; then
|
||||
echo "partial" > $(results.build-status.path)
|
||||
echo -n "partial" > $(results.build-status.path)
|
||||
echo "Build completed with some failures"
|
||||
else
|
||||
echo "failed" > $(results.build-status.path)
|
||||
echo -n "failed" > $(results.build-status.path)
|
||||
echo "All builds failed!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "success" > $(results.build-status.path)
|
||||
echo -n "success" > $(results.build-status.path)
|
||||
echo "All builds completed successfully!"
|
||||
fi
|
||||
resources:
|
||||
|
||||
@@ -79,8 +79,8 @@ spec:
|
||||
git config --global --add safe.directory "$(workspaces.source.path)"
|
||||
|
||||
# Clone the main repository (not a separate gitops repo)
|
||||
# Use internal cluster DNS which works in all environments
|
||||
REPO_URL="https://${GIT_USERNAME}:${GIT_PASSWORD}@gitea-http.gitea.svc.cluster.local:3000/bakery-admin/bakery-ia.git"
|
||||
# Use external HTTPS URL via ingress for reliable TLS connectivity
|
||||
REPO_URL="https://${GIT_USERNAME}:${GIT_PASSWORD}@gitea.bakewise.ai/bakery-admin/bakery-ia.git"
|
||||
git clone "$REPO_URL" /tmp/gitops
|
||||
|
||||
cd /tmp/gitops
|
||||
|
||||
Reference in New Issue
Block a user