[ 项目 ] 修改CI CD流程 - 2

This commit is contained in:
zeaslity
2023-06-30 15:43:37 +08:00
parent 70e8d12f24
commit efe7a836ba
4 changed files with 101 additions and 11 deletions

View File

@@ -14,18 +14,19 @@ func main() {
// 解析命令行参数
var version string
var agentInfoConf string
var agentServerInfoConf string
flag.StringVar(&version, "version", "", "config file version")
flag.StringVar(&agentInfoConf, "agentInfoConf", "", "agent server info conf file")
flag.StringVar(&agentServerInfoConf, "agentServerInfoConf", "", "agent server info conf file")
flag.Parse()
// 读取对应版本的配置文件
filename := fmt.Sprintf("octopus-agent-%s.yaml", version)
println("config file name is => " + filename)
println("agent server info file is => " + agentServerInfoConf)
// 初始化Nacos的连接配置
g.G.AgentConfig = register.ParseConfiguration(filename)
// 执行初始化之策工作
AgentServerInfoCache = INIT()
AgentServerInfoCache = INIT(agentServerInfoConf)
}