Identify build commands separately from their output.

This commit is contained in:
yackob03 2014-02-10 15:03:55 -05:00
parent 9e8f765040
commit 52d2be7953

View file

@ -101,14 +101,17 @@ class DockerfileBuildContext(object):
built_image = None
for status in build_status:
logger.debug('Status: %s', str(status.encode('utf-8')))
build_logs.append_log_message(self._build_uuid, str(status))
step_increment = re.search(r'Step ([0-9]+) :', status)
if step_increment:
build_logs.append_log_entry({'message': str(status),
'is_command': True})
current_step = int(step_increment.group(1))
logger.debug('Step now: %s/%s' % (current_step, self._num_steps))
with self._status as status:
status['current_command'] = current_step
continue
else:
build_logs.append_log_message(self._build_uuid, str(status))
complete = re.match(r'Successfully built ([a-z0-9]+)$', status)
if complete: