Skip to content

Commit

Permalink
fix: full tail + previous logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mjnagel authored Dec 14, 2024
1 parent 73f5aed commit e652d9f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/actions/save-logs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ runs:
uds zarf tools kubectl get pods -n pepr-system
echo "::endgroup::"
echo "::group::Fetch pepr logs"
uds zarf tools kubectl logs -n pepr-system -l app=pepr-uds-core > /tmp/pepr-logs.log
uds zarf tools kubectl logs -n pepr-system -l app=pepr-uds-core-watcher > /tmp/pepr-watcher-logs.log
uds zarf tools kubectl logs -n pepr-system -l app=pepr-uds-core --tail -1 > /tmp/pepr-logs.log
uds zarf tools kubectl logs -n pepr-system -l app=pepr-uds-core --tail -1 --previous > /tmp/pepr-previous-logs.log || true
uds zarf tools kubectl logs -n pepr-system -l app=pepr-uds-core-watcher --tail -1 > /tmp/pepr-watcher-logs.log
uds zarf tools kubectl logs -n pepr-system -l app=pepr-uds-core-watcher --tail -1 --previous > /tmp/pepr-watcher-previous-logs.log || true
echo "::endgroup::"
echo "::group::Describe Failed Packages"
FAILED_PACKAGES=($(uds zarf tools kubectl get package -A -o jsonpath="{range .items[?(@.status.phase!='Ready')]}{.metadata.name}{','}{.metadata.namespace}{'\n'}{end}")); for PACKAGE in "${FAILED_PACKAGES[@]}"; do PACKAGE_NAME=$(echo "$PACKAGE" | awk -F "," '{print $1}'); PACKAGE_NAMESPACE=$(echo "$PACKAGE" | awk -F "," '{print $2}'); uds zarf tools kubectl describe "$PACKAGE_NAME" -n "$PACKAGE_NAMESPACE"; echo; done
Expand Down

0 comments on commit e652d9f

Please sign in to comment.