Failed sets the provisioner job to a failed state. Use WithJobError and WithJobErrorCode options to set the error message and code. If no error message is provided, "failed" is used as the default.
(opts ...BuilderOption)
| 262 | // WithJobErrorCode options to set the error message and code. If no error |
| 263 | // message is provided, "failed" is used as the default. |
| 264 | func (b WorkspaceBuildBuilder) Failed(opts ...BuilderOption) WorkspaceBuildBuilder { |
| 265 | //nolint: revive // returns modified struct |
| 266 | b.jobStatus = database.ProvisionerJobStatusFailed |
| 267 | for _, opt := range opts { |
| 268 | opt(&b) |
| 269 | } |
| 270 | if b.jobError == "" { |
| 271 | b.jobError = "failed" |
| 272 | } |
| 273 | return b |
| 274 | } |
| 275 | |
| 276 | // Do generates all the resources associated with a workspace build. |
| 277 | // Template and TemplateVersion will be optionally populated if no |
no outgoing calls