"ERR108" => "Unsupported OS used in package file name!",
"ERR109" => "Extracting package file failed!",
"ERR110" => "Initializing sub jobs failed!",
+ "ERR111" => "Git clone failed!!",
+ "ERR112" => "Git checkout failed!!",
"ERR200" => "Unmet dependency found!",
"ERR201" => "Creating job builder failed!",
# download source code
@git_commit = get_source_code()
- if @git_commit.nil? then
- @status = "ERROR"
- return false
- end
# check pkginfo.manifest
if not File.exist? "#{@source_path}/package/pkginfo.manifest" then
if not File.exist? git_path then
# if "git pull" failed, try to "git clone"
if not git_cmd("clone #{@git_repos}", cache_path, @log) then
- @log.error( "Failed on \"git clone #{@git_repos}\"", Log::LV_USER)
- return nil
+ raise BuildServerException.new("ERR111"), "git clone #{@git_repos}"
end
# git checkout
if not git_cmd("checkout #{@git_branch}", git_path, @log) then
- @log.error( "Failed on \"git checkout #{@git_branch}\"", Log::LV_USER)
- return nil
+ raise BuildServerException.new("ERR112"), "git checkout #{@git_branch}"
end
end
--- /dev/null
+#PRE-EXEC
+echo "error case when wrong git repository setted"
+../../build-svr add-prj -n testserver3 -N testaErr -g `pwd`/git01/aErr -b master
+#EXEC
+../../build-cli build -N testaErr -d 127.0.0.1:2223 -o ubuntu-32 -U admin@user -w 1234
+#POST-EXEC
+#EXPECT
+Info: Added new job
+Info: Initializing job...
+Error: Git clone failed!!: git clone
+Error: Job is stopped by ERROR
+Error: Building job on remote server failed!
--- /dev/null
+#PRE-EXEC
+echo "error case when wrong git branch setted"
+../../build-svr add-prj -n testserver3 -N testbErr -g `pwd`/git01/b -b testError
+#EXEC
+../../build-cli build -N testbErr -d 127.0.0.1:2223 -o ubuntu-32 -U admin@user -w 1234
+#POST-EXEC
+#EXPECT
+Info: Added new job
+Info: Initializing job...
+Error: Git checkout failed!!: git checkout
+Error: Job is stopped by ERROR
+Error: Building job on remote server failed!
build-cli-34.testcase
build-cli-35.testcase
build-cli-36.testcase
+build-cli-37.testcase
+build-cli-38.testcase