In version v0.4.0 we have added our own implementation of generating language types from Buildkite's Pipeline Schema. That means some of the types have been renamed or in some cases changed shape to adhere 1:1 with the schema.
Below you will find a list of the breaking changes in each language.
notifyno longer accepts an Enum and now accepts a defined Union of strings. You will need to update all Enum values to their respective string.
blocked_stateis no longer an Enum and is defined as a Union of strings. You will need to update all Enum values to their respective string.
concurrency_methodis no longer an Enum and is defined as a Union of strings. You will need to update all Enum values to their respective string.notifyno longer accepts an Enum and now accepts a defined Union of strings. You will need to update all Enum values to their respective string.retry.automatic.signal_reasonis no longer an Enum and is defined as a Union of strings. You will need to update all Enum values to their respective string.
notifyno longer accepts an Enum and now accepts a defined Union of strings. You will need to update all Enum values to their respective string.
We have implemented Pydantic for our types alongside our TypedDict types.
- The names of the underlying types of the
notifyfield have changed to adhere to how they are named in the pipeline schema. You will need to update the names of your constructors.
blocked_stateis no longer defined as an Enum and is now defined as a Literal of strings. You will need to update all Enum values to their respective string.
concurrency_methodis no longer an Enum and is defined as a Union of strings. You will need to update all Enum values to their respective string.- The names of the underlying types of the
notifyfield have changed to adhere to how they are named in the pipeline schema. You will need to update the names of your constructors. retry.automatic.signal_reasonis no longer an Enum and is defined as a Union of strings. You will need to update all Enum values to their respective string.
- The names of the underlying types of the
notifyfield have changed to adhere to how they are named in the pipeline schema. You will need to update the names of your constructors.
AllowDependencyFailureis no longer abooland is now a struct. Example usage:
// Boolean
step := buildkite.BlockStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.BlockStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
String: buildkite.Value("true"),
}
}BlockedStateis no longer a struct and is now a map, and has been renamed. For example,BlockedState.Failedcan be updated to eitherBlockStepBlockedStateValues["failed"]orBlockStepBlockedState("failed").Branchesis no longer a[]stringand is a now a struct namedBranchesExample usage:
step := buildkite.BlockStep{
Branches: &buildkite.Branches{
String: buildkite.Value("one"),
}
}
listValues := []string{"one","two"}
step := buildkite.BlockStep{
Branches: &buildkite.Branches{
StringArray: listValues,
}
}DependsOnis no longer an interface and is now a struct. Example usage:
singleValue := "step"
step := buildkite.BlockStep{
DependsOn: &buildkite.DependsOn{
String: buildkite.Value("step"),
}
}
step := buildkite.BlockStep{
DependsOn: []buildkite.DependsOnListItem{
{String: buildkite.Value("one")},
{
DependsOnList: &buildkite.DependsOnListObject{
Step: buildkite.Value("two"),
},
}
}
}Fieldsis no longer defined as an interface and is now defined as a struct. Example usage:
step := buildkite.BlockStep{
Fields: []buildkite.FieldsItem{
// Text Field
{
TextField: &buildkite.TextField{
Default: buildkite.Value("default"),
Format: buildkite.Value("format"),
Hint: buildkite.Value("hint"),
Key: buildkite.Value("key"),
Required: &buildkite.TextFieldRequired{
String: buildkite.Value("true"),
},
Text: buildkite.Value("text"),
},
},
// Select Field
{
SelectField: &buildkite.SelectField{
Default: &buildkite.SelectFieldDefault{
String: buildkite.Value("default"),
},
Hint: buildkite.Value("hint"),
Key: buildkite.Value("key"),
Select: buildkite.Value("select"),
Multiple: &buildkite.SelectFieldMultiple{
Bool: buildkite.Value(true),
},
Required: &buildkite.SelectFieldRequired{
Bool: buildkite.Value(true),
},
Options: []buildkite.SelectFieldOption{
{Value: buildkite.Value("optionValue")},
},
}
},
},
}Agentsis no longer defined as amap[string]interface{}and is now defined as a struct. Example usage:
// List
step := buildkite.CommandStep{
Agents: &buildkite.Agents{
AgentsList: buildkite.Value([]string{"one","two"})
}
}
// Object
step := buildkite.CommandStep{
Agents: &buildkite.Agents{
AgentsObject: buildkite.Value(map[string]interface{}{
"one": "two",
})
}
}AllowDependencyFailureis no longer abooland is now a struct. Example usage:
// Boolean
step := buildkite.CommandStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.CommandStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
String: buildkite.Value("true"),
}
}ArtifactPathsis no longer defined as[]stringand is now a struct namedCommandStepArtifactPaths. Example usage:
// String
step := buildkite.CommandStep{
ArtifactPaths: &buildkite.CommandStepArtifactPaths{
String: buildkite.Value("path"),
},
}
// StringArray
step := buildkite.CommandStep{
ArtifactPaths: &buildkite.CommandStepArtifactPaths{
StringArray: []string{"one","two"},
},
}Branchesis no longer a[]stringand is a now a struct namedBranchesExample usage:
step := buildkite.CommandStep{
Branches: &buildkite.Branches{
String: buildkite.Value("one"),
}
}
listValues := []string{"one","two"}
step := buildkite.CommandStep{
Branches: &buildkite.Branches{
StringArray: listValues,
}
}Cacheis no longer defined as an interface and is now defined as a struct. Example usage:
// String
step := buildkite.CommandStep{
Cache: &buildkite.Cache{
String: buildkite.Value("path"),
},
}
// String Array
step := buildkite.CommandStep{
Cache: &buildkite.Cache{
StringArray: []string{"one","two"},
},
}
// Object
step := buildkite.CommandStep{
Cache: &buildkite.Cache{
Cache: &buildkite.CacheObject{
Paths: []string{"one", "two"},
Size: buildkite.Value("size"),
Name: buildkite.Value("name"),
},
},
}CancelOnBuildFailingis no longer abooland is now a struct. Example usage:
// Bool
step := buildkite.CommandStep{
CancelOnBuildFailing: &buildkite.CancelOnBuildFailing{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.CommandStep{
CancelOnBuildFailing: &buildkite.CancelOnBuildFailing{
String: buildkite.Value("true"),
}
}Commandis no longer astringand is now a struct namedCommandStepCommand. Example usage:
// String
step := buildkite.CommandStep{
Command: &buildkite.CommandStepCommand{
String: buildkite.Value("run.sh"),
}
}
// String Array
step := buildkite.CommandStep{
Command: &buildkite.CommandStepCommand{
StringArray: []string{"one","two"},
}
}Commandsis no longer astringand is now a struct namedCommandStepCommand. Example usage:
// String
step := buildkite.CommandStep{
Commands: &buildkite.CommandStepCommand{
String: buildkite.Value("run.sh"),
}
}
// String Array
step := buildkite.CommandStep{
Commands: &buildkite.CommandStepCommand{
StringArray: []string{"one","two"},
}
}Concurrencyis no longer anint64and is now anint.ConcurrencyMethod's type has been renamed toCommandStepConcurrencyMethod.DependsOnis no longer an interface and is now a struct. Example usage:
singleValue := "step"
step := buildkite.CommandStep{
DependsOn: &buildkite.DependsOn{
String: buildkite.Value("step"),
}
}
step := buildkite.CommandStep{
DependsOn: []buildkite.DependsOnListItem{
{String: buildkite.Value("one")},
{
DependsOnList: &buildkite.DependsOnListObject{
Step: buildkite.Value("two"),
},
}
}
}Matrixis no longer an interface and is now a struct namedMatrix. Example usage:
// List
step := buildkite.CommandStep{
Matrix: &buildkite.Matrix{
MatrixElementList: buildkite.Value(buildkite.MatrixElementList{
{
String: buildkite.Value("value"),
},
{
Bool: buildkite.Value(true),
},
{
Int: buildkite.Value(1),
},
}),
},
}
// Object
step := buildkite.CommandStep{
Matrix: &buildkite.Matrix{
MatrixObject: &buildkite.MatrixObject{
Setup: &buildkite.MatrixSetup{
MatrixSetup: buildkite.Value(map[string][]buildkite.MatrixElement{
"foo": {
{
String: buildkite.Value("bar"),
},
{
Bool: buildkite.Value(true),
},
{
Int: buildkite.Value(1),
},
},
}),
},
},
},
}Notifyis no longer an interface and is nowCommandStepNotify. You will need to update any notify blocks with the new types. Example usage:
step := buildkite.CommandStep{
Notify: &buildkite.CommandStepNotify{
{
NotifySlack: &buildkite.NotifySlack{
Slack: &buildkite.NotifySlackSlack{
String: buildkite.Value("#channel"),
},
},
},
},
}Parallelismis no longer anint64and is now anint.Pluginsis no longer amap[string]interface{}and is now a struct. Example usage:
step := buildkite.CommandStep{
Plugins: &buildkite.Plugins{
PluginsList: &buildkite.PluginsList{
{
PluginsList: &buildkite.PluginsListObject{
"docker": map[string]interface{}{
"foo": "bar",
},
},
},
},
},
}Priorityis no longer anint64and is now anint.Retryis no longer an interface and is now a struct namedCommandStepRetry. Example usage:
// Automatic
step := buildkite.CommandStep{
Retry: &buildkite.CommandStepRetry{
Automatic: &buildkite.CommandStepAutomaticRetry{
AutomaticRetryList: buildkite.Value([]buildkite.AutomaticRetry{
{
Limit: buildkite.Value(1),
},
}),
},
},
}Signature's type has been renamed toCommandStepSignature. Example usage:
step := buildkite.CommandStep{
Signature: &buildkite.CommandStepSignature{
Algorithm: buildkite.Value("algo"),
SignedFields: []string{"one","two"},
Value: buildkite.Value("value"),
},
}SoftFailis no longer an interface and is now a struct namedSoftFail. Example usage:
// Simple
step := buildkite.CommandStep{
SoftFail: &buildkite.SoftFail{
SoftFailEnum: &buildkite.SoftFailEnum{
Bool: buildkite.Value(true),
},
},
}
// List
step := buildkite.CommandStep{
SoftFail: &buildkite.SoftFail{
SoftFailList: []buildkite.SoftFailObject{
{
ExitStatus: &buildkite.SoftFailObjectExitStatus{
Int: buildkite.Value(1),
},
},
},
},
}TimeoutInMinutesis no longer anint64and is now anint.
AllowDependencyFailureis no longer abooland is now a struct named. Example usage:
// Boolean
step := buildkite.GroupStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.GroupStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
String: buildkite.Value("true"),
}
}DependsOnis no longer an interface and is now a struct. Example usage:
singleValue := "step"
step := buildkite.GroupStep{
DependsOn: &buildkite.DependsOn{
String: buildkite.Value("step"),
}
}
step := buildkite.GroupStep{
DependsOn: []buildkite.DependsOnListItem{
{String: buildkite.Value("one")},
{
DependsOnList: &buildkite.DependsOnListObject{
Step: buildkite.Value("two"),
},
}
}
}Notifyis no longer an interface and is nowBuildNotify. You will need to update any notify blocks with the new types. Example usage:
step := buildkite.GroupStep{
Notify: &buildkite.BuildNotify{
{
NotifySlack: &buildkite.NotifySlack{
Slack: &buildkite.NotifySlackSlack{
String: buildkite.Value("#channel"),
},
},
},
},
}Skipis no longer abooland is now a struct namedSkip. Example usage:
// Bool
step := buildkite.GroupStep{
Skip: &buildkite.Skip{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.GroupStep{
Skip: &buildkite.Skip{
String: buildkite.Value("true"),
}
}Stepsis no longer defined as a slice of interfaces and now is a slice of structs. Example usage:
steps := buildkite.GroupStep{
Steps: &buildkite.GroupSteps{
{
CommandStep: &buildkite.CommandStep{
Command: &buildkite.CommandStepCommand{
String: buildkite.Value("command.sh"),
},
},
},
},
}AllowDependencyFailureis no longer abooland is now a struct named. Example usage:
// Boolean
step := buildkite.InputStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.InputStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
String: buildkite.Value("true"),
}
}Branchesis no longer a[]stringand is now a struct namedBranches.Example usage:
step := buildkite.InputStep{
Branches: &buildkite.Branches{
String: buildkite.Value("one"),
}
}
listValues := []string{"one","two"}
step := buildkite.InputStep{
Branches: &buildkite.Branches{
StringArray: listValues,
}
}BlockedStateis no longer a struct and is now a map, and has been renamed. For example,BlockedState.Failedcan be updated to eitherInputStepBlockedStateValues["failed"]orInputStepBlockedState("failed").DependsOnis no longer an interface and is now a struct. Example usage:
singleValue := "step"
step := buildkite.InputStep{
DependsOn: &buildkite.DependsOn{
String: buildkite.Value("step"),
}
}
step := buildkite.InputStep{
DependsOn: []buildkite.DependsOnListItem{
{String: buildkite.Value("one")},
{
DependsOnList: &buildkite.DependsOnListObject{
Step: buildkite.Value("two"),
},
}
}
}Fieldsis no longer defined as an interface and is now defined as a struct. Example usage:
step := buildkite.InputStep{
Fields: []buildkite.FieldsItem{
// Text Field
{
TextField: &buildkite.TextField{
Default: buildkite.Value("default"),
Format: buildkite.Value("format"),
Hint: buildkite.Value("hint"),
Key: buildkite.Value("key"),
Required: &buildkite.TextFieldRequired{
String: buildkite.Value("true"),
},
Text: buildkite.Value("text"),
},
},
// Select Field
{
SelectField: &buildkite.SelectField{
Default: &buildkite.SelectFieldDefault{
String: buildkite.Value("default"),
},
Hint: buildkite.Value("hint"),
Key: buildkite.Value("key"),
Select: buildkite.Value("select"),
Multiple: &buildkite.SelectFieldMultiple{
Bool: buildkite.Value(true),
},
Required: &buildkite.SelectFieldRequired{
Bool: buildkite.Value(true),
},
Options: []buildkite.SelectFieldOption{
{Value: buildkite.Value("optionValue")},
},
}
},
},
}AllowDependencyFailureis no longer abooland is now a struct. Example usage:
// Boolean
step := buildkite.TriggerStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.TriggerStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
String: buildkite.Value("true"),
}
}Asyncis no longer abooland is now a struct namedTriggerStepAsync. Example usage:
// Boolean
step := buildkite.TriggerStep{
Async: &buildkite.TriggerStepAsync{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.TriggerStep{
Async: &buildkite.TriggerStepAsync{
String: buildkite.Value("true"),
}
}Branchesis no longer a[]stringand is a now a struct nameBranchesExample usage:
step := buildkite.TriggerStep{
Branches: &buildkite.Branches{
String: buildkite.Value("one"),
}
}
listValues := []string{"one","two"}
step := buildkite.TriggerStep{
Branches: &buildkite.Branches{
StringArray: listValues,
}
}- The type for
Buildhas been renamed fromBuildtoTriggerStepBuild. DependsOnis no longer an interface and is now a struct. Example usage:
step := buildkite.TriggerStep{
DependsOn: &buildkite.DependsOn{
String: buildkite.Value("step"),
}
}
step := buildkite.TriggerStep{
DependsOn: []buildkite.DependsOnListItem{
{String: buildkite.Value("one")},
{
DependsOnList: &buildkite.DependsOnListObject{
Step: buildkite.Value("two"),
},
}
}
}Skipis no longer abooland is now a struct namedSkip. Example usage:
// Bool
step := buildkite.TriggerStep{
Skip: &buildkite.Skip{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.TriggerStep{
Skip: &buildkite.Skip{
String: buildkite.Value("true"),
}
}SoftFailis no longer an interface and is now a struct. Example usage:
// Simple
step := buildkite.TriggerStep{
SoftFail: &buildkite.SoftFail{
SoftFailEnum: &buildkite.SoftFailEnum{
Bool: buildkite.Value(true),
},
},
}
// List
step := buildkite.TriggerStep{
SoftFail: &buildkite.SoftFail{
SoftFailList: []buildkite.SoftFailObject{
{
ExitStatus: &buildkite.SoftFailObjectExitStatus{
Int: buildkite.Value(1),
},
},
},
},
}AllowDependencyFailureis no longer abooland is now a struct named. Example usage:
// Boolean
step := buildkite.WaitStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
Bool: buildkite.Value(true),
}
}
// String
step := buildkite.WaitStep{
AllowDependencyFailure: &buildkite.AllowDependencyFailure{
String: buildkite.Value("true"),
}
}Branchesis no longer a[]stringand is a now a struct nameBranchesExample usage:
step := buildkite.WaitStep{
Branches: &buildkite.Branches{
String: buildkite.Value("one"),
}
}
listValues := []string{"one","two"}
step := buildkite.WaitStep{
Branches: &buildkite.Branches{
StringArray: listValues,
}
}ContinueOnFailureis no longer abooland is not a struct namedWaitStepContinueOnFailure. Example usage:
// Bool
step := buildkite.WaitStep{
ContinueOnFailure: &buildkite.WaitStepContinueOnFailure{
Bool: buildkite.Value(true),
},
}
// String
step := buildkite.WaitStep{
ContinueOnFailure: &buildkite.WaitStepContinueOnFailure{
String: buildkite.Value("true"),
},
}DependsOnis no longer an interface and is now a struct. Example usage:
step := buildkite.WaitStep{
DependsOn: &buildkite.DependsOn{
String: buildkite.Value("step"),
}
}
step := buildkite.WaitStep{
DependsOn: []buildkite.DependsOnListItem{
{String: buildkite.Value("one")},
{
DependsOnList: &buildkite.DependsOnListObject{
Step: buildkite.Value("two"),
},
}
}
}No breaking changes.