Skip to content

Commit a514671

Browse files
committed
foo
1 parent 0700121 commit a514671

File tree

1 file changed

+102
-2
lines changed

1 file changed

+102
-2
lines changed

.github/workflows/helm-tests.yml

Lines changed: 102 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,113 @@ jobs:
159159
echo "Working directory: $(pwd)"
160160
echo "Environment: RELEASE_NAME=${RELEASE_NAME}, PGO_VERSION=${{ env.PGO_VERSION }}"
161161
162-
echo "Setting environment variables..."
162+
echo "=== Prerequisites Check ==="
163+
kubectl version --client
164+
helm version
165+
kubectl cluster-info
166+
kubectl get nodes
167+
168+
echo "=== Initial Helm Repository Check ==="
169+
helm repo list || echo "No repositories configured yet"
170+
171+
echo "=== Deploy Script Validation ==="
172+
if [ ! -f scripts/deploy.sh ]; then
173+
echo "❌ Deploy script not found!"
174+
ls -la scripts/ || echo "Scripts directory not found"
175+
exit 1
176+
fi
177+
178+
if [ ! -x scripts/deploy.sh ]; then
179+
echo "❌ Deploy script not executable, fixing..."
180+
chmod +x scripts/deploy.sh
181+
fi
182+
183+
echo "✅ Script validation:"
184+
ls -la scripts/deploy.sh
185+
echo "Script help test:"
186+
./scripts/deploy.sh --help | head -5
187+
188+
echo "=== Setting environment variables ==="
163189
export RELEASE_NAME="${RELEASE_NAME}"
164190
export PGO_VERSION="${{ env.PGO_VERSION }}"
165191
export GITHUB_SHA="${{ github.sha }}"
192+
export CI_MODE=true
193+
export DEBUG_MODE=true
194+
195+
echo "Environment check:"
196+
echo "RELEASE_NAME=$RELEASE_NAME"
197+
echo "PGO_VERSION=$PGO_VERSION"
198+
echo "CI_MODE=$CI_MODE"
199+
200+
echo "=== Pre-deployment cluster state ==="
201+
kubectl get ns || true
202+
kubectl get deployments --all-namespaces || true
166203
167204
echo "=== Executing deployment script ==="
168-
./scripts/deploy.sh --ci
205+
echo "Command: ./scripts/deploy.sh --ci"
206+
echo "Starting deployment at $(date)..."
207+
208+
# Run with explicit error handling
209+
if ! ./scripts/deploy.sh --ci; then
210+
DEPLOY_EXIT_CODE=$?
211+
echo "❌ Deployment script failed with exit code $DEPLOY_EXIT_CODE"
212+
213+
echo "=== Post-failure debugging ==="
214+
echo "Working directory: $(pwd)"
215+
echo "Available files: $(ls -la)"
216+
217+
echo "Helm repositories:"
218+
helm repo list || echo "No helm repositories"
219+
220+
echo "Helm releases:"
221+
helm list --all-namespaces || echo "No helm releases"
222+
223+
echo "Namespaces:"
224+
kubectl get ns || echo "Cannot get namespaces"
225+
226+
echo "Recent events:"
227+
kubectl get events --all-namespaces --sort-by='.lastTimestamp' | tail -20 || echo "Cannot get events"
228+
229+
echo "All pods:"
230+
kubectl get pods --all-namespaces || echo "Cannot get pods"
231+
232+
exit $DEPLOY_EXIT_CODE
233+
fi
234+
235+
echo "✅ Deployment completed successfully at $(date)"
236+
237+
- name: Debug Knative Integration
238+
if: always()
239+
run: |
240+
echo "=== Knative Integration Debug ==="
241+
echo "Checking Knative operator status..."
242+
kubectl get deployments -l app.kubernetes.io/name=knative-operator --all-namespaces || echo "Knative operator not found"
243+
244+
echo "=== Knative CRDs ==="
245+
kubectl get crd | grep knative || echo "No Knative CRDs found"
246+
247+
echo "=== KnativeServing Resources ==="
248+
kubectl get knativeservings --all-namespaces -o wide || echo "No KnativeServing resources"
249+
250+
echo "=== KnativeEventing Resources ==="
251+
kubectl get knativeeventings --all-namespaces -o wide || echo "No KnativeEventing resources"
252+
253+
echo "=== Knative Pods ==="
254+
kubectl get pods -n knative-serving || echo "No knative-serving namespace"
255+
kubectl get pods -n knative-eventing || echo "No knative-eventing namespace"
256+
257+
echo "=== eoapi-notifier Status ==="
258+
kubectl get pods -l app.kubernetes.io/name=eoapi-notifier -n eoapi || echo "No eoapi-notifier pods"
259+
kubectl logs -l app.kubernetes.io/name=eoapi-notifier -n eoapi --tail=10 || echo "No eoapi-notifier logs"
260+
261+
echo "=== CloudEvents Sink ==="
262+
kubectl get ksvc -n eoapi || echo "No Knative services in eoapi namespace"
263+
264+
echo "=== SinkBindings ==="
265+
kubectl get sinkbindings -n eoapi || echo "No SinkBindings in eoapi namespace"
266+
267+
echo "=== Knative Jobs and Hooks ==="
268+
kubectl get jobs -n eoapi | grep knative || echo "No Knative-related jobs"
169269
170270
- name: Validate Helm dependencies
171271
run: |

0 commit comments

Comments
 (0)