Skip to content

Commit

Permalink
Improves logs archiving
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmerold committed Dec 12, 2024
1 parent c630efa commit b1b2de2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,29 @@ jobs:
run: tox -vve integration

- name: Gather logs
if: always()
if: failure()
run: |
juju-crashdump -m sdcore
juju-crashdump -m ran
for pod in $(sudo microk8s.kubectl -n sdcore get pods -o json | jq .items[].metadata.name | tr -d '"'); do
sudo microk8s.kubectl -n sdcore logs $pod --all-containers > pod-$pod.log
sudo microk8s.kubectl -n sdcore logs $pod --all-containers > sdcore-$pod.log
done
for pod in $(sudo microk8s.kubectl -n ran get pods -o json | jq .items[].metadata.name | tr -d '"'); do
sudo microk8s.kubectl -n ran logs $pod --all-containers > ran-$pod.log
done
- name: Archive juju crashdump
if: always()
if: failure()
uses: actions/upload-artifact@v4
with:
name: juju-crashdump
path: juju-crashdump-*.tar.xz

- name: Archive k8s logs
if: always()
if: failure()
uses: actions/upload-artifact@v4
with:
name: k8s-logs
path: pod-*.log
path: |
sdcore-*.log
ran-*.log
1 change: 0 additions & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ module "sdcore" {
source = "git::https://github.com/canonical/terraform-juju-sdcore-k8s//modules/sdcore-k8s"

model = juju_model.sdcore.name
nms_revision = 786

depends_on = [module.sdcore-router]
}
Expand Down

0 comments on commit b1b2de2

Please sign in to comment.