change bugs
This commit is contained in:
parent
f4be93c340
commit
bf61c0e5b3
|
@ -6,6 +6,7 @@ class SyncProjectsJob < ApplicationJob
|
|||
|
||||
def perform(sync_params, gitea_main)
|
||||
SyncLog.sync_log("==========begin to sync #{sync_params[:type]} to forge============")
|
||||
SyncLog.sync_log("==========sync_params:#{sync_params}============")
|
||||
begin
|
||||
|
||||
url = "#{gitea_main}/sync_forges" #trustie上的相关路由
|
||||
|
|
|
@ -6,8 +6,6 @@ class SyncRepositoryJob < ApplicationJob
|
|||
def perform(user_login, identifier, repository_params, gitea_main)
|
||||
#创建临时文件夹 clone 并强推代码
|
||||
SyncLog.sync_log("=================begin to sync request trustie repository=====================")
|
||||
SyncLog.sync_log("=================begin to sync repository_params:==#{repository_params}===================")
|
||||
SyncLog.sync_log("=================repository_url:==#{repository_params[:git_url]}===================")
|
||||
path = "#{Rails.root}/public/cache_repository"
|
||||
unless File.directory?(path)
|
||||
FileUtils.mkdir_p(path)
|
||||
|
@ -16,8 +14,7 @@ class SyncRepositoryJob < ApplicationJob
|
|||
g_default_branch = repository_params[:default_branch]
|
||||
image_repo_name = image_url.to_s.split('/')&.last&.chomp('.git')
|
||||
check_clone = system("cd #{path} and git clone #{image_url}")
|
||||
|
||||
|
||||
SyncLog.sync_log("========check_clone:====cd #{path} and git clone #{image_url}===================")
|
||||
if check_clone
|
||||
new_gitlab_url = "http://root:_Trustie_10010@#{gitea_main}/#{user_login}/#{identifier}.git"
|
||||
|
||||
|
|
Loading…
Reference in New Issue