diff options
author | Deepti B. Kalakeri <deepti.kalakeri@linaro.org> | 2011-09-08 12:08:03 +0000 |
---|---|---|
committer | Deepti B. Kalakeri <deepti.kalakeri@linaro.org> | 2011-09-08 12:08:03 +0000 |
commit | bd708afdf8c97e3aeba5bf75fcefa4cc8e8a4bd0 (patch) | |
tree | e3e85e5fe812bae903025bd49c294d0a0d9c9b65 /jenkins_kernel_build_inst | |
parent | 4b9ad13de99e22d27098810ee88119b02dc7cb14 (diff) |
Reorganising the env variables so that even if the build fails the required env variables are
available for the sending the build status to LAVA
Diffstat (limited to 'jenkins_kernel_build_inst')
-rwxr-xr-x | jenkins_kernel_build_inst | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/jenkins_kernel_build_inst b/jenkins_kernel_build_inst index ee15117..3505352 100755 --- a/jenkins_kernel_build_inst +++ b/jenkins_kernel_build_inst @@ -6,7 +6,6 @@ # rootfs_type='nano' set -xe -START=$(date +%s) if test -z "$kernel_config"; then kernel_config='omap2plus_defconfig' fi @@ -26,16 +25,39 @@ fi bundle_stream_name=`echo $JOB_NAME | sed -e 's/_.*//' -e 's/\./_/g'` kernel_version=`git describe --match='v*' | sed -e 's/^v//'``echo -${kernel_config}-linaro-${kernel_flavour} | sed -e 's/_/-/g'` + +# Below is the list of values that will be used in the json files +log_info=$BUILD_URL"consoleText" +bundle_stream_name_path="/anonymous/ci-$bundle_stream_name/" +echo > hwpack_info # start with empty +echo KERNEL_CONFIG=$kernel_config >> hwpack_info +echo OS_INFO=`cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | cut -d '=' -f 2` >> hwpack_info +echo LOG=$log_info >> hwpack_info +echo BUILD_ID=$BUILD_NUMBER >> hwpack_info +echo GCC_VERSION=`dpkg -s gcc | grep Version | cut -d ' ' -f2` >> hwpack_info +echo GCC_CROSS_COMPILER=`dpkg -s gcc-arm-linux-gnueabi | grep Version | cut -d ' ' -f2` >> hwpack_info +echo BOARD_TYPE=$board_type >> hwpack_info +echo HWPACK_TYPE=$hwpack_type >> hwpack_info +echo ROOTFS_TYPE=$rootfs_type >> hwpack_info +echo BUNDLE_STREAM_NAME=$bundle_stream_name_path >> hwpack_info +echo JOB_URL=http://ci.linaro.org/kernel_hwpack/ >> hwpack_info +echo KERNEL_VERSION=`git describe --match='v*'` >> hwpack_info +echo KERNEL_GIT=`cat .git/config|grep -i git |cut -d "=" -f2` >> hwpack_info +echo KERNEL_COMMIT=$GIT_COMMIT >> hwpack_info +echo COMMIT_TIME=`git show -s --format=%cD HEAD` >> hwpack_info +echo KERNEL_NAME=$bundle_stream_name >> hwpack_info + +rm -f ../linux-image*${kernel_version}_*.deb +rm -f *.deb +cp scripts/package/builddeb scripts/package/builddeb.orig +cp builddeb scripts/package/builddeb cpu_count=`cat /proc/cpuinfo | grep processor | wc -l` if test x$cpu_count = x; then cpu_count=1 fi j_count=`expr $cpu_count '*' 2` -rm -f ../linux-image*${kernel_version}_*.deb -rm -f *.deb -cp scripts/package/builddeb scripts/package/builddeb.orig -cp builddeb scripts/package/builddeb +START=$(date +%s) make ARCH=arm clean mrproper make ARCH=arm KERNELVERSION="$kernel_version" CROSS_COMPILE=arm-linux-gnueabi- $kernel_config make ARCH=arm KERNELVERSION="$kernel_version" CROSS_COMPILE=arm-linux-gnueabi- -j$j_count uImage @@ -43,6 +65,7 @@ make ARCH=arm KERNELVERSION="$kernel_version" CROSS_COMPILE=arm-linux-gnueabi- - make ARCH=arm KERNELVERSION="$kernel_version" CROSS_COMPILE=arm-linux-gnueabi- KBUILD_DEBARCH=armel V=1 deb-pkg END=$(date +%s) EXECUTION_TIME_IN_SEC=$(( $END - $START )) + latest_kernel=`python ci_scripts_for_kb/get_latest_slo_hwpack` latest_hwpack_name=`basename $latest_kernel` cp ../linux-image*${kernel_version}*.deb . @@ -52,26 +75,6 @@ rm -rf linaro-image-tools bzr branch lp:linaro-image-tools new_hwpack_name=`python linaro-image-tools/linaro-hwpack-replace -t $latest_hwpack_name -p ./linux-image*${kernel_version}_*.deb -r linux-image` use_hwpack_name=`basename $new_hwpack_name` -log_info=$BUILD_URL"consoleText" -bundle_stream_name_path="/anonymous/ci-$bundle_stream_name/" -# Below is the list of values that will be used in the json files -echo > hwpack_info # start with empty -echo KERNEL_CONFIG=$kernel_config >> hwpack_info -echo EXECUTION_TIME_IN_SEC=$(( $END - $START )) >> hwpack_info -echo OS_INFO=`cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | cut -d '=' -f 2` >> hwpack_info -echo LOG=$log_info >> hwpack_info echo HWPACK_NAME=$use_hwpack_name >> hwpack_info echo URL=$JENKINS_HOME/jobs/$JOB_NAME/workspace/$use_hwpack_name >> hwpack_info -echo BUILD_ID=$BUILD_NUMBER >> hwpack_info -echo GCC_VERSION=`dpkg -s gcc | grep Version | cut -d ' ' -f2` >> hwpack_info -echo GCC_CROSS_COMPILER=`dpkg -s gcc-arm-linux-gnueabi | grep Version | cut -d ' ' -f2` >> hwpack_info -echo BOARD_TYPE=$board_type >> hwpack_info -echo HWPACK_TYPE=$hwpack_type >> hwpack_info -echo ROOTFS_TYPE=$rootfs_type >> hwpack_info -echo BUNDLE_STREAM_NAME=$bundle_stream_name_path >> hwpack_info -echo JOB_URL=http://ci.linaro.org/kernel_hwpack/ >> hwpack_info -echo KERNEL_VERSION=`git describe --match='v*'` >> hwpack_info -echo KERNEL_GIT=`cat .git/config|grep -i git |cut -d "=" -f2` >> hwpack_info -echo KERNEL_COMMIT=$GIT_COMMIT >> hwpack_info -echo COMMIT_TIME=`git show -s --format=%cD HEAD` >> hwpack_info -echo KERNEL_NAME=$bundle_stream_name >> hwpack_info +echo EXECUTION_TIME_IN_SEC=$(( $END - $START )) >> hwpack_info |