taubyte-push-build-verify

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Push Build Verify

推送、构建与验证

Steps

步骤

  1. Pre-push build/runtime config check:
    • Validate
      .taubyte/build.sh
      and
      .taubyte/config.yaml
      for changed functions/websites/libraries.
    • Ensure required env vars are declared when server-side config is needed.
  2. If website/library was newly created in this workflow, import first:
    bash
    tau import website --name <website>
    tau import library --name <library>
    • Run only for resources that exist and are relevant to this workflow.
  3. Push project config:
    bash
    tau push project --config-only --message "<message>"
  4. Check jobs/logs:
    bash
    tau query builds --since 1h
    tau query logs --jid <job_id>
  5. Push project code:
    bash
    tau push project --code-only --message "<message>"
  6. Website/library repositories:
    • Preferred:
      bash
      tau push website --name <website> --message "<message>"
      tau push library --name <library> --message "<message>"
    • Exception-only fallback for website/library repos:
      bash
      git add .
      git commit -m "<message>"
      git push origin main
  7. Re-check builds/logs and update context log.
  1. 推送前的构建/运行时配置检查:
    • 验证
      .taubyte/build.sh
      .taubyte/config.yaml
      中是否有变更的函数/网站/库。
    • 当需要服务器端配置时,确保已声明所需的环境变量。
  2. 如果此工作流中新建了网站/库,先执行导入:
    bash
    tau import website --name <website>
    tau import library --name <library>
    • 仅针对此工作流中存在且相关的资源执行。
  3. 推送项目配置:
    bash
    tau push project --config-only --message "<message>"
  4. 检查任务/日志:
    bash
    tau query builds --since 1h
    tau query logs --jid <job_id>
  5. 推送项目代码:
    bash
    tau push project --code-only --message "<message>"
  6. 网站/库仓库:
    • 优先方式:
      bash
      tau push website --name <website> --message "<message>"
      tau push library --name <library> --message "<message>"
    • 仅在特殊情况下对网站/库仓库使用备选方案:
      bash
      git add .
      git commit -m "<message>"
      git push origin main
  7. 重新检查构建/日志并更新上下文日志。

Push policy guardrails

推送策略约束

  • For project config/code (
    tau push project
    ), never bypass failures with git; fix tau/root cause first.
  • Git fallback is allowed only for website/library repo-local push path when tau website/library push is unavailable or unsupported.
  • If git fallback is used, record reason in context log.
  • Always record relevant build/job IDs and latest log diagnosis in context log after checks.
  • 对于项目配置/代码(
    tau push project
    ),绝不能用Git绕过失败;应先修复tau相关问题或根本原因。
  • 仅当tau的网站/库推送功能不可用或不支持时,才允许对网站/库仓库使用Git备选推送路径。
  • 如果使用Git备选方案,需在上下文日志中记录原因。
  • 检查完成后,务必在上下文日志中记录相关的构建/任务ID以及最新的日志诊断信息。