fix: add failure steps to deploy jobs + skip renovate in workflow test
All checks were successful
CI / lint (push) Successful in 34s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / docs (push) Has been skipped
Deploy / api (push) Has been skipped
Deploy / mc (push) Has been skipped
Deploy / report (push) Successful in 30s
CI / test (push) Successful in 29m15s
All checks were successful
CI / lint (push) Successful in 34s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / docs (push) Has been skipped
Deploy / api (push) Has been skipped
Deploy / mc (push) Has been skipped
Deploy / report (push) Successful in 30s
CI / test (push) Successful in 29m15s
This commit is contained in:
@@ -45,6 +45,18 @@ jobs:
|
||||
crane push /tmp/notebooks.tar git:3000/homelab/stack/notebooks:${{ env.SHORT_SHA }} --insecure
|
||||
crane push /tmp/notebooks.tar git:3000/homelab/stack/notebooks:latest --insecure
|
||||
|
||||
- name: File failure issue
|
||||
if: failure()
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
run: |
|
||||
uv sync --no-dev --quiet 2>/dev/null || true
|
||||
uv run python -m api.diag.ci \
|
||||
--workflow "Deploy" --job "notebooks" \
|
||||
--run "${{ github.run_number }}" \
|
||||
--sha "${{ github.sha }}" \
|
||||
--ref "${{ github.ref }}" || true
|
||||
|
||||
zotero:
|
||||
runs-on: ubuntu-latest
|
||||
if: >-
|
||||
@@ -81,6 +93,18 @@ jobs:
|
||||
crane push /tmp/zotero.tar git:3000/homelab/stack/zotero:${{ env.SHORT_SHA }} --insecure
|
||||
crane push /tmp/zotero.tar git:3000/homelab/stack/zotero:latest --insecure
|
||||
|
||||
- name: File failure issue
|
||||
if: failure()
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
run: |
|
||||
uv sync --no-dev --quiet 2>/dev/null || true
|
||||
uv run python -m api.diag.ci \
|
||||
--workflow "Deploy" --job "zotero" \
|
||||
--run "${{ github.run_number }}" \
|
||||
--sha "${{ github.sha }}" \
|
||||
--ref "${{ github.ref }}" || true
|
||||
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
if: >-
|
||||
@@ -117,6 +141,18 @@ jobs:
|
||||
crane push /tmp/docs.tar git:3000/homelab/stack/docs:${{ env.SHORT_SHA }} --insecure
|
||||
crane push /tmp/docs.tar git:3000/homelab/stack/docs:latest --insecure
|
||||
|
||||
- name: File failure issue
|
||||
if: failure()
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
run: |
|
||||
uv sync --no-dev --quiet 2>/dev/null || true
|
||||
uv run python -m api.diag.ci \
|
||||
--workflow "Deploy" --job "docs" \
|
||||
--run "${{ github.run_number }}" \
|
||||
--sha "${{ github.sha }}" \
|
||||
--ref "${{ github.ref }}" || true
|
||||
|
||||
api:
|
||||
runs-on: ubuntu-latest
|
||||
if: >-
|
||||
@@ -154,6 +190,18 @@ jobs:
|
||||
crane push /tmp/api.tar git:3000/homelab/stack/api:${{ env.SHORT_SHA }} --insecure
|
||||
crane push /tmp/api.tar git:3000/homelab/stack/api:latest --insecure
|
||||
|
||||
- name: File failure issue
|
||||
if: failure()
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
run: |
|
||||
uv sync --no-dev --quiet 2>/dev/null || true
|
||||
uv run python -m api.diag.ci \
|
||||
--workflow "Deploy" --job "api" \
|
||||
--run "${{ github.run_number }}" \
|
||||
--sha "${{ github.sha }}" \
|
||||
--ref "${{ github.ref }}" || true
|
||||
|
||||
mc:
|
||||
runs-on: ubuntu-latest
|
||||
if: >-
|
||||
@@ -184,6 +232,18 @@ jobs:
|
||||
crane push /tmp/mc.tar git:3000/homelab/stack/mc:${{ env.SHORT_SHA }} --insecure
|
||||
crane push /tmp/mc.tar git:3000/homelab/stack/mc:latest --insecure
|
||||
|
||||
- name: File failure issue
|
||||
if: failure()
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
run: |
|
||||
uv sync --no-dev --quiet 2>/dev/null || true
|
||||
uv run python -m api.diag.ci \
|
||||
--workflow "Deploy" --job "mc" \
|
||||
--run "${{ github.run_number }}" \
|
||||
--sha "${{ github.sha }}" \
|
||||
--ref "${{ github.ref }}" || true
|
||||
|
||||
report:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [notebooks, zotero, docs, api, mc]
|
||||
|
||||
@@ -238,7 +238,9 @@ def _gen_deploy(
|
||||
- name: Compute short SHA
|
||||
run: echo "SHORT_SHA=$(echo $GITHUB_SHA | head -c 8)" >> "$GITHUB_ENV"
|
||||
|
||||
{_build_push_step(img, tags, registry, owner_repo)}""")
|
||||
{_build_push_step(img, tags, registry, owner_repo)}
|
||||
|
||||
{_failure_step("Deploy", name)}""")
|
||||
|
||||
jobs_block = "\n\n".join(job_blocks)
|
||||
needs_list = ", ".join(job_names)
|
||||
|
||||
@@ -144,7 +144,10 @@ class TestWorkflowGeneration:
|
||||
from pathlib import Path
|
||||
|
||||
wf_dir = Path(__file__).resolve().parents[2] / ".gitea" / "workflows"
|
||||
skip = {"renovate.yml"} # external bot, no failure filing
|
||||
for yml in wf_dir.glob("*.yml"):
|
||||
if yml.name in skip:
|
||||
continue
|
||||
content = yml.read_text()
|
||||
assert "File failure issue" in content, f"{yml.name} missing failure step"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user