()
| 1060 | } |
| 1061 | |
| 1062 | func (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 | |
| 1078 | func (b *Builder) getProvisionerTags() (map[string]string, error) { |
| 1079 | if b.workspaceTags != nil { |
no test coverage detected