Skip to content

Commit

Permalink
chore: add debug logs to save logs for easier searching (#430)
Browse files Browse the repository at this point in the history
## Description

This `tee`s the debug logs to files as well so they can be pulled down
and correlated with the other logs.

## Related Issue

Fixes #N/A

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Other (security config, docs update, etc)

## Checklist before merging

- [X] Test, docs, adr added or updated as needed
- [X] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)(https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md#submitting-a-pull-request)
followed

---------

Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
  • Loading branch information
Racer159 and mjnagel committed May 24, 2024
1 parent 003ae6a commit 372ada2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/actions/debug-output/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ runs:
- name: Print basic debug info for a k8s cluster
run: |
echo "::group::kubectl get all"
uds zarf tools kubectl get all -A
uds zarf tools kubectl get all -A | tee /tmp/debug-k-get-all.log
echo "::endgroup::"
echo "::group::kubectl get pv,pvc"
uds zarf tools kubectl get pv,pvc -A
uds zarf tools kubectl get pv,pvc -A | tee /tmp/debug-k-get-pv-pvc.log
echo "::endgroup::"
echo "::group::kubectl get package"
uds zarf tools kubectl get package -A
uds zarf tools kubectl get package -A | tee /tmp/debug-k-get-package.log
echo "::endgroup::"
echo "::group::kubectl get events"
uds zarf tools kubectl get events -A --sort-by='.lastTimestamp'
uds zarf tools kubectl get events -A --sort-by='.lastTimestamp' | tee /tmp/debug-k-get-events.log
echo "::endgroup::"
echo "::group::kubectl describe nodes"
uds zarf tools kubectl describe nodes k3d-uds-server-0 | tee /tmp/debug-k-describe-node.log
echo "::endgroup::"
shell: bash
2 changes: 2 additions & 0 deletions .github/actions/save-logs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ runs:
path: |
/tmp/zarf-*.log
/tmp/uds-*.log
/tmp/maru-*.log
/tmp/debug-*.log
/tmp/uds-containerd-logs
/tmp/k3d-uds-*.log

0 comments on commit 372ada2

Please sign in to comment.