eve-pipelines-workflows
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEve Pipelines and Workflows
Eve 流水线与工作流
Use these patterns to automate build and deploy actions and invoke workflow jobs.
使用这些模式来自动化构建、部署操作以及调用工作流任务。
Pipelines (v2 steps)
流水线(v2 步骤)
- Define pipelines under in
pipelines..eve/manifest.yaml - Steps can be ,
action, orscript.agent - Use to control ordering.
depends_on - Built-in actions include ,
build,release,deploy,run,job.create-pr - Run manually:
eve pipeline listeve 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 listeve pipeline show <project> <name>eve pipeline run <name> --ref <sha> --env <env> --repo-dir ./my-app
- 清单文件中包含触发器配置块;GitHub和Slack的webhook可触发流水线运行。
Built-in Actions
内置操作
build
action
buildbuild
操作
buildBuild 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 and
build_idmap (service name to SHA256 digest)image_digests - These outputs automatically flow to dependent steps (release uses build_id)
- Inspect builds independently: ,
eve build show,eve build diagnose,eve build runseve build logs
Build操作会创建可追踪、可观测的BuildSpec和BuildRun记录:
- 在数据库中创建BuildSpec(定义构建内容)和BuildRun(执行记录)
- 输出包含和
build_id映射表(服务名称到SHA256摘要的对应关系)image_digests - 这些输出会自动传递给依赖步骤(release操作会使用build_id)
- 可独立查看构建信息:、
eve build show、eve build diagnose、eve build runseve build logs
Agent steps
Agent 步骤
Use steps when a pipeline stage should run an AI agent job:
agentyaml
pipelines:
remediation:
steps:
- name: analyze
agent:
prompt: "Analyze the failure and propose a fix"当流水线阶段需要运行AI Agent任务时,使用步骤:
agentyaml
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:
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>Pipeline Logs & Streaming
流水线日志与流式输出
Monitor pipeline runs in real time:
bash
undefined实时监控流水线运行:
bash
undefinedSnapshot logs for a run
获取某次运行的日志快照
eve pipeline logs <pipeline> <run-id>
eve pipeline logs <pipeline> <run-id>
Real-time SSE streaming
实时SSE流式输出
eve pipeline logs <pipeline> <run-id> --follow
eve pipeline logs <pipeline> <run-id> --follow
Stream specific step
流式输出指定步骤的日志
eve pipeline logs <pipeline> <run-id> --follow --step <name>
Failed steps include failure hints and link to build diagnostics when applicable.eve pipeline logs <pipeline> <run-id> --follow --step <name>
失败步骤会包含失败提示,必要时会链接到构建诊断信息。Environment Deploy as Pipeline Alias
环境部署作为流水线别名
When an environment has a configured in the manifest, automatically triggers that pipeline instead of doing a direct deploy.
pipelineeve env deploy <env> --ref <sha>当清单文件中为某个环境配置了时,会自动触发该流水线,而非直接执行部署。
pipelineeve env deploy <env> --ref <sha>Basic usage
基础用法
bash
undefinedbash
undefinedTriggers 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
undefinedeve env deploy staging --ref 0123456789abcdef0123456789abcdef01234567 --direct
undefinedPromotion flow example
制品晋升流程示例
bash
undefinedbash
undefined1. 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"}'
undefinedeve env deploy staging --ref 0123456789abcdef0123456789abcdef01234567 --inputs '{"release_id":"rel_xxx"}'
undefinedKey behaviors
核心特性
- If is set,
environments.<env>.pipelinetriggers that pipelineeve env deploy <env> - Use flag to bypass the pipeline and perform a direct deploy
--direct - Use to pass inputs to the pipeline run
--inputs '{"key":"value"}' - Default inputs can be configured via in the manifest
environments.<env>.pipeline_inputs - The flag specifies which git SHA to deploy (40-character SHA or ref resolved via
--ref)--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 - 标志指定要部署的Git SHA(40位SHA或通过
--ref解析的引用)--repo-dir - 环境变量和密钥会按常规方式插值注入
该模式支持制品晋升工作流:在低环境中构建一次,然后将相同的制品推送到更高层级的环境。
Workflows
工作流
- Define workflows under in the manifest.
workflows - is honored when present (
db_access,read_only).read_write - Invocation are available to every workflow step by default, including dependent steps. Use workflow-level
resource_refsto set a default policy and step-levelresource_refsto override it:resource_refs- /
inherit: pass all invocation refs.all - : pass no refs.
none - : pass only matching ref
[brief, design-system],name,label,mount_path, oruri.metadata.name
- Invoke manually:
eve workflow listeve workflow show <project> <name>- (fire-and-forget)
eve workflow run <project> <name> --input '{"k":"v"}' - (wait for result)
eve workflow invoke <project> <name> --input '{"k":"v"}' eve workflow logs <job-id>
- Invocation creates a job; track it with normal job commands.
- 在清单文件的字段下定义工作流。
workflows - 如果存在配置,会遵循其权限设置(
db_access、read_only)。read_write - 调用时的默认对所有工作流步骤可用,包括依赖步骤。使用工作流级别的
resource_refs设置默认策略,使用步骤级别的resource_refs进行覆盖:resource_refs- /
inherit:传递所有调用引用。all - :不传递任何引用。
none - :仅传递匹配
[brief, design-system]、name、label、mount_path或uri的引用。metadata.name
- 手动调用命令:
eve workflow listeve workflow show <project> <name>- (触发后无需等待结果)
eve workflow run <project> <name> --input '{"k":"v"}' - (等待执行结果)
eve workflow invoke <project> <name> --input '{"k":"v"}' eve workflow logs <job-id>
- 调用会创建一个任务;可使用常规任务命令追踪其状态。
Workflow Hints
工作流提示
Control gating, timeouts, and harness preferences via :
hintsyaml
workflows:
remediate:
hints:
gates: ["remediate:proj_abc123:staging"]通过控制门限、超时和harness偏好:
hintsyaml
workflows:
remediate:
hints:
gates: ["remediate:proj_abc123:staging"]Conditional Steps
条件步骤
Skip a downstream step based on an upstream's outcome. Conditions reference
named upstream steps and resolve at dispatch time:
yaml
workflows:
triage-and-act:
steps:
- name: triage
agent: { prompt: "Classify this incident" }
- name: deep
depends_on: [triage]
condition: "triage.status == 'complex'" # skip if false
agent: { prompt: "Run deep analysis" }Conditions support and against upstream step status. Referenced steps must appear in — validation rejects ghost references and bad condition syntax at manifest sync.
==!=depends_on根据上游步骤的结果跳过下游步骤。条件引用已命名的上游步骤,在调度时解析:
yaml
workflows:
triage-and-act:
steps:
- name: triage
agent: { prompt: "Classify this incident" }
- name: deep
depends_on: [triage]
condition: "triage.status == 'complex'" # 条件为false时跳过
agent: { prompt: "Run deep analysis" }条件支持针对上游步骤状态的和判断。被引用的步骤必须出现在中——清单同步时会验证是否存在无效引用或错误的条件语法。
==!=depends_onStep-Level Harness Overrides
步骤级Harness覆盖
Pin or override harness per step (workflow steps and pipeline steps share the same shape):
yaml
steps:
- name: classify
harness: claude
harness_profile: claude-sonnet
harness_options:
model: claude-sonnet-4-7
reasoning_effort: medium
temperature: 0.2
agent: { prompt: "Classify this" }Step-level values take precedence over agent-resolved defaults. may carry a template like for caller-driven selection.
harness_profile${inputs.model}为单个步骤固定或覆盖harness配置(工作流步骤和流水线步骤结构相同):
yaml
steps:
- name: classify
harness: claude
harness_profile: claude-sonnet
harness_options:
model: claude-sonnet-4-7
reasoning_effort: medium
temperature: 0.2
agent: { prompt: "Classify this" }步骤级配置优先级高于Agent解析的默认值。可包含模板(如),由调用者驱动选择。
harness_profile${inputs.model}Workflow env_overrides
env_overrides工作流env_overrides
env_overridesSet env at three layers — workflow, step, invocation — and the runtime merges them in that order (later wins). Reference secrets with ; the resolver redacts them in logs.
${secret.KEY}yaml
workflows:
remediate:
env_overrides:
LOG_LEVEL: info
steps:
- name: act
env_overrides:
LOG_LEVEL: debug # step wins over workflow
API_KEY: ${secret.VENDOR_TOKEN}
agent: { prompt: "Remediate" }Callers add a third layer at invoke time:
bash
eve workflow invoke <project> remediate --input '{"k":"v"}' --env-override DRY_RUN=truePipeline propagates down to the run's so steps see the right scope without re-declaring it.
envenv_name可在三个层级设置环境变量——工作流、步骤、调用——运行时会按该顺序合并(后续层级覆盖前面的)。使用引用密钥;解析器会在日志中自动脱敏。
${secret.KEY}yaml
workflows:
remediate:
env_overrides:
LOG_LEVEL: info
steps:
- name: act
env_overrides:
LOG_LEVEL: debug # 步骤级配置覆盖工作流级
API_KEY: ${secret.VENDOR_TOKEN}
agent: { prompt: "Remediate" }调用者可在调用时添加第三层级的配置:
bash
eve workflow invoke <project> remediate --input '{"k":"v"}' --env-override DRY_RUN=true流水线的会向下传递到运行的,因此步骤无需重新声明即可看到正确的作用域。
envenv_namePer-Job Harness Override (Ad-Hoc Jobs)
单任务Harness覆盖(临时任务)
When firing an ad-hoc job (outside a workflow), override the harness on the create call:
bash
eve job create --description "Investigate" \
--harness claude \
--profile claude-sonnet当触发临时任务(工作流之外)时,可在创建调用时覆盖harness配置:
bash
eve job create --description "Investigate" \
--harness claude \
--profile claude-sonnetOr pass a full override object:
或传递完整的覆盖配置文件:
eve job create --description "..." --harness-override-file ./override.json
eve job create --description "..." --harness-override-file ./override.json
override.json: { "harness": "...", "model": "...", "reasoning_effort": "...", "variant": "...", "temperature": 0.2 }
override.json: { "harness": "...", "model": "...", "reasoning_effort": "...", "variant": "...", "temperature": 0.2 }
The override flows end-to-end through dispatch and claim, taking precedence over agent-resolved values.
该覆盖配置会贯穿调度和认领流程,优先级高于Agent解析的默认值。Slack Notifications, Retry, and File Refs
Slack通知、重试与文件引用
- Workflow posts step start/complete/fail to a configured channel.
hints.slack - Retry the failed/upstream-failed tail of a previous invocation:
eve workflow retry <root-job-id> --failedeve workflow retry <root-job-id> --from <step>
- Workflow steps accept file references (entries that point at a path) — they materialize into the step's workspace alongside other refs.
resource_refs
- 工作流可将步骤的启动/完成/失败状态发布到配置的频道。
hints.slack - 重试之前调用中失败/上游失败的后续步骤:
eve workflow retry <root-job-id> --failedeve workflow retry <root-job-id> --from <step>
- 工作流步骤支持文件引用(指向路径的条目)——它们会和其他引用一起在步骤的工作区中实例化。
resource_refs