buildkite-agent

Buildkite Agent 与流水线操作

补充说明

buildkite-agent 在自有机器上执行 Buildkite 下发的 job,负责检出代码、运行命令、上传制品和回传日志。流水线步骤可以用 pipeline upload 动态生成。

常用示例

buildkite-agent --version
buildkite-agent start
buildkite-agent pipeline upload
buildkite-agent pipeline upload .buildkite/deploy.yml
buildkite-agent annotate "Deploy finished" --style success
buildkite-agent artifact upload "dist/**/*"
buildkite-agent artifact download dist/app.tar.gz .
buildkite-agent meta-data set version 1.2.3
buildkite-agent meta-data get version
buildkite-agent bootstrap

动态步骤:

buildkite-agent pipeline upload <<'YAML'
steps:
  - label: ":test_tube: Test"
    command: npm test
  - wait
  - label: ":rocket: Deploy"
    command: ./deploy.sh
    agents:
      queue: deploy
YAML

易错点与排错

相关命令