增加trustie提供服务器流程。

1、增加接口trustie_bind
2、根据server_type字段判断使用哪个数据库连接
This commit is contained in:
moshenglv
2020-12-18 13:14:30 +08:00
parent 6cbaf410b2
commit d70168d255
8 changed files with 116 additions and 8 deletions

View File

@@ -20,6 +20,10 @@ class Ci::CloudAccount < Ci::LocalBase
belongs_to :user
belongs_to :ci_user, class_name: 'Ci::User', foreign_key: :ci_user_id, optional: true
# server_type column: 0: 自有服务器1: trustie提供服务器
SERVER_TYPE_SELF = 0
SERVER_TYPE_TRUSTIE = 1
def drone_host
[drone_ip, ":80"].join
end