pub struct CreateBuildRequest {
pub branch: String,
pub commit: String,
pub env: Option<HashMap<String, String>>,
pub message: Option<String>,
pub pipeline_ir: Option<String>,
pub source: Option<String>,
pub source_b64: Option<String>,
pub source_sha256: Option<String>,
pub source_url: Option<String>,
}Expand description
Creates a build for a pipeline. Two paths: supply pre-rendered v0 IR
JSON in pipeline_ir (the hm run / API path), or omit pipeline_ir
to have the engine render the registered pipeline’s IR in a sandbox VM
(decision #5 — rendering never happens on the API host). The IR is then
parsed and planned in-process; on a plan/render rejection the build row
is created with its error fields set and the request returns 422.
JSON schema
{
"title": "CreateBuildRequest",
"description": "Creates a build for a pipeline. Two paths: supply
pre-rendered v0 IR JSON in `pipeline_ir` (the `hm run` / API path), or
omit `pipeline_ir` to have the engine render the registered pipeline's
IR in a sandbox VM (decision #5 — rendering never happens on the API
host). The IR is then parsed and planned in-process; on a plan/render
rejection the build row is created with its error fields set and the
request returns 422.",
"type": "object",
"required": [
"branch",
"commit"
],
"properties": {
"branch": {
"description": "Source branch.",
"type": "string"
},
"commit": {
"description": "Source commit SHA.",
"type": "string"
},
"env": {
"description": "Build-level environment variables.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"message": {
"description": "Optional build/commit message.",
"type": [
"string",
"null"
]
},
"pipeline_ir": {
"description": "The pre-rendered v0 IR JSON the engine materialises
into jobs. When absent/blank the engine renders the pipeline's IR in a
sandbox VM instead.",
"type": [
"string",
"null"
]
},
"source": {
"description": "How the build was triggered (e.g. `api`, `ui`).
Defaults to `api`.",
"type": [
"string",
"null"
]
},
"source_b64": {
"description": "Base64-encoded source tarball (expected to be
gzipped; the API validates only that it is valid base64, not the archive
format) — the `hm run` local-code upload path. When present, the API
stores it at the build's key and derives the internal,
runner-token-authenticated `source_url`; it takes precedence over any
caller-supplied `source_url`.",
"type": [
"string",
"null"
]
},
"source_sha256": {
"description": "SHA-256 of the source archive, verified by the
sandbox before rendering (in-sandbox-render path). Defaults to empty
when omitted.",
"type": [
"string",
"null"
]
},
"source_url": {
"description": "URL to the build's source archive, fetched by the
sandbox. Ignored when `source_b64` is supplied (the API derives this
internally).",
"type": [
"string",
"null"
]
}
}
}Fields§
§branch: StringSource branch.
commit: StringSource commit SHA.
env: Option<HashMap<String, String>>Build-level environment variables.
message: Option<String>Optional build/commit message.
pipeline_ir: Option<String>The pre-rendered v0 IR JSON the engine materialises into jobs. When absent/blank the engine renders the pipeline’s IR in a sandbox VM instead.
source: Option<String>How the build was triggered (e.g. api, ui). Defaults to api.
source_b64: Option<String>Base64-encoded source tarball (expected to be gzipped; the API
validates only that it is valid base64, not the archive format) —
the hm run local-code upload path. When present, the API stores it
at the build’s key and derives the internal,
runner-token-authenticated source_url; it takes precedence over
any caller-supplied source_url.
source_sha256: Option<String>SHA-256 of the source archive, verified by the sandbox before rendering (in-sandbox-render path). Defaults to empty when omitted.
source_url: Option<String>URL to the build’s source archive, fetched by the sandbox. Ignored
when source_b64 is supplied (the API derives this internally).
Trait Implementations§
Source§impl Clone for CreateBuildRequest
impl Clone for CreateBuildRequest
Source§fn clone(&self) -> CreateBuildRequest
fn clone(&self) -> CreateBuildRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more