[ 项目 ] 修改CI CD流程 - 2
This commit is contained in:
@@ -17,10 +17,10 @@ var P = g.G.P
|
||||
|
||||
var AgentServerInfoCache = ®ister.AgentServerInfo{}
|
||||
|
||||
func INIT() *register.AgentServerInfo {
|
||||
func INIT(agentServerInfoConf string) *register.AgentServerInfo {
|
||||
|
||||
// 获取系统的环境变量
|
||||
agentServerInfo := parseAgentServerInfo()
|
||||
agentServerInfo := parseAgentServerInfo(agentServerInfoConf)
|
||||
|
||||
agentConfig := g.G.AgentConfig
|
||||
|
||||
@@ -164,13 +164,11 @@ func shutdownRegisterQueueConnection(initFromServerQueue *rabbitmq.RabbitQueue,
|
||||
log.InfoF("Pretend to Shutdown register queue connection !")
|
||||
}
|
||||
|
||||
func parseAgentServerInfo() *register.AgentServerInfo {
|
||||
func parseAgentServerInfo(agentServerInfoConf string) *register.AgentServerInfo {
|
||||
|
||||
// 约定文件地址为 /etc/environment.d/octopus-agent.conf
|
||||
// 目前使用
|
||||
// 约定文件地址为 /octopus-agent/octopus-agent.conf
|
||||
var agentServerInfo *register.AgentServerInfo
|
||||
//yamlFile, err := ioutil.ReadFile("C:\\Users\\wdd\\IdeaProjects\\ProjectOctopus\\agent-go\\server-env.yaml")
|
||||
yamlFile, err := ioutil.ReadFile("server-env.yaml")
|
||||
yamlFile, err := ioutil.ReadFile(agentServerInfoConf)
|
||||
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("failed to read YAML file: %v", err))
|
||||
|
||||
Reference in New Issue
Block a user