Skip to content
Console
Menu

Getting Started

Authentication

KV Store

sylphx build builds

Every sylphx build builds command: its argument, its flags and a run line.

The builds commands of Sylphx Build, as the CLI spells them: the same calls as the builds API page, typed for the shell. Install, sign in and the grammar are on the CLI index.

#get

Gets a build.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx build builds get orgs/acme/projects/shop/builds/build

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/builds/build · scope build:read · effect read · Request, response and examples

#list

Lists builds in a project.

PARENT — optional: the CLI fills it from the linked project or the key's scope when it is left out.

CLI

Shell
sylphx build builds list orgs/acme/projects/shop

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/builds · scope build:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--page-sizeintAt most this many; default 50, clamped to 1000.
--page-tokenstringnext_page_token of the previous page.
--filterstringAIP-160 filter over labels, filterable fields, and Ready.
--order-bystringAIP-132 ordering over filterable fields.

#create

Creates a build: one command or one image over a commit or a tree. The Operation is done when the build reaches a final state. run and image are the short forms.

ID — The id segment of the new Resource's name; the server assigns one when omitted.

CLI

Shell
sylphx build builds create --parent orgs/acme/projects/shop

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/builds · scope build:run · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--parentstringThe parent to create in; defaults to the linked project or the key's scope.
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--spec.source.source-linkstringThe Hosting SourceLink naming the repository and its Connection.
--spec.source.commitstringThe full commit SHA to build.
--spec.source.root-directorystringThe directory inside the repository to build; default the root.
--spec.cachestringThe BuildCache to read and write; default the project's default cache.
--spec.tree.root-digeststringThe root Directory digest, <sha256 hex>/<size in bytes>.
--spec.image.servicestringThe sylphx.toml service whose dockerfile and context apply; unset reads the fields below or lets the zero-config frontend detect the stack.
--spec.image.dockerfilestringA Dockerfile path relative to the input root; unset lets the zero-config frontend detect the stack.
--spec.image.targetstringThe Dockerfile stage to build.
--spec.image.build-argskey=valueBuild arguments. Secret values bind through [build.secrets], never here. Repeat the flag for each value.
--spec.command.argvstringThe program and its arguments. Use ["bash", "-lc", "…"] for a shell. Repeat the flag for each value.
--spec.command.artifactsstringGlobs, relative to the input root, of files kept after the command ends, whatever its exit code (test reports, coverage). Repeat the flag for each value.
--spec.sizeenumThe machine size; default [build] size, else STANDARD. One of standard, large, xlarge.
--spec.timeoutdurationThe time limit; default 1 hour, at most 6 hours. A command that reaches it is killed and the Build ends with BUILD_FAILURE_TIMEOUT.
--spec.allow-hostsstringInternet hosts the build may reach. Empty means in-cell only: the mirrors and the store. Default [build] allow_hosts. Repeat the flag for each value.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.

#cancel

Cancels a queued or running Build; its lease is released and nothing is published.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx build builds cancel orgs/acme/projects/shop/builds/build --yes

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/builds/build:cancel · scope build:run · effect destructive · Request, response and examples

Flags

FlagTypeWhat it does
--etagstringAct only if the current etag matches.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.
--yesboolDo not ask before this destructive call.

#run

Runs one command over an uploaded tree and settles with its exit code, like the local command. A caller that gets a failure before the command started (BUILD_FAILURE_SETUP_FAILED, NO_CAPACITY) may build locally.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx build builds run orgs/acme/projects/shop

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/builds:run · scope build:run · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--treejsonThe uploaded tree to run over. Required.
--commandstringThe program and its arguments. Required. Repeat the flag for each value.
--artifactsstringGlobs of files kept after the command ends, whatever its exit code. Repeat the flag for each value.
--sizeenumThe machine size; default [build] size, else STANDARD. One of standard, large, xlarge.
--timeoutdurationThe time limit; default 1 hour.
--allow-hostsstringInternet hosts the command may reach; empty means in-cell only. Repeat the flag for each value.
--cachestringThe BuildCache to use; default the project's default cache.
--build-idstringThe id segment of the Build's name; the server assigns one when unset.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.

#build-image

Builds an image, with an SBOM and signed provenance, from a commit or an uploaded tree.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx build builds build-image orgs/acme/projects/shop

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/builds:buildImage · scope build:run · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--sourcejsonA commit, read through the Broker at that exact commit.
--treejsonAn uploaded tree.
--imagejsonThe image to build.
--sizeenumThe machine size; default [build] size, else STANDARD. One of standard, large, xlarge.
--timeoutdurationThe time limit; default 1 hour.
--allow-hostsstringInternet hosts the build may reach; empty means in-cell only. Repeat the flag for each value.
--cachestringThe BuildCache to use; default the project's default cache.
--build-idstringThe id segment of the Build's name; the server assigns one when unset.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.

#read-logs

Reads a page of a build's log lines, oldest first. With wait, an empty page on a running build waits up to that long for new lines, so a client follows the log by passing each next_page_token back.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx build builds read-logs orgs/acme/projects/shop/builds/build

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/builds/build:readLogs · scope build:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--page-sizeintAt most this many lines; default 500, clamped to 5000.
--page-tokenstringnext_page_token of the previous page.
--waitdurationOn a running build, wait up to this long (at most 30s) for new lines before returning an empty page.