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.
ParametersExpand Collapse
body BuildNewParams
Revision param.Field[BuildNewParamsRevisionUnion]
Branch param.Field[string]optional
The project branch to use for the build. If not specified, the
branch is inferred from the revision, and will 400 when that
is not possible.
EnableAICommitMessage param.Field[bool]optional
Whether to generate AI-powered commit messages for the build.
Cannot be combined with commit_message or target_commit_messages.
Optional commit messages to use for each SDK when making a new commit.
SDKs not represented in this object will fallback to the optional
commit_message parameter, or will fallback further to the default
commit message.
ReturnsExpand Collapse
type Build struct{…}
Targets BuildTargets
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Commit BuildTargetCommitUnion
type BuildTargetCommitCompleted struct{…}
Commit Commit
Completed BuildTargetCommitCompletedCompleted
deprecated
Commit Commit
Conclusion string
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
type CheckStepCompleted struct{…}
Completed CheckStepCompletedCompleted
deprecated
Conclusion string
Create build
package main
import (
"context"
"fmt"
"github.com/stainless-api/stainless-api-go"
"github.com/stainless-api/stainless-api-go/option"
)
func main() {
client := stainless.NewClient(
option.WithAPIKey("My API Key"),
)
build, err := client.Builds.New(context.TODO(), stainless.BuildNewParams{
Project: stainless.String("project"),
Revision: stainless.BuildNewParamsRevisionUnion{
OfString: stainless.String("string"),
},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", build.ID)
}
{
"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"
}