Builds: settings, cache, queue and supply chain
Every build runs on our build machines, in an isolated environment. This page covers how to configure a build, what the build cache does, how the queue works, and the records each build leaves behind.
Build settings#
Every app and function has its own build settings. Anything left empty is detected from the project. Changes apply from the next build; a build already running finishes with the settings it started with.
| Setting | What it does |
|---|---|
root-dir | The project's folder inside the repository, for example apps/web in a monorepo. Empty means the repository root. |
ignore-command | The ignored build step: a command run before the build; if it exits 0 the build is recorded as skipped and nothing is deployed. For example git diff --quiet HEAD^ HEAD -- apps/web. |
install-command | Overrides the dependency install, for example npm ci --legacy-peer-deps. |
build-command | Overrides the build command, for example npm run build:prod. |
output-dir | The output folder, when it differs from the detected one. |
node-version | The Node.js major version: 22, 24 or 26 (default 26). |
secret-scan | block (default): a likely real secret in the source stops the build; warn: it is reported only. |
cache | Turns the build cache on or off. |
cloudhost apps build-config shop
cloudhost apps build-config set shop root-dir apps/web
cloudhost apps build-config set shop node-version 24
cloudhost apps build-config set shop ignore-command "git diff --quiet HEAD^ HEAD -- apps/web"
cloudhost apps build-config clear shop build-commandThe build cache#
After each successful build, the installed dependencies and the framework's build cache (for example the Next.js cache) are saved for that project. The next build with the same key restores them, so the install and the build are faster. The key is made from the lock file (package-lock.json, pnpm-lock.yaml or yarn.lock), the Node.js version, the root folder and the framework.
- A change to the lock file, the Node.js version or the root folder makes a new key; the old cache is no longer used and goes in time.
- A project without a lock file is not cached.
- Each project's cache size: Hobby 500 MB, Pro 1 GB, Enterprise 2 GB. When it is full, the oldest entries go first.
- To build once without the cache, redeploy without cache; to remove everything, clear the cache.
cloudhost apps build-cache shop
cloudhost apps build-cache clear shop
cloudhost apps builds redeploy shop 83548b3f --no-cacheConcurrent builds and the queue#
Each team runs as many builds at once as its plan allows: Hobby 1, Pro 3, Enterprise by contract. More builds wait in the team's queue and run in order, oldest first. The builds list shows each queued build's place and why it waits: the team is at its concurrent builds, or it is waiting for a free build machine.
A queued or running build can be cancelled; a running build stops and deploys nothing. A redeploy builds the same source or commit again, with today's settings.
cloudhost apps builds shop
cloudhost apps builds cancel shop 83548b3f
cloudhost apps builds redeploy shop 83548b3fSecret scanning#
Each build's source is scanned, in the same isolated environment and before it is built, for keys, tokens and passwords committed by mistake. A finding only says where it is (file and line) and how likely it is a real secret (high or low); the value itself is never stored or shown.
With the block policy (default), a high finding stops the build. Remove the secret from the source, revoke and replace it, and keep it as a sensitive environment variable. With warn the build goes on and the findings show on the deployment page.
cloudhost apps builds secrets shop 83548b3f
cloudhost apps build-config set shop secret-scan warnBill of materials (SBOM)#
Every build with a lock file gets a bill of materials (SBOM) in the standard CycloneDX 1.5 format: every npm package with its version. Download it for licence review, security questionnaires or your own tools.
cloudhost apps builds sbom shop 83548b3f --output shop.cdx.jsonProvenance and verifying it#
Every build that deploys has a signed provenance record: what was built (the output's hash and version), from what (commit or source hash, lock file, SBOM hash), when, and on which build machine. It is signed with the platform's Ed25519 key; the signed bytes are CH-PROVENANCE-V1, a newline, then the statement as canonical JSON (keys sorted), so it can be checked outside the platform with the public key (GET /v1/provenance/key).
Verifying says whether the signature is valid, and whether it is the record the platform holds for that build.
cloudhost apps builds provenance shop 83548b3f
cloudhost apps builds provenance shop 83548b3f --verifyReadable build errors#
When a build fails, the platform reads its log and explains above it what happened, why, and how to fix it; when the error points to a file and line, it shows them. The CLI prints the same explanation when it follows a build.
| Kind | Means |
|---|---|
typescript | A type error in the code; the file and line are shown. |
module_not_found | An imported package or file was not found; add it to dependencies or fix the path. |
missing_env | An environment variable the build needs is not set. |
out_of_memory | The build needed more memory than the build machine has. |
timeout | The build took longer than allowed. |
install_failed | The dependency install failed (for example conflicting versions or an out-of-date lock file). |
secrets | The secret scan stopped the build. |
no_output | The build finished but no output folder was found; check output-dir. |
build_command_failed | The build command exited with an error. |