From 82f57fe2cb1dd9d69e479c06809cecd70d0026fd Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Fri, 26 May 2017 16:06:48 -0400 Subject: [PATCH] jjb: Checkout the latest tag on tracked kernel branches Use the latest tag rather than the latest commit of the kernel repository. Signed-off-by: Francis Deslauriers --- scripts/lttng-baremetal-tests/generate-properties-master.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/lttng-baremetal-tests/generate-properties-master.sh b/scripts/lttng-baremetal-tests/generate-properties-master.sh index dad0453..9f7641b 100644 --- a/scripts/lttng-baremetal-tests/generate-properties-master.sh +++ b/scripts/lttng-baremetal-tests/generate-properties-master.sh @@ -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)" -- 2.34.1