Align package and executable names with workspace directories
Verify databases and deploy Aster VM / verify-and-deploy (push) Successful in 15m7s
Verify databases and deploy Aster VM / verify-and-deploy (push) Successful in 15m7s
This commit is contained in:
+2
-2
@@ -5,9 +5,9 @@
|
||||
| 文件 | 入口与副作用 |
|
||||
| --- | --- |
|
||||
| [check.sh](check.sh) | fmt 检查、workspace 测试、严格 Clippy;会使用 Cargo 依赖和构建产物 |
|
||||
| [smoke.py](smoke.py) | 标准库 Python 脚本;构建后用 Cargo metadata 定位 debug 二进制,支持 CARGO_TARGET_DIR;临时 SQLite 数据、HTTP 探测和 SIGTERM 退出,不改生产配置 |
|
||||
| [smoke.py](smoke.py) | 标准库 Python 脚本;构建后用 Cargo metadata 定位 cli/server 的 debug 二进制,支持 CARGO_TARGET_DIR;临时 SQLite 数据、HTTP 探测和 SIGTERM 退出,不改生产配置 |
|
||||
| [ci-ces-control.sh](ci-ces-control.sh) | 需要 ASTER_RELEASE_SHA;构建 ci 镜像、创建临时网络/PostgreSQL/检查容器,运行全部检查;退出清理临时容器和网络,保留专属远端 Cargo 缓存卷 |
|
||||
| [deploy-ces-control.sh](deploy-ces-control.sh) | ces-control root 执行;校验已构建镜像、锁定发布、保留密码和数据、验证新服务后切换 current,失败尝试恢复旧版;保留镜像 |
|
||||
| [deploy-ces-control.sh](deploy-ces-control.sh) | ces-control root 执行;校验已构建镜像、锁定发布、保留密码和数据、验证新服务后切换 current,失败尝试恢复旧版;保留镜像;应用服务 aster 内调用 cli |
|
||||
|
||||
CI/部署使用的镜像与路径仅属于本项目,禁止改动其他项目和共享 Runner。smoke.py 临时选择端口后再启动宿主,存在小的端口竞争窗口,指定环境遇到冲突可重试。
|
||||
|
||||
|
||||
@@ -47,6 +47,6 @@ docker run --name "$checks" --init --network "$network" \
|
||||
--env ASTER_TEST_POSTGRES_URL='postgres://aster:aster-ci-only@postgres:5432/aster?sslmode=disable' \
|
||||
"$image" sh -eu -c '
|
||||
sh scripts/check.sh
|
||||
cargo test -p aster-storage --test postgres --locked -- --ignored
|
||||
cargo test -p storage --test postgres --locked -- --ignored
|
||||
python3 scripts/smoke.py
|
||||
'
|
||||
|
||||
@@ -45,11 +45,11 @@ if ! compose_at "$release" up -d --no-build --wait --wait-timeout 180; then
|
||||
rollback
|
||||
exit 1
|
||||
fi
|
||||
if ! compose_at "$release" exec -T aster aster metadata put deployment.release "$release_sha"; then
|
||||
if ! compose_at "$release" exec -T aster cli metadata put deployment.release "$release_sha"; then
|
||||
rollback
|
||||
exit 1
|
||||
fi
|
||||
if ! actual=$(compose_at "$release" exec -T aster aster metadata get deployment.release); then
|
||||
if ! actual=$(compose_at "$release" exec -T aster cli metadata get deployment.release); then
|
||||
rollback
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ def main():
|
||||
# Cargo may use a configured CARGO_TARGET_DIR; discover the actual binaries.
|
||||
metadata = json.loads(run("cargo", "metadata", "--no-deps", "--format-version", "1", env=env))
|
||||
binary_dir = Path(metadata["target_directory"]) / "debug"
|
||||
cli = str(binary_dir / "aster")
|
||||
server = str(binary_dir / "aster-server")
|
||||
cli = str(binary_dir / "cli")
|
||||
server = str(binary_dir / "server")
|
||||
with tempfile.TemporaryDirectory(prefix="aster-smoke-") as directory:
|
||||
env["SQLITE_PATH"] = str(Path(directory) / "nested" / "aster.db")
|
||||
# This must succeed even when an explicit database URL is invalid.
|
||||
|
||||
Reference in New Issue
Block a user