Create build
$client->builds->create(string project, Revision revision, ?bool allowEmpty, ?string branch, ?string commitMessage, ?bool enableAICommitMessage, ?TargetCommitMessages targetCommitMessages, ?list<Target> targets): Build
POST/v0/builds
Create a build, on top of a project branch, against a given input revision.
The project branch will be modified so that its latest set of config files points to the one specified by the input revision.
Create build
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$client = new Client(apiKey: 'My API Key', environment: 'staging');
$build = $client->builds->create(
project: 'project',
revision: 'string',
allowEmpty: true,
branch: 'branch',
commitMessage: 'commit_message',
enableAICommitMessage: true,
targetCommitMessages: [
'cli' => 'cli',
'csharp' => 'csharp',
'go' => 'go',
'java' => 'java',
'kotlin' => 'kotlin',
'node' => 'node',
'openAPI' => 'openapi',
'php' => 'php',
'python' => 'python',
'ruby' => 'ruby',
'sql' => 'sql',
'terraform' => 'terraform',
'typescript' => 'typescript',
],
targets: [Target::NODE],
);
var_dump($build);{
"id": "id",
"config_commit": "config_commit",
"created_at": "2019-12-27T18:11:19.117Z",
"documented_spec": {
"content": "content",
"type": "content"
},
"object": "build",
"org": "org",
"project": "project",
"targets": {
"cli": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"csharp": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"go": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"java": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"kotlin": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"node": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"openapi": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"php": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"python": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"ruby": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"sql": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"terraform": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"typescript": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
}
},
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "id",
"config_commit": "config_commit",
"created_at": "2019-12-27T18:11:19.117Z",
"documented_spec": {
"content": "content",
"type": "content"
},
"object": "build",
"org": "org",
"project": "project",
"targets": {
"cli": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"csharp": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"go": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"java": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"kotlin": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"node": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"openapi": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"php": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"python": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"ruby": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"sql": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"terraform": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
},
"typescript": {
"commit": {
"status": "not_started"
},
"install_url": "install_url",
"object": "build_target",
"status": "not_started",
"build": {
"status": "not_started"
},
"lint": {
"status": "not_started"
},
"test": {
"status": "not_started"
}
}
},
"updated_at": "2019-12-27T18:11:19.117Z"
}