Make logs command easier to use #154
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Check code style | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install precommit | |
| run: pip install pre-commit | |
| - name: Check lint | |
| run: pre-commit run ruff-check --all-files | |
| - name: Check format | |
| run: pre-commit run ruff-format --all-files | |
| test: | |
| name: CI on python${{ matrix.python }} via ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| needs: lint | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| python: "3.12" | |
| - os: ubuntu-26.04 | |
| python: "3.14" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install packages | |
| run: sudo apt-get update && sudo apt-get install podman golang-github-containernetworking-plugin-dnsname sqlite3 jq | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| - name: Set owner for /dev/loop-control | |
| run: sudo chown $(whoami) /dev/loop-control | |
| - name: Configure | |
| run: uv run ceph-devstack config set containers.postgres.count 0 | |
| - name: Doctor | |
| run: uv run ceph-devstack -v doctor --fix | |
| - name: Build | |
| run: uv run ceph-devstack -v build | |
| - name: Create | |
| run: uv run ceph-devstack -v create | |
| - name: Start | |
| run: uv run ceph-devstack -v start | |
| - name: Check Status | |
| run: podman ps -a | |
| - name: Check ssh access to testnode container | |
| run: sleep 10 && podman exec teuthology ssh -oBatchMode=yes -v "cm@$(podman inspect --format '{{ slice .ID 0 12 }}' testnode_0)" whoami | |
| - name: Dump testnode journal | |
| if: failure() | |
| run: podman exec testnode_0 journalctl | |
| - name: Wait | |
| run: uv run ceph-devstack wait teuthology | |
| - name: Dump dispatcher log | |
| if: success() || failure() | |
| run: podman logs -f teuthology | |
| - name: Dump job log | |
| if: success() || failure() | |
| run: uv run ceph-devstack logs | |
| - name: Create archive | |
| if: success() || failure() | |
| run: | | |
| mkdir -p /tmp/artifacts | |
| - name: Dump job data | |
| if: success() || failure() | |
| run: | | |
| podman cp paddles:/paddles/dev.db /tmp/ | |
| sqlite3 /tmp/dev.db ".output stdout" ".mode json" "select * from jobs" | jq | tee /tmp/artifacts/jobs.json | |
| - name: Upload jobs.json | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: jobs | |
| path: /tmp/artifacts/jobs.json | |
| - name: Create tarball of log archive | |
| if: success() || failure() | |
| run: | | |
| tar -czf /tmp/artifacts/archive.tar ~/.local/share/ceph-devstack/archive/ | |
| - name: Upload log archive | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: archive | |
| path: /tmp/artifacts/archive.tar | |
| - name: Stop | |
| run: uv run ceph-devstack -v stop | |
| - name: Remove | |
| run: uv run ceph-devstack -v remove |