File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -417,15 +417,18 @@ def reset_userinfo(tarinfo):
417
417
418
418
except engine .getEngineException (self .conf ) as e :
419
419
image .status = Status .ERROR
420
- if isinstance (e , docker .errors .BuildError ):
421
- for line in e .build_log :
422
- if 'stream' in line :
423
- self .logger .error (line ['stream' ].strip ())
424
- if isinstance (e , podman .errors .exceptions .BuildError ):
425
- for line in e .build_log :
426
- line = json .loads (line )
427
- if 'stream' in line :
428
- self .logger .error (line ['stream' ].strip ())
420
+ if self .conf .engine == engine .Engine .DOCKER .value :
421
+ if isinstance (e , docker .errors .BuildError ):
422
+ for line in e .build_log :
423
+ if 'stream' in line :
424
+ self .logger .error (line ['stream' ].strip ())
425
+ elif self .conf .engine == engine .Engine .PODMAN .value :
426
+ if isinstance (e , podman .errors .exceptions .BuildError ):
427
+ for line in e .build_log :
428
+ line = json .loads (line )
429
+ if 'stream' in line :
430
+ self .logger .error (line ['stream' ].strip ())
431
+
429
432
self .logger .exception ('Unknown container engine '
430
433
'error when building' )
431
434
You can’t perform that action at this time.
0 commit comments