Mousius commented on a change in pull request #10195:
URL: https://github.com/apache/tvm/pull/10195#discussion_r802507022



##########
File path: tests/scripts/task_show_node_info.sh
##########
@@ -0,0 +1,39 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -x
+
+echo "===== JENKINS INFO ====="
+echo "$NODE_NAME"
+echo "$EXECUTOR_NUMBER"
+echo "$WORKSPACE"
+echo "$BUILD_NUMBER"
+echo "$WORKSPACE"
+
+echo "===== EC2 INFO ====="
+# See 
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
+curl -w '\n' -fsSL http://169.254.169.254/latest/meta-data/ami-id || echo 
failed
+curl -w '\n' -fsSL http://169.254.169.254/latest/meta-data/instance-id || echo 
failed
+curl -w '\n' -fsSL http://169.254.169.254/latest/meta-data/instance-type || 
echo failed
+curl -w '\n' -fsSL http://169.254.169.254/latest/meta-data/hostname || echo 
failed
+curl -w '\n' -fsSL http://169.254.169.254/latest/meta-data/public-hostname || 
echo failed

Review comment:
       One clean up you could do here is just wrap it in a function 
`get_metadata` or similar but it's a minor thing.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to