Skip to content

Build Workflow

The builder runs build jobs for DieselEngine projects. Agents and scripts use it through the build_* MCP tools to run toolchains such as npm, node, git, java, go, rust, python, and make in the builder sidecar.

Activating the Builder

DieselEngine enables the builder when the registry contains:

  • BUILDER_ENABLED set to true
  • BUILDER_AUTH_TOKEN set to a non-empty shared token

BUILDER_ENABLED defaults to true, but setting it explicitly makes the activation visible and easy to verify.

WARNING

The BUILDER_AUTH_TOKEN value must match the token configured for the builder sidecar. Treat it as a secret.

Option 1: Ask an MCP Agent

If you are using an MCP-connected agent, ask it to set the registry keys for you:

text
Set BUILDER_ENABLED to true and set BUILDER_AUTH_TOKEN to <your-builder-token>.
Then verify the builder with build_toolchain.

The agent should call the registry tools:

text
registry_set key=BUILDER_ENABLED value=true
registry_set key=BUILDER_AUTH_TOKEN value=<your-builder-token>
build_toolchain

If build_toolchain returns the available tool versions, the builder is active.

Option 2: Use /registry Yourself

From the DieselEngine console, set the same registry keys manually:

text
/registry set BUILDER_ENABLED true
/registry set BUILDER_AUTH_TOKEN "<your-builder-token>"

Check the current values with:

text
/registry get BUILDER_ENABLED
/registry get BUILDER_AUTH_TOKEN

Then ask an MCP agent to run build_toolchain, or use a build operation such as build_deploy to confirm the sidecar responds.

Registry Keys

KeyRequiredDefaultPurpose
BUILDER_ENABLEDNotrueEnables or disables builder access from DieselEngine. Set to false as a kill switch.
BUILDER_AUTH_TOKENYesShared secret used by DieselEngine to authenticate to the builder sidecar.
BUILDER_BASE_URLNohttp://builder:7070Builder sidecar URL. The default is correct for the Docker Compose stack.
BUILDER_DEFAULT_TIMEOUT_MSNo120000Default timeout for build jobs.
BUILDER_MAX_WAIT_MSNo600000Maximum wait time for build_wait.

Quick Check

After activation, this MCP flow should work:

text
build_toolchain

If it fails with Builder sidecar is not configured, BUILDER_AUTH_TOKEN is missing or blank in the registry.

If it fails with a connection error, the registry keys are set but the builder sidecar is not reachable at BUILDER_BASE_URL.

Deploying with the Builder

Once active, agents can build and publish a project with:

text
build_deploy source="/vue_project" deploy="/dist" register.route="/"
build_wait jobId="<job-id>"

Successful deploy jobs sync the built files back into DieselEngine and can register a static folder ingress automatically when register.route is provided.

DieselEngine Scripting Documentation