Fix parsing of Dockerfile steps in newer versions of Docker

Fixes https://coreosdev.atlassian.net/browse/QS-24
This commit is contained in:
Joseph Schorr 2017-10-05 16:47:47 -04:00
parent 3bef21253d
commit 95868c7b78
3 changed files with 33 additions and 3 deletions

View file

@ -11,6 +11,7 @@ from trollius import From, Return
from buildman.server import BuildJobResult
from buildman.component.basecomponent import BaseComponent
from buildman.component.buildparse import extract_current_step
from buildman.jobutil.buildjob import BuildJobLoadException
from buildman.jobutil.buildstatus import StatusHandler
from buildman.jobutil.workererror import WorkerError
@ -269,9 +270,7 @@ class BuildComponent(BaseComponent):
current_status_string = str(fully_unwrapped.encode('utf-8'))
if current_status_string and phase == BUILD_PHASE.BUILDING:
step_increment = re.search(r'Step ([0-9]+) :', current_status_string)
if step_increment:
current_step = int(step_increment.group(1))
current_step = extract_current_step(current_status_string)
# Parse and update the phase and the status_dict. The status dictionary contains
# the pull/push progress, as well as the current step index.