"ERR110" => "Initializing sub jobs failed!",
"ERR111" => "Git clone failed!!",
"ERR112" => "Git checkout failed!!",
+ "ERR113" => "Git reset failed!!",
"ERR200" => "Unmet dependency found!",
"ERR201" => "Creating job builder failed!",
if not git_cmd("reset --hard #{@git_commit}", git_path, @log) then
@log.warn( "Failed on \"git reset --hard #{@git_commit}\"", Log::LV_USER)
FileUtils.rm_rf git_path
- @git_commit = nil
- @git_commit = get_source_code_internal()
+ if not git_cmd("clone #{@git_repos}", cache_path, @log) then
+ raise BuildServerException.new("ERR111"), "git clone #{@git_repos}"
+ end
+ if not git_cmd("reset --hard #{@git_commit}", git_path, @log) then
+ raise BuildServerException.new("ERR113"), "git reset --hard #{@git_commit}"
+ end
end
end