fix: run staging automation on xiaoxin
Staging Backend Quality Gate / validate (push) Failing after 5m10s
Staging Backend Quality Gate / publish-and-deploy (push) Has been skipped

Move validation and immutable ACR deployment to the online Linux runner and restore Bash-native deployment handling.
This commit is contained in:
linmeng
2026-07-27 17:42:20 +08:00
parent 68c97fe19b
commit b6fecb01d7
2 changed files with 97 additions and 138 deletions
@@ -380,19 +380,19 @@ test("production remains manual-only and separate from staging database automati
assert.doesNotMatch(production, /docker-compose\.postgres\.yml|db:migrate/);
});
test("Gitea staging push uses the Windows runner and immutable ACR images", () => {
test("Gitea staging push uses the xiaoxin Linux runner and immutable ACR images", () => {
const workflow = read(giteaQualityWorkflow);
assert.match(workflow, /runs-on: manman-win/);
assert.match(workflow, /shell: powershell/);
assert.equal(workflow.match(/runs-on: xiaoxin/g)?.length, 2);
assert.match(workflow, /set -euo pipefail/);
assert.match(workflow, /crpi-d1feco6itet73spp\.cn-hongkong\.personal\.cr\.aliyuncs\.com\/copse\/jyotisha/);
assert.match(workflow, /secrets\.REGISTRY_USERNAME/);
assert.match(workflow, /secrets\.REGISTRY_PASSWORD/);
assert.match(workflow, /:api-\$env:GITEA_SHA/);
assert.match(workflow, /:web-\$env:GITEA_SHA/);
assert.match(workflow, /EXPECTED_PREVIOUS_SHA='\$previousSha'/);
assert.match(workflow, /git merge-base --is-ancestor \$previousSha \$env:GITEA_SHA/);
assert.match(workflow, /\$scpOptions = @\([^\n]*'-P'/);
assert.doesNotMatch(workflow, /17631000304|copse\.ai\.2026/);
assert.match(workflow, /api_tag="\$\{IMAGE_REPOSITORY\}:api-\$\{GITEA_SHA\}"/);
assert.match(workflow, /web_tag="\$\{IMAGE_REPOSITORY\}:web-\$\{GITEA_SHA\}"/);
assert.match(workflow, /EXPECTED_PREVIOUS_SHA='\$previous_sha'/);
assert.match(workflow, /git merge-base --is-ancestor "\$previous_sha" "\$GITEA_SHA"/);
assert.match(workflow, /scp_options=\(-i "\$key_path" -P "\$DEPLOY_PORT"/);
assert.doesNotMatch(workflow, /shell: powershell|17631000304|copse\.ai\.2026/);
});
test("staging scripts pass shell syntax validation", () => {