worker/gcp: return error if job doesn't specify object key
The object key is required in order to upload the image to GCP. Return an error if it is not set.
This commit is contained in:
parent
809107cd45
commit
dd36fce63c
1 changed files with 5 additions and 0 deletions
|
|
@ -580,6 +580,11 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
|
|||
break
|
||||
}
|
||||
|
||||
if targetOptions.Object == "" {
|
||||
targetResult.TargetError = clienterrors.WorkerClientError(clienterrors.ErrorInvalidTargetConfig, "No GCP object key provided", nil)
|
||||
break
|
||||
}
|
||||
|
||||
bucket := targetOptions.Bucket
|
||||
if bucket == "" {
|
||||
bucket = impl.GCPConfig.Bucket
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue