Get a build
get_buildFollow a build publish_app started: its state, its phase (where it is now: queued, starting, fetching_source, detecting, restoring_cache, building with the step it runs such as npm install, exporting, uploading, saving_cache, finishing, starting_processes, then done, failed, or superseded), the log it has written so far without color codes, and, once it succeeds, the release it produced, the URL that serves it, and its deploy: deploy_state and every process with the release it targets and the release it runs. Poll every ten to fifteen seconds until deploy_state is up, crashed, or refused, or the build failed or was superseded, and between polls tell the person what the build is doing now, which the answer's Now line words for you; most deploys finish within five minutes. superseded means a newer deploy of the app replaced this build, so nothing from it will go live; follow the newer build. checking means the release waits for the organization's release policies: follow evaluation.id with get_evaluation and wait_seconds 20. refused means it will not go live; get_evaluation says why. starting means a process is still booting the release. crashed means a process kept failing on it and was stopped: a web process that had a running release keeps serving it, so a working URL does not prove the new release is live, and other crashed processes are down until fixed. Its state_reason says why. When it is the app's own output, usually a start command that exited or a server not listening on $PORT, fix the code and publish again; when it names a platform or configuration failure, fix that or publish again. A failed build's error names the step that failed, and failure_excerpt holds the log lines that say why, usually a missing or conflicting dependency. Requires connecting a Valet account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| build_id | Yes | Required. The id publish_app returned. | |
| org_name | No | The Valet organization the build belongs to. Omit to use the organization the account joined first. |