From 1e4267f84d085c1bbb10c80525f350282a917271 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Thu, 9 Nov 2017 09:29:26 -0600 Subject: [PATCH] HBASE-19228 nightly job should gather machine stats. Signed-off-by: Michael Stack --- dev-support/Jenkinsfile | 19 +++++++++++++++++++ dev-support/gather_machine_environment.sh | 1 + 2 files changed, 20 insertions(+) diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile index f7ae5464e90..35a08c76c65 100644 --- a/dev-support/Jenkinsfile +++ b/dev-support/Jenkinsfile @@ -127,6 +127,11 @@ curl -L -o personality.sh "${env.PROJET_PERSONALITY}" } steps { unstash 'yetus' + sh '''#!/usr/bin/env bash + rm -rf "${OUTPUTDIR}" && mkdir "${OUTPUTDIR}" + rm -rf "${OUTPUTDIR}/machine" && mkdir "${OUTPUTDIR}/machine" + "${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_RELATIVE}/machine" +''' // TODO should this be a download from master, similar to how the personality is? sh "${env.BASEDIR}/dev-support/hbase_nightly_yetus.sh" } @@ -159,6 +164,11 @@ curl -L -o personality.sh "${env.PROJET_PERSONALITY}" } steps { unstash 'yetus' + sh '''#!/usr/bin/env bash + rm -rf "${OUTPUTDIR}" && mkdir "${OUTPUTDIR}" + rm -rf "${OUTPUTDIR}/machine" && mkdir "${OUTPUTDIR}/machine" + "${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_RELATIVE}/machine" +''' sh """#!/usr/bin/env bash # for branch-1.1 we don't do jdk8 findbugs, so do it here if [ "${env.BRANCH_NAME}" == "branch-1.1" ]; then @@ -215,6 +225,11 @@ curl -L -o personality.sh "${env.PROJET_PERSONALITY}" } steps { unstash 'yetus' + sh '''#!/usr/bin/env bash + rm -rf "${OUTPUTDIR}" && mkdir "${OUTPUTDIR}" + rm -rf "${OUTPUTDIR}/machine" && mkdir "${OUTPUTDIR}/machine" + "${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_RELATIVE}/machine" +''' sh "${env.BASEDIR}/dev-support/hbase_nightly_yetus.sh" } post { @@ -264,6 +279,10 @@ curl -L -o personality.sh "${env.PROJET_PERSONALITY}" rm -rf "unpacked_src_tarball" && mkdir "unpacked_src_tarball" rm -rf ".m2-for-repo" && mkdir ".m2-for-repo" rm -rf ".m2-for-src" && mkdir ".m2-for-src" +''' + sh '''#!/usr/bin/env bash + rm -rf "output-srctarball/machine" && mkdir "output-srctarball/machine" + "${BASEDIR}/dev-support/gather_machine_environment.sh" "output-srctarball/machine" ''' sh """#!/bin/bash -e ${env.BASEDIR}/dev-support/hbase_nightly_source-artifact.sh \ diff --git a/dev-support/gather_machine_environment.sh b/dev-support/gather_machine_environment.sh index 8f2c74ea41e..589dffe9bf6 100755 --- a/dev-support/gather_machine_environment.sh +++ b/dev-support/gather_machine_environment.sh @@ -48,3 +48,4 @@ ifconfig -a >"${output}/ifconfig-a" 2>&1 || true lsblk -ta >"${output}/lsblk-ta" 2>&1 || true lsblk -fa >"${output}/lsblk-fa" 2>&1 || true ulimit -l >"${output}/ulimit-l" 2>&1 || true +uptime >"${output}/uptime" 2>&1 || true