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 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 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 - Invoke manually:
eve workflow listeve 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 listeve 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列表。