NEED_MODULES_BUILD=1
fi
+$S3_COMMAND info "s3://$S3_STORAGE_KERNEL_IMAGE"
+if [ $? -ne 0 ]; then
+ NEED_KERNEL_BUILD=1
+ # We need to build the lttng modules if the kernel has changed.
+ NEED_MODULES_BUILD=1
+fi
+
$SSH_COMMAND "$STORAGE_USER@$STORAGE_HOST" ls "$STORAGE_LTTNG_MODULES"
if [ $? -ne 0 ]; then
NEED_MODULES_BUILD=1
fi
+
+$S3_COMMAND info "s3://$S3_STORAGE_LTTNG_MODULES"
+if [ $? -ne 0 ]; then
+ NEED_MODULES_BUILD=1
+fi
+
set -e
# We need to fetch the kernel source and lttng-modules to build either the
# kernel or modules
if [ $NEED_MODULES_BUILD -eq 1 ] || [ $NEED_KERNEL_BUILD -eq 1 ] ; then
-
- git clone "$KGITREPO" "$LINUX_PATH"
+ mkdir -p "$LINUX_PATH"
pushd "$LINUX_PATH"
- git checkout "$KERNEL_COMMIT_ID"
- popd
- git clone "$LTTNG_MODULES_GIT" "$LTTNG_MODULES_PATH"
- pushd "$LTTNG_MODULES_PATH"
- git checkout "$LTTNG_MODULES_COMMIT_ID"
+ git init
+ git remote add origin "$KGITREPO"
+ git fetch --depth 1 origin "$KERNEL_COMMIT_ID"
+ git checkout FETCH_HEAD
popd
- git clone https://github.com/lttng/lttng-ci "$LTTNG_CI_PATH"
- cp "$LTTNG_CI_PATH"/lava/kernel/vanilla/x86_64_server.config "$LINUX_PATH/.config"
+ cp src/lttng-ci/lava/kernel/vanilla/x86_64_server.config "$LINUX_PATH/.config"
make --directory="$LINUX_PATH" olddefconfig
if [ $BUILD_DEVICE = 'kvm' ] ; then
- make --directory="$LINUX_PATH" kvmconfig
+ make --directory="$LINUX_PATH" kvm_guest.config
fi
make --directory="$LINUX_PATH" modules_prepare