modify hudson autobuild script
authorjaewon81.lim <jaewon81.lim@samsung.com>
Thu, 23 Jun 2011 07:13:57 +0000 (16:13 +0900)
committerjaewon81.lim <jaewon81.lim@samsung.com>
Thu, 23 Jun 2011 07:13:57 +0000 (16:13 +0900)
add some file for auto packaging

build.sh
builder/metadata/data/SDK/profiling-tool/oprofile_armel.deb [new file with mode: 0644]
builder/metadata/data/SDK/profiling-tool/valgrind_armel.deb [new file with mode: 0644]
builder/metadata/pkginfo.manifest [new file with mode: 0644]
packaging_profiler.sh [new file with mode: 0755]

index 2003c9d..80e58c6 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -21,7 +21,8 @@ builder_path="$start_path/builder"
 equinox_launcher=`echo org.eclipse.equinox.launcher_*.jar`
 pde_build=`echo org.eclipse.pde.build_*`
 metadata_path=$start_path/builder
-fresh_ide_path=$start_path/../fresh-ide
+fresh_ide_path=/var/lib/hudson/jobs/slp_sdk_fresh_ide/workspace
+
 if [ "x$1" = "x" ]
 then
        echo "
@@ -118,7 +119,10 @@ rm -rf $build_path/plugins/*.feature
 echo "Copy fresh ide plugins..."
 if [ -d ${fresh_ide_path} ]
 then
-       cp -rf /var/lib/hudson/jobs/slp_sdk_fresh_ide/workspace/build_result/N.fresh_ide_build/${archive_platform_name}.${windowing}.${architecture}/IDE/plugins/* ${build_path}/plugins
+       cp -rf ${fresh_ide_path}/build_result/N.fresh_ide_build/${archive_platform_name}.${windowing}.${architecture}/IDE/plugins/* ${build_path}/plugins
+else
+       echo "ERROR : Fresh IDE does not exist..."
+       exit 1
 fi
 
 echo "Make build.properties file..."
diff --git a/builder/metadata/data/SDK/profiling-tool/oprofile_armel.deb b/builder/metadata/data/SDK/profiling-tool/oprofile_armel.deb
new file mode 100644 (file)
index 0000000..b4b155c
Binary files /dev/null and b/builder/metadata/data/SDK/profiling-tool/oprofile_armel.deb differ
diff --git a/builder/metadata/data/SDK/profiling-tool/valgrind_armel.deb b/builder/metadata/data/SDK/profiling-tool/valgrind_armel.deb
new file mode 100644 (file)
index 0000000..8b330d8
Binary files /dev/null and b/builder/metadata/data/SDK/profiling-tool/valgrind_armel.deb differ
diff --git a/builder/metadata/pkginfo.manifest b/builder/metadata/pkginfo.manifest
new file mode 100644 (file)
index 0000000..2d924a8
--- /dev/null
@@ -0,0 +1,6 @@
+Package: Profiler
+Version: 1.0
+Architecture: i386
+Maintainer: Jaewon Lim <jaewon81.lim@samsung.com>, Juyoung Kim
+Description: Samsung Linux Platform IDE
+Category: IDE/Dynamic analysis
diff --git a/packaging_profiler.sh b/packaging_profiler.sh
new file mode 100755 (executable)
index 0000000..0ff69d4
--- /dev/null
@@ -0,0 +1,106 @@
+#!/bin/bash
+########################################################################################
+##
+## This script is packaging profiler plugin for fresh ide.
+## If you have any question, please send e-mail to jaewon81.lim@samsung.com.
+##
+########################################################################################
+## You must setup parameter 
+set_build_result_path="`pwd`/.."
+build_id=profiler_build
+
+############################################################################################################
+## Don't touch below!!!! If you want to touch this script, ask to Jaewon Lim(jaewon81.lim@samsung.com)
+############################################################################################################
+package()
+{
+       architecture=x86
+       case ${platform} in
+               linux)
+                       upload_platform_name=LINUX
+                       windowing=gtk
+                       ;;
+               windows)
+                       upload_platform_name=WINDOWS
+                       windowing=win32
+                       ;;
+               *)
+                       echo "${platform} is not support yet."
+                       exit 1
+                       ;;
+       esac
+
+       current_date=`date +%Y%m%d`
+       upload_server=172.21.111.180
+       upload_directory=/packages/${current_date}_PACKAGES_${upload_platform_name}
+       upload_user=core
+       upload_password=tmaxcore
+       
+       package_name=profiler
+       start_path=`pwd`
+       build_path="$set_build_result_path/build_result"
+
+       case ${platform} in
+               windows)
+                       build_result_directory=N.${build_id}/win32.${windowing}.${architecture}
+                       ;;
+               *)
+                       build_result_directory=N.${build_id}/${platform}.${windowing}.${architecture}
+                       ;;
+       esac
+
+       build_result_path="$build_path/$build_result_directory"
+       builder_path="$start_path/builder"
+       metadata_path=$start_path/builder/metadata
+       pkginfo_path=${meatdata_path}/pkginfo.manifest
+
+       package_version=`grep Version ${pkginfo_path}`
+       ide_version=`echo $package_version | cut -f2 -d":" | tr -d [:blank:]`
+       
+       package_file=${package_name}_${ide_version}_${platform}.zip
+       
+       rm -rf $build_path/packaging
+       
+       echo "Create package for install manager..."
+       mkdir -p $build_path/packaging/data
+       cp -rf $build_result_path/profiler $build_path/packaging/data/IDE
+       cp -rf $metadata_path/* $build_path/packaging
+       cd $build_path/packaging
+       
+       echo "Remove legacy package file..." 
+       rm -f $package_file
+       echo "Archive package for upload to server..."
+       if [ ${platform} = "linux" ]
+       then
+               zip -r $package_file pkginfo.manifest data 
+       elif [ ${platform} = "windows" ]
+       then
+               zip -r $package_file pkginfo.manifest data
+       fi
+
+       echo "Copy to Packaging directory"
+       mv $package_file ${build_path}/
+       echo "Package file's path : ${build_path}"
+       cd -
+       echo "Packaging SUCCESS"
+       
+       cd $build_path
+       echo "Delete legacy package from server...(download legacy package to \"$HOME/${package_name}_*_${platform}.zip\")"
+       ncftpget -DD -u ${upload_user} -p ${upload_password} ${upload_server} ~/ ${upload_directory}/${package_name}_*_${platform}.zip
+       echo "Upload $package_file to server..."
+       ncftpput -u ${upload_user} -p ${upload_password} ${upload_server} ${upload_directory} ${package_file}
+       cd -
+       echo "Upload SUCCESS"
+       
+       echo "Packaing and uploading complete."
+       echo "You can find package in \"${build_path}/${package_file}\""
+}
+
+if [ "x$1" = "x" ]
+then
+       echo "Usage : packaging_profiler.sh PLATFORM_NAME"
+       exit 1
+fi
+
+platform=$1
+package