eve-pipelines-workflows

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Eve Pipelines and Workflows

Eve 流水线与工作流

Use these patterns to automate build and deploy actions and invoke workflow jobs.
使用这些模式来自动化构建、部署操作并调用工作流任务。

Pipelines (v2 steps)

流水线(v2 步骤)

  • Define pipelines under
    pipelines
    in
    .eve/manifest.yaml
    .
  • Steps can be
    action
    ,
    script
    , or
    agent
    .
  • Use
    depends_on
    to control ordering.
  • Built-in actions include
    build
    ,
    release
    ,
    deploy
    ,
    run
    ,
    job
    ,
    create-pr
    .
  • Run manually:
    • eve pipeline list
    • eve pipeline show <project> <name>
    • eve pipeline run <name> --ref <sha> --env <env> --repo-dir ./my-app
  • Trigger blocks exist in the manifest; GitHub and Slack webhooks can create pipeline runs.
  • .eve/manifest.yaml
    pipelines
    节点下定义流水线。
  • 步骤类型可以是
    action
    script
    agent
  • 使用
    depends_on
    控制执行顺序。
  • 内置操作包括
    build
    release
    deploy
    run
    job
    create-pr
  • 手动运行命令:
    • eve pipeline list
    • eve pipeline show <project> <name>
    • eve pipeline run <name> --ref <sha> --env <env> --repo-dir ./my-app
  • 清单文件中包含触发器配置;GitHub和Slack的Webhook可触发流水线运行。

Built-in Actions

内置操作

build
action

build
操作

Build actions create BuildSpec and BuildRun records that are tracked and observable:
  • Creates BuildSpec (defines what to build) and BuildRun (execution record) in the database
  • Outputs include
    build_id
    and
    image_digests
    map (service name to SHA256 digest)
  • These outputs automatically flow to dependent steps (release uses build_id)
  • Inspect builds independently:
    eve build show
    ,
    eve build diagnose
    ,
    eve build runs
    ,
    eve build logs
Build操作会创建可追踪、可观测的BuildSpec和BuildRun记录:
  • 在数据库中创建BuildSpec(定义构建内容)和BuildRun(执行记录)
  • 输出包含
    build_id
    image_digests
    映射表(服务名称对应SHA256摘要)
  • 这些输出会自动传递给依赖步骤(release步骤会使用build_id)
  • 可独立查看构建信息:
    eve build show
    ,
    eve build diagnose
    ,
    eve build runs
    ,
    eve build logs

Agent steps

Agent步骤

Use
agent
steps when a pipeline stage should run an AI agent job:
yaml
pipelines:
  remediation:
    steps:
      - name: analyze
        agent:
          prompt: "Analyze the failure and propose a fix"
当流水线阶段需要运行AI Agent任务时,使用
agent
步骤:
yaml
pipelines:
  remediation:
    steps:
      - name: analyze
        agent:
          prompt: "Analyze the failure and propose a fix"

Canonical pipeline flow

标准流水线流程

Every deploy pipeline should follow this pattern:
yaml
pipelines:
  deploy:
    steps:
      - name: build
        action:
          type: build
          # Creates BuildSpec + BuildRun, outputs build_id + image_digests
      - name: release
        depends_on: [build]
        action:
          type: release
          # References build_id, derives digests from BuildArtifacts
      - name: deploy
        depends_on: [release]
        action:
          type: deploy
          env_name: staging
          # Uses digest-based image refs for immutable deploys
每个部署流水线都应遵循以下模式:
yaml
pipelines:
  deploy:
    steps:
      - name: build
        action:
          type: build
          # 创建BuildSpec + BuildRun,输出build_id + image_digests
      - name: release
        depends_on: [build]
        action:
          type: release
          # 引用build_id,从BuildArtifacts中获取摘要
      - name: deploy
        depends_on: [release]
        action:
          type: deploy
          env_name: staging
          # 使用基于摘要的镜像引用实现不可变部署

Promotion workflow

制品晋升流程

Build once in test, then promote the same build artifacts to staging/production:
  • The build step creates a BuildRun with artifacts (image digests)
  • Releases carry the build_id forward, ensuring identical images across environments
  • This pattern guarantees you deploy exactly what you tested
Track pipeline execution like any job:
bash
eve job list --phase active
eve job follow <job-id>
eve job result <job-id>
在测试环境中构建一次,然后将相同的构建制品晋升到预发布/生产环境:
  • Build步骤会创建带有制品(镜像摘要)的BuildRun
  • Release步骤会携带build_id,确保不同环境使用完全相同的镜像
  • 该模式可保证部署的内容与测试的完全一致
使用常规任务命令追踪流水线执行:
bash
eve job list --phase active
eve job follow <job-id>
eve job result <job-id>

Environment Deploy as Pipeline Alias

环境部署作为流水线别名

When an environment has a
pipeline
configured in the manifest,
eve env deploy <env> --ref <sha>
automatically triggers that pipeline instead of doing a direct deploy.
当清单文件中为某个环境配置了
pipeline
时,
eve env deploy <env> --ref <sha>
会自动触发该流水线,而非直接部署。

Basic usage

基础用法

bash
undefined
bash
undefined

Triggers the configured pipeline for test environment

触发测试环境的配置流水线

eve env deploy test --ref 0123456789abcdef0123456789abcdef01234567
eve env deploy test --ref 0123456789abcdef0123456789abcdef01234567

Pass inputs to the pipeline

向流水线传递输入参数

eve env deploy staging --ref 0123456789abcdef0123456789abcdef01234567 --inputs '{"release_id":"rel_xxx"}'
eve env deploy staging --ref 0123456789abcdef0123456789abcdef01234567 --inputs '{"release_id":"rel_xxx"}'

Bypass pipeline and do direct deploy

绕过流水线,执行直接部署

eve env deploy staging --ref 0123456789abcdef0123456789abcdef01234567 --direct
undefined
eve env deploy staging --ref 0123456789abcdef0123456789abcdef01234567 --direct
undefined

Promotion flow example

晋升流程示例

bash
undefined
bash
undefined

1. Build and deploy to test environment

1. 构建并部署到测试环境

eve env deploy test --ref 0123456789abcdef0123456789abcdef01234567
eve env deploy test --ref 0123456789abcdef0123456789abcdef01234567

2. Get release info from the test build

2. 从测试构建中获取发布信息

eve release resolve v1.2.3
eve release resolve v1.2.3

Output: rel_xxx

输出: rel_xxx

3. Promote to staging using the release_id

3. 使用release_id晋升到预发布环境

eve env deploy staging --ref 0123456789abcdef0123456789abcdef01234567 --inputs '{"release_id":"rel_xxx"}'
undefined
eve env deploy staging --ref 0123456789abcdef0123456789abcdef01234567 --inputs '{"release_id":"rel_xxx"}'
undefined

Key behaviors

核心特性

  • If
    environments.<env>.pipeline
    is set,
    eve env deploy <env>
    triggers that pipeline
  • Use
    --direct
    flag to bypass the pipeline and perform a direct deploy
  • Use
    --inputs '{"key":"value"}'
    to pass inputs to the pipeline run
  • Default inputs can be configured via
    environments.<env>.pipeline_inputs
    in the manifest
  • The
    --ref
    flag specifies which git SHA to deploy (40-character SHA or ref resolved via
    --repo-dir
    )
  • Environment variables and secrets are interpolated as usual
This pattern enables promotion workflows where you build once in a lower environment and promote the same artifact through higher environments.
  • 如果配置了
    environments.<env>.pipeline
    eve env deploy <env>
    会触发对应的流水线
  • 使用
    --direct
    标志可绕过流水线,执行直接部署
  • 使用
    --inputs '{"key":"value"}'
    向流水线运行传递输入参数
  • 可通过清单文件中的
    environments.<env>.pipeline_inputs
    配置默认输入参数
  • --ref
    标志指定要部署的Git SHA(40位SHA或通过
    --repo-dir
    解析的引用)
  • 环境变量和密钥会按常规方式进行插值
该模式支持晋升工作流,你可以在低环境中构建一次,然后将相同的制品晋升到更高环境。

Workflows

工作流

  • Define workflows under
    workflows
    in the manifest.
  • db_access
    is honored when present (
    read_only
    ,
    read_write
    ).
  • Invoke manually:
    • eve workflow list
    • eve workflow show <project> <name>
    • eve workflow run <project> <name> --input '{"k":"v"}'
  • Invocation creates a job; track it with normal job commands.
  • 在清单文件的
    workflows
    节点下定义工作流。
  • 若存在
    db_access
    配置(
    read_only
    read_write
    ),会生效该配置。
  • 手动调用命令:
    • eve workflow list
    • eve workflow show <project> <name>
    • eve workflow run <project> <name> --input '{"k":"v"}'
  • 调用会创建一个任务;可使用常规任务命令追踪其状态。

Recursive skill distillation

递归技能提炼

  • Add new pipeline or workflow patterns as they emerge.
  • Split specialized flows into new eve-se skills when needed.
  • Update the eve-skillpacks README and ARCHITECTURE listings after changes.
  • 随着新场景出现,添加新的流水线或工作流模式。
  • 必要时将专用流程拆分为新的eve-se技能。
  • 变更后更新eve-skillpacks的README和ARCHITECTURE列表。