"ERR022" => "There already exists same job.",
"ERR023" => "Cannot create package client!",
"ERR024" => "Attribute not supports!",
+ "ERR025" => "no latest commit exists",
"ERR100" => "Package info file(\"package/pkginfo.manifest\") does not exist!",
"ERR101" => "Parsing package info file failed!",
else
new_job.user_id = user_id
if uselatest then
- new_job.git_commit = get_latest_commit(pname, dist_name)
+ commitId = get_latest_commit(pname, dist_name)
+ if commitId.nil? then
+ raise BuildServerException.new("ERR025"), pname
+ else
+ new_job.git_commit = commitId
+ end
end
end
new_job_list.push new_job
if new_job.nil? then
raise BuildServerException.new("ERR006"), "\"#{pname}\" does not support #{os} in #{dist_name}"
else
- new_job.user_id = user_id
+ new_job.user_id = user_id
if uselatest then
- new_job.git_commit = get_latest_commit(pname, dist_name)
+ commitId = get_latest_commit(pname, dist_name)
+ if commitId.nil? then
+ raise BuildServerException.new("ERR025"), pname
+ else
+ new_job.git_commit = commitId
+ end
end
- end
- else
- raise BuildServerException.new("ERR006"), "Cannot find your project to build!"
- end
+ end
+ else
+ raise BuildServerException.new("ERR006"), "Cannot find your project to build!"
+ end
# check reverse build
if no_reverse then new_job.set_no_reverse end
--- /dev/null
+#PRE-EXEC
+echo "register noreverse "
+cd git01;tar xf newbinary.tar.gz
+../../build-svr add-prj -n testserver3 -N newbinary -g `pwd`/git01/newbinary -b master
+#EXEC
+../../build-cli build -N newbinary -d 127.0.0.1:2223 -U admin@user -w 1234 --uselatest
+#POST-EXEC
+#EXPECT
+Error: Error: no latest commit exists: newbinary