fix(cd): use array needs for deploy jobs
Some checks failed
Code Review / ai-code-review (push) Successful in 16s
CD Pipeline / tests (push) Successful in 1m39s
CD Pipeline / build-and-deploy (push) Successful in 4m28s
CD Pipeline / post-deploy-checks (push) Successful in 1m35s
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
Some checks failed
Code Review / ai-code-review (push) Successful in 16s
CD Pipeline / tests (push) Successful in 1m39s
CD Pipeline / build-and-deploy (push) Successful in 4m28s
CD Pipeline / post-deploy-checks (push) Successful in 1m35s
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
This commit is contained in:
@@ -311,12 +311,7 @@ jobs:
|
||||
build-and-deploy:
|
||||
# 2026-04-30 Codex: Docker builds run on the host runner. Long docker build
|
||||
# steps were killing the transient act job container with RWLayer=nil.
|
||||
needs: tests
|
||||
# 2026-06-27 Codex: Gitea 1.25 can leave a dependent job blocked on the
|
||||
# implicit success() condition even after the upstream job is green. Keep
|
||||
# the dependency ordering, but make the job schedulable and fail closed in
|
||||
# the first step if the tests job is not actually green.
|
||||
if: ${{ always() }}
|
||||
needs: [tests]
|
||||
timeout-minutes: 60
|
||||
runs-on: awoooi-host
|
||||
steps:
|
||||
@@ -330,39 +325,6 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Assert Tests Job Succeeded
|
||||
run: |
|
||||
python3 - <<'PY'
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import urllib.request
|
||||
|
||||
sha = os.environ["GITHUB_SHA"]
|
||||
url = f"http://192.168.0.110:3001/wooo/awoooi/commit/{sha}"
|
||||
|
||||
def page_text() -> str:
|
||||
html = urllib.request.urlopen(url, timeout=20).read().decode("utf-8", "replace")
|
||||
text = re.sub(r"<[^>]+>", " ", html)
|
||||
return re.sub(r"\s+", " ", text)
|
||||
|
||||
for _ in range(20):
|
||||
text = page_text()
|
||||
match = re.search(r"CD Pipeline / tests \(push\) ([^D]{0,120}) Details", text)
|
||||
status = match.group(1).strip() if match else "unknown"
|
||||
print(f"tests job status: {status}")
|
||||
if "Successful" in status:
|
||||
sys.exit(0)
|
||||
if any(token in status for token in ("Failure", "Cancelled", "Timed out")):
|
||||
print("tests job did not pass; refusing to deploy", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
time.sleep(15)
|
||||
|
||||
print("tests job status did not become successful before deploy guard timeout", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
PY
|
||||
|
||||
- name: Get Commit Info
|
||||
id: commit
|
||||
run: |
|
||||
@@ -1255,10 +1217,7 @@ jobs:
|
||||
fi
|
||||
|
||||
post-deploy-checks:
|
||||
needs: build-and-deploy
|
||||
# Same Gitea dependency workaround as build-and-deploy: schedule the job,
|
||||
# then fail closed if build-and-deploy did not really finish successfully.
|
||||
if: ${{ always() }}
|
||||
needs: [build-and-deploy]
|
||||
timeout-minutes: 30
|
||||
# 2026-04-30 Codex: keep post-deploy on the host runner too. Playwright
|
||||
# install-deps can also kill the act-managed job container with RWLayer=nil.
|
||||
@@ -1274,39 +1233,6 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Assert Build Deploy Job Succeeded
|
||||
run: |
|
||||
python3 - <<'PY'
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import urllib.request
|
||||
|
||||
sha = os.environ["GITHUB_SHA"]
|
||||
url = f"http://192.168.0.110:3001/wooo/awoooi/commit/{sha}"
|
||||
|
||||
def page_text() -> str:
|
||||
html = urllib.request.urlopen(url, timeout=20).read().decode("utf-8", "replace")
|
||||
text = re.sub(r"<[^>]+>", " ", html)
|
||||
return re.sub(r"\s+", " ", text)
|
||||
|
||||
for _ in range(20):
|
||||
text = page_text()
|
||||
match = re.search(r"CD Pipeline / build-and-deploy \(push\) ([^D]{0,120}) Details", text)
|
||||
status = match.group(1).strip() if match else "unknown"
|
||||
print(f"build-and-deploy job status: {status}")
|
||||
if "Successful" in status:
|
||||
sys.exit(0)
|
||||
if any(token in status for token in ("Failure", "Cancelled", "Timed out")):
|
||||
print("build-and-deploy job did not pass; refusing post-deploy checks", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
time.sleep(15)
|
||||
|
||||
print("build-and-deploy job status did not become successful before post-deploy guard timeout", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
PY
|
||||
|
||||
- name: Get Commit Info
|
||||
id: commit
|
||||
run: |
|
||||
|
||||
@@ -1 +1 @@
|
||||
# 2026-06-27 retry AI automation closure deploy with in-job status guards
|
||||
# 2026-06-27 retry AI automation closure deploy with array needs syntax
|
||||
|
||||
Reference in New Issue
Block a user