CoreBuild is the serve.zone build-worker service for heavy image artifact jobs. Cloudly schedules the work; CoreBuild runs the build on a capable worker node, calls `isocreator`, uploads the finished artifact to S3-compatible storage, and returns artifact metadata and logs.
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
-`ubuntu-iso` for `amd64` and `arm64` BaseOS installer images.
-`balena-raw` for Raspberry Pi or raw-image based BaseOS builds.
Supported architecture values reported by `/corebuild/v1/capabilities`:
-`amd64`
-`arm64`
-`rpi`
CoreBuild does not store permanent build state. Each job gets a temporary workspace under the configured workdir, and the workspace is removed after the artifact is uploaded.
"logs":["Starting isocreator for amd64 ubuntu-iso"]
}
```
## Image Generation Details
For `ubuntu-iso` jobs, CoreBuild generates an isocreator config that:
- Uses Ubuntu Server `24.04` unless the job supplies `ubuntuVersion`.
- Writes `/etc/baseos/baserunner.env` with `BASEOS_CLOUDLY_URL`, `BASEOS_JOIN_TOKEN`, `BASEOS_STATE_PATH`, and heartbeat interval.
- Installs a `baseos-baserunner.service` systemd unit.
- Adds an installation script that installs Deno when missing and checks out `https://code.foss.global/serve.zone/baseos.git` into `/opt/baseos`.
- Optionally injects WiFi and SSH user configuration.
For `balena-raw` jobs, `sourceImageUrl` is required. The generated config embeds the Cloudly URL and provisioning token in the Balena/BaseOS runtime configuration and emits a compressed `baseos-<architecture>.img.xz` style artifact.
## Cloudly Integration
Cloudly discovers CoreBuild workers from settings:
-`corebuildWorkersJson`: preferred, accepts a JSON array of URL strings or objects with `url`, optional `token`, and optional `id`.
-`corebuildWorkerUrl` and `corebuildWorkerToken`: legacy single-worker settings.
Cloudly selects the first worker whose capabilities include the requested build type, architecture, and image kind. It then posts the job with the configured token in both the authorization header and request body for compatibility with CoreBuild's token validation.
## Development
Common commands:
```sh
pnpm install
pnpm build
pnpm test
pnpm run startTs
```
Important files:
| Path | Purpose |
| --- | --- |
| `ts/index.ts` | Exports the public API and starts `CoreBuildServer.fromEnv()` when run directly. |
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](./license) file.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
### Company Information
Task Venture Capital GmbH
Registered at District Court Bremen HRB 35230 HB, Germany
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.