jjb: Add timestamp and lttng-ci commit ID to benchmark metadata
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 13 Mar 2017 16:26:21 +0000 (12:26 -0400)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 14 Mar 2017 13:20:25 +0000 (09:20 -0400)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
scripts/lttng-baremetal-tests/run-baremetal-benchmarks.sh

index ecc164cb29768908d4d9f257680156132f10d7e9..b5c633cd41a027aa626b40afc21b70f527209894 100644 (file)
@@ -31,9 +31,12 @@ python3 -u "$LTTNG_CI_PATH"/scripts/lttng-baremetal-tests/lava-submit.py \
 RESULT_STORAGE_FOLDER="$BASE_STORAGE_FOLDER/benchmark-results/$JOB_NAME/$BUILD_NUMBER"
 $SSH_COMMAND "$STORAGE_USER@$STORAGE_HOST" mkdir -p "$RESULT_STORAGE_FOLDER"
 
-# Create a metadata file for this job containing the build_id and the commit ids
-echo "build_id,kernel_commit,modules_commit,tools_commit" > metadata.csv
-echo "$BUILD_NUMBER,$KERNEL_COMMIT_ID,$LTTNG_MODULES_COMMIT_ID,$LTTNG_TOOLS_COMMIT_ID" >> metadata.csv
+# Create a metadata file for this job containing the build_id, timestamp and the commit ids
+TIMESTAMP=$(/bin/date --iso-8601=seconds)
+LTTNG_CI_COMMIT_ID="$(git --git-dir="$LTTNG_CI_PATH"/.git/ --work-tree="$LTTNG_CI_PATH" rev-parse --short HEAD)"
+
+echo "build_id,timestamp,kernel_commit,modules_commit,tools_commit,ci_commit" > metadata.csv
+echo "$BUILD_NUMBER,$TIMESTAMP,$KERNEL_COMMIT_ID,$LTTNG_MODULES_COMMIT_ID,$LTTNG_TOOLS_COMMIT_ID,$LTTNG_CI_COMMIT_ID" >> metadata.csv
 
 # Copy the result files for each benchmark and metadata on storage server
 $SCP_COMMAND ./processed_results_close.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/close.csv"
This page took 0.023454 seconds and 4 git commands to generate.