GCP: Report the right error when image import fails
Fix a bug in the worker job implementation and GCP CLI upload tool, which causes the code to report wrong error instance in case the image import failed for some reason. Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
a6bc07fac0
commit
fb089cf00d
2 changed files with 2 additions and 2 deletions
|
|
@ -95,7 +95,7 @@ func main() {
|
|||
|
||||
// check error from ComputeImageImport()
|
||||
if importErr != nil {
|
||||
log.Fatalf("[GCP] Importing image failed: %v", err)
|
||||
log.Fatalf("[GCP] Importing image failed: %v", importErr)
|
||||
}
|
||||
log.Printf("[GCP] 💿 Image URL: %s", g.ComputeImageURL(imageName))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
|
|||
|
||||
// check error from ComputeImageImport()
|
||||
if importErr != nil {
|
||||
r = append(r, err)
|
||||
r = append(r, importErr)
|
||||
continue
|
||||
}
|
||||
log.Printf("[GCP] 💿 Image URL: %s", g.ComputeImageURL(t.ImageName))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue