|
@@ -59,7 +59,6 @@ from .utils import parse_seconds_float
|
|
from .utils import truncate_id
|
|
from .utils import truncate_id
|
|
from .utils import unique_everseen
|
|
from .utils import unique_everseen
|
|
|
|
|
|
-
|
|
|
|
log = logging.getLogger(__name__)
|
|
log = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
|
@@ -1049,8 +1048,11 @@ class Service(object):
|
|
return [build_spec(secret) for secret in self.secrets]
|
|
return [build_spec(secret) for secret in self.secrets]
|
|
|
|
|
|
def build(self, no_cache=False, pull=False, force_rm=False, memory=None, build_args_override=None,
|
|
def build(self, no_cache=False, pull=False, force_rm=False, memory=None, build_args_override=None,
|
|
- gzip=False, rm=True):
|
|
|
|
- log.info('Building %s' % self.name)
|
|
|
|
|
|
+ gzip=False, rm=True, silent=False):
|
|
|
|
+ output_stream = open(os.devnull, 'w')
|
|
|
|
+ if not silent:
|
|
|
|
+ output_stream = sys.stdout
|
|
|
|
+ log.info('Building %s' % self.name)
|
|
|
|
|
|
build_opts = self.options.get('build', {})
|
|
build_opts = self.options.get('build', {})
|
|
|
|
|
|
@@ -1091,7 +1093,7 @@ class Service(object):
|
|
)
|
|
)
|
|
|
|
|
|
try:
|
|
try:
|
|
- all_events = list(stream_output(build_output, sys.stdout))
|
|
|
|
|
|
+ all_events = list(stream_output(build_output, output_stream))
|
|
except StreamOutputError as e:
|
|
except StreamOutputError as e:
|
|
raise BuildError(self, six.text_type(e))
|
|
raise BuildError(self, six.text_type(e))
|
|
|
|
|