Lava: Include kernel version and shorten commit id in archive filenames
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 23 Nov 2016 15:34:12 +0000 (10:34 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 23 Nov 2016 17:25:44 +0000 (12:25 -0500)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
scripts/lttng-baremetal-tests/build-kernel.sh
scripts/lttng-baremetal-tests/build-modules.sh
scripts/lttng-baremetal-tests/generate-properties-master.sh
scripts/lttng-baremetal-tests/generate-properties-slave.sh

index eb32c9ca2cade7c215f292d4086c2a6bab35d72c..7f0cca768a657614775be16a61d4fc6d7ce250e2 100644 (file)
@@ -23,9 +23,9 @@ make --directory="$LINUX_PATH" INSTALL_MOD_PATH="$MODULES_INSTALL_FOLDER" module
 cp "$LINUX_PATH"/arch/x86/boot/bzImage "$DEPLOYDIR"/"$KERNEL_COMMIT_ID".bzImage
 cp "$LINUX_PATH"/.config "$DEPLOYDIR"/"$KERNEL_COMMIT_ID".config
 
-tar -czf "$DEPLOYDIR/$BUILD_NAME.linux.modules.tar.gz" -C "$MODULES_INSTALL_FOLDER/" ./
+tar -czf "$DEPLOYDIR/$KERNEL_COMMIT_ID.linux.modules.tar.gz" -C "$MODULES_INSTALL_FOLDER/" ./
 
 $SCP_COMMAND "$DEPLOYDIR/$KERNEL_COMMIT_ID.bzImage" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_KERNEL_IMAGE"
 $SCP_COMMAND "$DEPLOYDIR/$KERNEL_COMMIT_ID.config" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_KERNEL_CONFIG"
-$SCP_COMMAND "$DEPLOYDIR/$BUILD_NAME.linux.modules.tar.gz" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_LINUX_MODULES"
+$SCP_COMMAND "$DEPLOYDIR/$KERNEL_COMMIT_ID.linux.modules.tar.gz" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_LINUX_MODULES"
 $SCP_COMMAND "$LINUX_PATH/Module.symvers" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_KERNEL_MODULE_SYMVERS"
index 1d658f54ae24dddb8bf0f4e74999676adb2c715c..04a8c0fa5076bbe89ac1df4bae853c30eb235ae3 100644 (file)
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 echo 'modules-built.txt does not exist'
-echo 'So we built them against the kernel'
+echo 'So we build them against the kernel'
 
 $SCP_COMMAND "$STORAGE_USER@$STORAGE_HOST:$STORAGE_KERNEL_MODULE_SYMVERS" "$LINUX_PATH/Module.symvers"
 
index 22111a8b03563dcb90036b19ba28be5af3b2fe5b..ae1901a21470a62e9b96fe4cb7bb88f685195591 100644 (file)
@@ -23,7 +23,7 @@ if [ -n "${UST_BRANCH+x}" ]; then
   git checkout "$UST_BRANCH"
   popd
 
-  LTTNG_UST_COMMIT_ID="$(git --git-dir="$LTTNG_UST_PATH"/.git/ --work-tree="$LTTNG_UST_PATH" rev-parse HEAD)"
+  LTTNG_UST_COMMIT_ID="$(git --git-dir="$LTTNG_UST_PATH"/.git/ --work-tree="$LTTNG_UST_PATH" rev-parse --short HEAD)"
   echo "LTTNG_UST_PATH=$LTTNG_UST_PATH" >> properties.txt
   echo "LTTNG_UST_COMMIT_ID=$LTTNG_UST_COMMIT_ID" >> properties.txt
 fi
@@ -38,9 +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
 
-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 HEAD)"
-LTTNG_TOOLS_COMMIT_ID="$(git --git-dir="$LTTNG_TOOLS_PATH"/.git/ --work-tree="$LTTNG_TOOLS_PATH" rev-parse HEAD)"
+KERNEL_COMMIT_ID="$(git --git-dir="$LINUX_PATH"/.git/ --work-tree="$LINUX_PATH" rev-parse --short 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)"
+
+KERNEL_VERSION="$(make -s --directory=$LINUX_PATH kernelversion | sed 's/\./_/g; s/-/_/g';)"
 
 echo "KERNEL_COMMIT_ID=$KERNEL_COMMIT_ID" >> properties.txt
 echo "LTTNG_MODULES_COMMIT_ID=$LTTNG_MODULES_COMMIT_ID" >> properties.txt
@@ -51,6 +53,6 @@ BASE_STORAGE_FOLDER="/storage/jenkins-lava/baremetal-tests"
 echo "BUILD_DEVICE=$BUILD_DEVICE" >> properties.txt
 echo "KGITREPO=git://git-mirror.internal.efficios.com/git/linux-stable.git" >> properties.txt
 echo "STORAGE_KERNEL_FOLDER=$BASE_STORAGE_FOLDER/kernel" >> properties.txt
-echo "STORAGE_KERNEL_IMAGE=$BASE_STORAGE_FOLDER/kernel/$KERNEL_COMMIT_ID.$BUILD_DEVICE.bzImage" >> properties.txt
-echo "STORAGE_LINUX_MODULES=$BASE_STORAGE_FOLDER/modules/linux/$KERNEL_COMMIT_ID.$BUILD_DEVICE.linux.modules.tar.gz" >> properties.txt
-echo "STORAGE_LTTNG_MODULES=$BASE_STORAGE_FOLDER/modules/lttng/$KERNEL_COMMIT_ID-$LTTNG_MODULES_COMMIT_ID.$BUILD_DEVICE.lttng.modules.tar.gz" >> properties.txt
+echo "STORAGE_KERNEL_IMAGE=$BASE_STORAGE_FOLDER/kernel/$KERNEL_VERSION-$KERNEL_COMMIT_ID.$BUILD_DEVICE.bzImage" >> properties.txt
+echo "STORAGE_LINUX_MODULES=$BASE_STORAGE_FOLDER/modules/linux/$KERNEL_VERSION-$KERNEL_COMMIT_ID.$BUILD_DEVICE.linux.modules.tar.gz" >> properties.txt
+echo "STORAGE_LTTNG_MODULES=$BASE_STORAGE_FOLDER/modules/lttng/$KERNEL_VERSION-$KERNEL_COMMIT_ID-$LTTNG_MODULES_COMMIT_ID.$BUILD_DEVICE.lttng.modules.tar.gz" >> properties.txt
index 017f1f653ebb026f694734f04014580bda639db5..fdd45ca1d42266484f6b79980254bd7d154523ba 100644 (file)
@@ -42,8 +42,8 @@ echo "LTTNG_MODULES_COMMIT_ID=$LTTNG_MODULES_COMMIT_ID" >> properties.txt
 echo "BUILD_NAME=$BUILD_NAME" >> properties.txt
 echo "BUILD_DEVICE=$BUILD_DEVICE" >> properties.txt
 
-echo "STORAGE_KERNEL_MODULE_SYMVERS=$STORAGE_KERNEL_FOLDER/$KERNEL_COMMIT_ID.$BUILD_DEVICE.symvers" >>properties.txt
-echo "STORAGE_KERNEL_CONFIG=$STORAGE_KERNEL_FOLDER/$KERNEL_COMMIT_ID.$BUILD_DEVICE.config" >> properties.txt
+echo "STORAGE_KERNEL_MODULE_SYMVERS=$STORAGE_KERNEL_FOLDER/symvers/$KERNEL_COMMIT_ID.$BUILD_DEVICE.symvers" >>properties.txt
+echo "STORAGE_KERNEL_CONFIG=$STORAGE_KERNEL_FOLDER/config/$KERNEL_COMMIT_ID.$BUILD_DEVICE.config" >> properties.txt
 
 echo "STORAGE_HOST=storage01.internal.efficios.com" >> properties.txt
 echo "STORAGE_USER=jenkins-lava" >> properties.txt
This page took 0.027302 seconds and 4 git commands to generate.