[Title] Fixed a bug that local commit id is used
authordonghee yang <donghee.yang@samsung.com>
Mon, 22 Apr 2013 15:05:01 +0000 (00:05 +0900)
committerdonghee yang <donghee.yang@samsung.com>
Mon, 22 Apr 2013 15:05:01 +0000 (00:05 +0900)
src/build_server/GitBuildJob.rb
test/build-server.multi-svr1/buildsvr1.init

index 3d3c5bda39041daa2bcf5cd672b18fe300abb377..b66d08152017e9a2fe6136afb225c0e983ec77ed 100644 (file)
@@ -271,6 +271,12 @@ class GitBuildJob < BuildJob
                        end
                end
 
+               # git reset origin operation
+               if File.exist? git_path and not git_cmd("reset --hard origin/#{@git_branch}", git_path,@log) then
+                       @log.warn( "Failed on \"git reset --hard origin/#{@git_branch}\"", Log::LV_USER)
+                       FileUtils.rm_rf git_path
+               end
+
                # git pull operation
                if File.exist? git_path and not git_cmd("pull", git_path,@log) then
                        @log.warn( "Failed on \"git pull\"", Log::LV_USER)
index e4d9802aa513657b7fe5f0a0b549453694d8c9d7..d333a1826f2f8c76d1caf17ca92530b425cf5e9b 100755 (executable)
@@ -32,7 +32,7 @@ ${RUBY} ../../build-svr add-os -n testserver3 -o ubuntu-32
 ${RUBY} ../../build-svr add-os -n testserver3 -o windows-32
 ${RUBY} ../../build-svr add-prj -n testserver3 -N testa -g `pwd`/git01/a -b master
 ${RUBY} ../../build-svr add-prj -n testserver3 -N testb -g `pwd`/git01/b -b master
-${RUBY} ../../build-svr set-attr -n testserver3 -A MAX_WORKING_JOBS -V 0
+${RUBY} ../../build-svr set-attr -n testserver3 -A MAX_WORKING_JOBS -V 1
 
 mkdir -p git01
 cp ../git01/*.tar.gz git01/