MCPcopy Index your code
hub / github.com/coder/coder / getLastBuildJob

Method getLastBuildJob

coderd/wsbuilder/wsbuilder.go:1062–1076  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1060}
1061
1062func (b *Builder) getLastBuildJob() (*database.ProvisionerJob, error) {
1063 if b.lastBuildJob != nil {
1064 return b.lastBuildJob, nil
1065 }
1066 bld, err := b.getLastBuild()
1067 if err != nil {
1068 return nil, xerrors.Errorf("get last build to get job: %w", err)
1069 }
1070 job, err := b.store.GetProvisionerJobByID(b.ctx, bld.JobID)
1071 if err != nil {
1072 return nil, xerrors.Errorf("get build provisioner job %s: %w", bld.JobID, err)
1073 }
1074 b.lastBuildJob = &job
1075 return b.lastBuildJob, nil
1076}
1077
1078func (b *Builder) getProvisionerTags() (map[string]string, error) {
1079 if b.workspaceTags != nil {

Callers 1

checkRunningBuildMethod · 0.95

Calls 3

getLastBuildMethod · 0.95
GetProvisionerJobByIDMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected