Create a new build
client.builds.create(BuildCreateParams { source, base_image_digest, cache_scope, 5 more } body, RequestOptionsoptions?): Build { id, created_at, status, 9 more }
/builds
Creates a new build job. Source code should be uploaded as a tar.gz archive in the multipart form data.
Parameters
Returns
Create a new build
import Hypeman from '@onkernel/hypeman';
const client = new Hypeman({
apiKey: 'My API Key',
});
const build = await client.builds.create({ source: fs.createReadStream('path/to/file') });
console.log(build.id);
{
"id": "build-abc123",
"created_at": "2019-12-27T18:11:19.117Z",
"status": "queued",
"builder_instance_id": "builder_instance_id",
"completed_at": "2019-12-27T18:11:19.117Z",
"duration_ms": 0,
"error": "error",
"image_digest": "image_digest",
"image_ref": "image_ref",
"provenance": {
"base_image_digest": "base_image_digest",
"buildkit_version": "buildkit_version",
"lockfile_hashes": {
"foo": "string"
},
"source_hash": "source_hash",
"timestamp": "2019-12-27T18:11:19.117Z"
},
"queue_position": 0,
"started_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
"id": "build-abc123",
"created_at": "2019-12-27T18:11:19.117Z",
"status": "queued",
"builder_instance_id": "builder_instance_id",
"completed_at": "2019-12-27T18:11:19.117Z",
"duration_ms": 0,
"error": "error",
"image_digest": "image_digest",
"image_ref": "image_ref",
"provenance": {
"base_image_digest": "base_image_digest",
"buildkit_version": "buildkit_version",
"lockfile_hashes": {
"foo": "string"
},
"source_hash": "source_hash",
"timestamp": "2019-12-27T18:11:19.117Z"
},
"queue_position": 0,
"started_at": "2019-12-27T18:11:19.117Z"
}