jjb: Checkout the latest tag on tracked kernel branches
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 26 May 2017 20:06:48 +0000 (16:06 -0400)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 26 May 2017 20:30:37 +0000 (16:30 -0400)
Use the latest tag rather than the latest commit of the kernel
repository.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
scripts/lttng-baremetal-tests/generate-properties-master.sh

index dad045304762160f62abb5d9db69721ae1c20028..9f7641bd21c0dcf6def37f13850c35860ca9f2d7 100644 (file)
@@ -38,6 +38,11 @@ echo "LINUX_PATH=$LINUX_PATH" >> properties.txt
 echo "LTTNG_MODULES_PATH=$LTTNG_MODULES_PATH" >> properties.txt
 echo "LTTNG_TOOLS_PATH=$LTTNG_TOOLS_PATH" >> properties.txt
 
+# Checkout the last kernel tag for cases where the job is triggered by commits
+# on the LTTng repos
+KERNEL_TAG="$(git --git-dir="$LINUX_PATH"/.git/ --work-tree="$LINUX_PATH" describe --abbrev=0)"
+git --git-dir="$LINUX_PATH"/.git/ --work-tree="$LINUX_PATH" checkout "$KERNEL_TAG"
+
 KERNEL_COMMIT_ID="$(git --git-dir="$LINUX_PATH"/.git/ --work-tree="$LINUX_PATH" rev-parse HEAD)"
 LTTNG_MODULES_COMMIT_ID="$(git --git-dir="$LTTNG_MODULES_PATH"/.git/ --work-tree="$LTTNG_MODULES_PATH" rev-parse --short HEAD)"
 LTTNG_TOOLS_COMMIT_ID="$(git --git-dir="$LTTNG_TOOLS_PATH"/.git/ --work-tree="$LTTNG_TOOLS_PATH" rev-parse --short HEAD)"
This page took 0.023535 seconds and 4 git commands to generate.