refactor: separate language engine from CLI and server hosts
Verify Aster engine / verify (push) Failing after 0s
Verify Aster engine / verify (push) Failing after 0s
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
# CI 工作流
|
||||
# Aster engine workflows
|
||||
|
||||
[ci-deploy.yml](ci-deploy.yml) 是当前唯一工作流:main push 或 workflow_dispatch 触发,运行于 ces-control,生产并发组串行且不取消正在运行的发布,任务超时 60 分钟。
|
||||
[ci.yml](ci.yml) verifies this project on main pushes, pull requests and manual dispatch. It runs on ces-control, with a 60-minute timeout. Checkout and secret requirements are in [the parent README](../README.md).
|
||||
|
||||
顺序为检出 → ci-ces-control.sh 验证及执行 Endor 示例 → 展示报告并上传 artifact → 构建 SHA 生产镜像 → main 分支执行 deploy-ces-control.sh。报告展示和上传使用 always(),验证失败也保留诊断。Artifact 名为 endor-execution-output-<sha>,包含 endor-examples.md 和 endor-examples.json,保留 30 天;从对应 Actions run 页面下载。使用 actions/upload-artifact@v3 连接当前 Gitea 的 artifact 服务,接口参考 [action 定义](https://github.com/actions/upload-artifact/blob/v3/action.yml)。
|
||||
|
||||
设置 DOCKER_BUILDKIT=0 使用当前 builder 路径,检出不保留认证信息;工作流不更改共享 Runner。PostgreSQL 保留为预置资源,基础信息由文件保存;发布只为旧基础信息做一次只读导入,不再写入数据库。
|
||||
|
||||
脚本职责见 [scripts](../../scripts/README.md),完整发布、保留数据和回退规则见 [部署](../../docs/operations/deployment.md)。main 推送会进入现有发布链,不能把推送成功写成 CI 或部署成功;按用户约定不主动跟踪状态。
|
||||
|
||||
修改步骤后同步本页及对应全局主题。返回 [Gitea 配置](../README.md)。
|
||||
There is no production service deployment in this workflow.
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
name: Verify databases and deploy Aster VM
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: endorphin-aster-vm-production
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
verify-and-deploy:
|
||||
runs-on: ces-control
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
DOCKER_BUILDKIT: "0"
|
||||
ASTER_RELEASE_SHA: ${{ gitea.sha }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Verify SQLite, PostgreSQL and host behavior
|
||||
run: sh scripts/ci-ces-control.sh
|
||||
|
||||
- name: Show Endor example execution output
|
||||
if: always()
|
||||
run: cat ci-output/endor-examples.md
|
||||
|
||||
- name: Upload Endor example execution output
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: endor-execution-output-${{ gitea.sha }}
|
||||
path: |
|
||||
ci-output/endor-examples.md
|
||||
ci-output/endor-examples.json
|
||||
if-no-files-found: error
|
||||
retention-days: 30
|
||||
|
||||
- name: Build production image
|
||||
run: docker build --target runtime -t "endorphin-aster-vm:$ASTER_RELEASE_SHA" .
|
||||
|
||||
- name: Deploy VM host and provision PostgreSQL
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
run: sh scripts/deploy-ces-control.sh
|
||||
@@ -0,0 +1,49 @@
|
||||
name: Verify Aster engine
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
runs-on: ces-control
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
DOCKER_BUILDKIT: "0"
|
||||
steps:
|
||||
- name: Checkout with codex-bot
|
||||
env:
|
||||
CODEX_BOT_SSH_KEY: ${{ secrets.CODEX_BOT_SSH_KEY }}
|
||||
GITEA_SSH_KNOWN_HOSTS: ${{ secrets.GITEA_SSH_KNOWN_HOSTS }}
|
||||
SOURCE_SHA: ${{ gitea.sha }}
|
||||
SOURCE_REPOSITORY: ${{ gitea.repository }}
|
||||
run: |
|
||||
set -eu
|
||||
test -n "$CODEX_BOT_SSH_KEY"
|
||||
test -n "$GITEA_SSH_KNOWN_HOSTS"
|
||||
case "$SOURCE_SHA" in *[!0-9a-f]*|'') exit 1;; esac
|
||||
test "${#SOURCE_SHA}" -eq 40
|
||||
umask 077
|
||||
checkout_keys=$(mktemp -d)
|
||||
trap 'rm -rf "$checkout_keys"' EXIT
|
||||
printf '%s\n' "$CODEX_BOT_SSH_KEY" > "$checkout_keys/key"
|
||||
printf '%s\n' "$GITEA_SSH_KNOWN_HOSTS" > "$checkout_keys/known_hosts"
|
||||
unset CODEX_BOT_SSH_KEY GITEA_SSH_KNOWN_HOSTS
|
||||
export GIT_SSH_COMMAND="ssh -F /dev/null -o IdentitiesOnly=yes -i $checkout_keys/key -p 22222 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$checkout_keys/known_hosts"
|
||||
git init .
|
||||
source_url="ssh://git@gitea.entroia.com:22222/$SOURCE_REPOSITORY.git"
|
||||
if git remote get-url origin >/dev/null 2>&1; then
|
||||
git remote set-url origin "$source_url"
|
||||
else
|
||||
git remote add origin "$source_url"
|
||||
fi
|
||||
git fetch --no-tags --depth=1 origin "$SOURCE_SHA"
|
||||
git checkout --detach --force FETCH_HEAD
|
||||
git submodule update --init --recursive
|
||||
- name: Verify engine only
|
||||
run: |
|
||||
image="endorphin-aster-vm-ci:${{ gitea.sha }}"
|
||||
docker build -f Dockerfile.ci -t "$image" .
|
||||
docker run --rm --init "$image"
|
||||
Reference in New Issue
Block a user