From: Francis Deslauriers Date: Fri, 26 May 2017 20:06:48 +0000 (-0400) Subject: jjb: Checkout the latest tag on tracked kernel branches X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=82f57fe2cb1dd9d69e479c06809cecd70d0026fd;p=lttng-ci.git 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 --- 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)"