summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorVanessa Rene Valderrama <vvalderrama@linuxfoundation.org>2021-03-26 20:45:19 +0000
committerGerrit Code Review <gerrit@fd.io>2021-03-26 20:45:19 +0000
commitf3fc914e1f5d8f4fc3800f6eb29834f263c499f8 (patch)
treeec1ede426d3dce3218a41b1cb45e9823416c20e3 /jjb
parentf1e26a7080bfce958addb6d6d06f7d190e761a17 (diff)
parentd332b6b464cd1e9e78ee066cfd2af7e0cfc55f66 (diff)
Merge "Include container id in console log."
Diffstat (limited to 'jjb')
-rwxr-xr-xjjb/scripts/post_build_deploy_archives.sh14
-rwxr-xr-xjjb/scripts/setup_executor_env.sh9
2 files changed, 19 insertions, 4 deletions
diff --git a/jjb/scripts/post_build_deploy_archives.sh b/jjb/scripts/post_build_deploy_archives.sh
index 0a47903e..b7e7cec4 100755
--- a/jjb/scripts/post_build_deploy_archives.sh
+++ b/jjb/scripts/post_build_deploy_archives.sh
@@ -19,6 +19,20 @@ set +e # Do not affect the build result if some part of archiving fails.
WS_ARCHIVES_DIR="$WORKSPACE/archives"
BUILD_ENV_LOG="$WS_ARCHIVES_DIR/_build-enviroment-variables.log"
+# Output executor runtime attributes [again] in case the job fails prior to
+# running setup_executor_env.sh
+long_line="************************************************************************"
+OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+OS_ARCH=$(uname -m)
+echo "$long_line"
+echo "Executor Runtime Attributes:"
+echo "OS: $OS_ID-$OS_VERSION_ID"
+echo "Arch: $OS_ARCH"
+echo "Nomad Hostname: $(grep search /etc/resolv.conf | cut -d' ' -f2 | head -1)"
+echo "Container ID: $(hostname)"
+echo "$long_line"
+
# Generate gdb-command script to output vpp stack traceback from core files.
gdb_cmdfile="/tmp/gdb-commands"
cat >$gdb_cmdfile <<'__END__'
diff --git a/jjb/scripts/setup_executor_env.sh b/jjb/scripts/setup_executor_env.sh
index fbbcc5a0..f9aecfa4 100755
--- a/jjb/scripts/setup_executor_env.sh
+++ b/jjb/scripts/setup_executor_env.sh
@@ -26,10 +26,11 @@ long_line="*********************************************************************
downloads_cache="/root/Downloads"
echo "$long_line"
-echo "Executor OS: $OS_ID-$OS_VERSION_ID"
-echo "Executor Arch: $OS_ARCH"
-# TODO: fix this to print nomad server hostname
-echo "Executor hostname: $(grep search /etc/resolv.conf | cut -d' ' -f2 | head -1)"
+echo "Executor Runtime Attributes:"
+echo "OS: $OS_ID-$OS_VERSION_ID"
+echo "Arch: $OS_ARCH"
+echo "Nomad Hostname: $(grep search /etc/resolv.conf | cut -d' ' -f2 | head -1)"
+echo "Container ID: $(hostname)"
echo "$long_line"
if [ -f "$dockerfile" ] ; then