You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ke...@apache.org on 2018/11/27 23:07:31 UTC
[incubator-mxnet] branch master updated: Be more explicit about the
exit status of the container (#13425)
This is an automated email from the ASF dual-hosted git repository.
kellen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new d6e42d8 Be more explicit about the exit status of the container (#13425)
d6e42d8 is described below
commit d6e42d8c13d717e9e56027713b3af8698ef36554
Author: Pedro Larroy <92...@users.noreply.github.com>
AuthorDate: Wed Nov 28 00:07:16 2018 +0100
Be more explicit about the exit status of the container (#13425)
---
ci/build.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/ci/build.py b/ci/build.py
index 628f49e..acf277d 100755
--- a/ci/build.py
+++ b/ci/build.py
@@ -326,6 +326,10 @@ def container_run(platform: str,
wait_result = container.wait(timeout=container_wait_s)
logging.info("Container exit status: %s", wait_result)
ret = wait_result.get('StatusCode', 200)
+ if ret != 0:
+ logging.error("Container exited with an error 😞")
+ else:
+ logging.info("Container exited with success 👍")
except Exception as e:
logging.exception(e)
ret = 150
@@ -384,11 +388,15 @@ def script_name() -> str:
""":returns: script name with leading paths removed"""
return os.path.split(sys.argv[0])[1]
-
-def main() -> int:
+def config_logging():
+ import time
logging.getLogger().setLevel(logging.INFO)
logging.getLogger("requests").setLevel(logging.WARNING)
- logging.basicConfig(format='{}: %(asctime)-15s %(message)s'.format(script_name()))
+ logging.basicConfig(format='{}: %(asctime)sZ %(levelname)s %(message)s'.format(script_name()))
+ logging.Formatter.converter = time.gmtime
+
+def main() -> int:
+ config_logging()
logging.info("MXNet container based build tool.")
log_environment()