stackblaze builds
Build jobs of an app built from source. Alias: build.
stackblaze builds liststackblaze builds trigger [options]stackblaze builds logs [build] [-f] [--ci]| Subcommand | Description |
|---|---|
list |
The app’s build jobs, newest first |
trigger |
Start a build with the app’s settings, optionally overridden |
logs [build] |
Stream a build’s log until it finishes (default: the newest build) |
Every subcommand accepts the scope and output flags: -p, --pipeline, --phase, -a, --app, --token, --api-url, -o, --output, --json.
Options
Section titled “Options”builds trigger
Section titled “builds trigger”| Flag | Description |
|---|---|
--commit-sha <sha> |
Build this commit |
--reference <ref> |
Branch or tag (default: the app’s branch) |
--repository <url> |
Repository URL override |
--buildstrategy <s> |
buildpacks, dockerfile, nixpacks or plain |
--dockerfile-path <path> |
Dockerfile path (dockerfile strategy) |
builds logs
Section titled “builds logs”| Flag | Description |
|---|---|
-f, --follow |
Follow the build live: each line is printed as the build writes it |
--ci |
Write NDJSON build, log and error records instead of text (same format as up --ci) |
Use --ci for a pure NDJSON stream. Without a build name, logs follows the newest build; in a terminal with no build matched, it lets you pick one.
Examples
Section titled “Examples”stackblaze builds logs -f # follow the latest build livestackblaze builds logs web-x7k2 -f # follow a named buildstackblaze builds logs -f --ci # NDJSON for CIstackblaze builds trigger --commit-sha "$GITHUB_SHA"stackblaze builds list -o jsonHow it works
Section titled “How it works”With -f, the CLI joins the build’s live log stream and the server pushes each line as the build writes it, in order: fetch → build → push → deploy. Lines from the build step are printed as-is; the others are prefixed with [container].
- Joining a build that is already running, or already finished, replays the earlier lines first, so nothing is missed.
- A dropped connection reconnects on its own; replayed lines are not printed twice.
- If the live stream is not available, the CLI notices within about 5 seconds, prints a note on stderr and polls the build log every 2 seconds instead. Set
STACKBLAZE_BUILD_STREAM=pollto always poll. - Without
-f,logspolls every 2 seconds.
logs exits when the build finishes: 0 on success, 1 on failure (with the reason when one was recorded), when the build does not finish within 10 minutes, or when it reports an Unknown state for 30 seconds.
stackblaze up uses the same live stream after it starts a deploy. Deploy history including image deploys is in stackblaze deployments.