Overview
Give BuildKit an exact source: a release tag, a published build or an allowed branch. It resolves it to a single commit, checks that your environment has what the build needs and which nanos world version the build targets, then fetches every component at a fixed version.
The output is the Foundation distribution, a manifest that describes it and a checksum list. Built twice from the same source, a reproducible build gives byte-for-byte identical files, so anyone can rebuild a published version and compare.
BuildKit runs the same way on a developer machine and in continuous integration. It is not a server manager, a launcher, a control panel or a marketplace.
Channels
Each build is published to one channel. A release can later be promoted to another channel by the release team, with a reason recorded in the audit log.
- Stable (
stable). Recommended for servers with players. - Release candidate (
rc). The next stable version, published for a last round of testing. - Beta (
beta). New features that may still change. Use it on test servers. - Nightly (
nightly). Built automatically from the development branch. Expect breaking changes.
What a distribution contains
A published build lists these files:
- Package archive: the distribution itself.
- BuildKit manifest: the JSON description below.
- Checksums: a list of SHA-256 sums, also served by the site.
- Signature, when the release workflow signs the files.
- Software bill of materials, when the release workflow produces one.
Manifest format
The manifest is a JSON document, version 1 of the format. This site only accepts a manifest that agrees with the build it is sent with: same Foundation version, commit, channel and nanos world version.
| Field | Meaning |
|---|---|
| schema | Format version, currently 1. |
| buildkit.version | Version of BuildKit that made the build. |
| foundation.version | Foundation version that was built. |
| nanos_world | Oldest nanos world version supported, and the version it was tested with. |
| source | Repository (owner/name), reference and 40-character commit. |
| channel | stable, rc, beta or nightly. |
| platform | any, windows, linux or macos. |
| reproducible | true when the build is reproducible. |
| source_date_epoch | The fixed timestamp used for every file, in seconds since 1970. |
| components | Name, version, source and SHA-256 of each component, 200 at most. |
| files | Path, size and SHA-256 of each file in the archive, 5,000 at most. |
Checking files
Download the files and the SHA256SUMS list into the same folder, then check them:
sha256sum --check SHA256SUMS
shasum -a 256 --check SHA256SUMS
Every line must answer OK. The manifest then tells you which commit the files come from.
Release API
The API is public, read-only and returns JSON, except the checksum list which is plain text. Add product=buildkit to the release endpoints for BuildKit itself.
- Latest release in each channel
GET /api/v1/releases?product=foundation|buildkit - One build, with its artifacts and links
GET /api/v1/builds/{product}/{build} - The manifest of a Foundation build
GET /api/v1/builds/foundation/{build}/manifest - The SHA256SUMS list of a build
GET /api/v1/builds/{product}/{build}/sha256sums - The compatibility table above
GET /api/v1/compatibility
Publishing from CI
Builds are published by continuous integration only, with a token that the release team creates for one product. A token for BuildKit cannot publish Foundation, and the other way round.
- Register the build with a signed POST to /api/ci/v1/builds. The answer contains one upload address per file.
- Upload each file to its address.
- Confirm with a signed POST to the complete address returned at registration. The site checks every file against its declared size and SHA-256 before publishing it.
Each request carries the token as a bearer token and three headers: X-Foundation-Timestamp (Unix time), X-Foundation-Nonce (16 to 64 letters, digits or hyphens, used once) and X-Foundation-Signature: the hexadecimal HMAC-SHA256, keyed with the token secret, of the timestamp, nonce, method, path and SHA-256 of the body, joined by line feeds. Requests older than five minutes are refused.