修改turstie提供服务器,认证时调用drone url

This commit is contained in:
moshenglv 2020-12-31 16:47:16 +08:00
parent 0476246585
commit 2b86c7eb95
1 changed files with 5 additions and 0 deletions

View File

@ -153,6 +153,11 @@ module Ci::CloudAccountManageable
end
def drone_oauth_user!(url, state)
cloud_account = current_user.ci_cloud_account
if cloud_account.server_type == Ci::CloudAccount::SERVER_TYPE_TRUSTIE
url = "#{@cloud_account.drone_url}/login"
end
logger.info "[drone] drone_oauth_user url: #{url}"
conn = Faraday.new(url: url) do |req|
req.request :url_encoded