diff --git a/ci/build.py b/ci/build.py index e6a183fefa34..d6d70c320668 100755 --- a/ci/build.py +++ b/ci/build.py @@ -156,8 +156,9 @@ def build_docker(platform: str, docker_binary: str, registry: str, num_retries: @retry(subprocess.CalledProcessError, tries=num_retries) def run_cmd(): - logging.info("Running command: '%s'", ' '.join(cmd)) - check_call(cmd) + logging.info("%s: Running command: '%s'", platform, ' '.join(cmd)) + check_call(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + logging.info("%s: Successfully finished command: '%s'", platform, ' '.join(cmd)) run_cmd() # Get image id by reading the tag. It's guaranteed (except race condition) that the tag exists. Otherwise, the diff --git a/ci/docker_cache.py b/ci/docker_cache.py index 3a2a1fb415ee..f74e32e0aaae 100755 --- a/ci/docker_cache.py +++ b/ci/docker_cache.py @@ -81,7 +81,7 @@ def _build_save_container(platform, registry, load_cache) -> Optional[str]: load_docker_cache(registry=registry, docker_tag=docker_tag) # Start building - logging.debug('Building %s as %s', platform, docker_tag) + logging.debug('%s: Building as %s', platform, docker_tag) try: # Increase the number of retries for building the cache. image_id = build_util.build_docker(docker_binary='docker', platform=platform, registry=registry, num_retries=10, no_cache=False) @@ -108,7 +108,7 @@ def _upload_image(registry, docker_tag, image_id) -> None: # We don't have to retag the image since it is already in the right format logging.info('Uploading %s (%s) to %s', docker_tag, image_id, registry) push_cmd = ['docker', 'push', docker_tag] - subprocess.check_call(push_cmd) + subprocess.check_call(push_cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) @retry(target_exception=subprocess.CalledProcessError, tries=DOCKERHUB_LOGIN_NUM_RETRIES, @@ -158,12 +158,13 @@ def load_docker_cache(registry, docker_tag) -> None: return assert docker_tag - logging.info('Loading Docker cache for %s from %s', docker_tag, registry) + logging.info('%s: loading cache from %s', docker_tag, registry) pull_cmd = ['docker', 'pull', docker_tag] # Don't throw an error if the image does not exist - subprocess.run(pull_cmd, timeout=DOCKER_CACHE_TIMEOUT_MINS*60) - logging.info('Successfully pulled docker cache') + subprocess.run(pull_cmd, timeout=DOCKER_CACHE_TIMEOUT_MINS*60, + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + logging.info('%s: Successfully pulled docker cache', docker_tag) def delete_local_docker_cache(docker_tag):