Trigger a Drone CI build and promote to a higher environment

domain: docs.drone.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Generate a Drone user token from the Drone UI under Account Settings; use it in the 'Authorization: Bearer YOUR_TOKEN' header
  2. To trigger a build, POST to 'https://DRONE_HOST/api/repos/{owner}/{repo}/builds' with a JSON body specifying 'branch' and optionally 'params' (map of string key-value pairs)
  3. Retrieve the created build number from the response; monitor via GET '/api/repos/{owner}/{repo}/builds/{build}' checking 'status' for 'success', 'failure', or 'running'
  4. To promote a build to another environment (e.g. staging to production), POST to '/api/repos/{owner}/{repo}/builds/{build}/promote' with query params 'target=production' and optional 'params'
  5. Promotion creates a new build with the same commit and the specified target; the pipeline must define a 'trigger.target' condition to gate promotion-only steps

Known gotchas

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans