Skip to main content

build_artifact

Function build_artifact 

Source
pub fn build_artifact(
    binary: &[u8],
    dockerfile: &str,
    project: Option<&ProjectFiles>,
) -> Result<Vec<u8>, Error>
Expand description

Zips binary with dockerfile — and, when given, the project’s dependency files — into the bytes codeArtifact.uri will point at.

binary is the daemon’s bytes rather than a path, so the caller owns the read and this function has no filesystem behaviour to stub in a test. project adds exactly two more entries, named by its Ecosystem, at the archive root beside the Dockerfile — which is the build context root, so a COPY pyproject.toml uv.lock … in the Dockerfile finds them.