mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
修复自动化部署条件分支后的节点无法到达的问题
修复ssh测试不兼容IPv6的问题
This commit is contained in:
@@ -273,7 +273,14 @@ func SSHAPITest(providerID string) error {
|
|||||||
default:
|
default:
|
||||||
port = "22"
|
port = "22"
|
||||||
}
|
}
|
||||||
|
IPtype := public.CheckIPType(providerConfig.Host)
|
||||||
|
if IPtype == "IPv6" {
|
||||||
|
providerConfig.Host = "[" + providerConfig.Host + "]"
|
||||||
|
}
|
||||||
addr := fmt.Sprintf("%s:%s", providerConfig.Host, port)
|
addr := fmt.Sprintf("%s:%s", providerConfig.Host, port)
|
||||||
|
if providerConfig.Mode == "" || providerConfig.Mode == "password" {
|
||||||
|
providerConfig.PrivateKey = ""
|
||||||
|
}
|
||||||
|
|
||||||
authMethods, err := buildAuthMethods(providerConfig.Password, providerConfig.PrivateKey)
|
authMethods, err := buildAuthMethods(providerConfig.Password, providerConfig.PrivateKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -264,7 +264,10 @@ func RunNode(node *WorkflowNode, ctx *ExecutionContext) error {
|
|||||||
lastStatus := ctx.GetStatus(node.Config["fromNodeId"].(string))
|
lastStatus := ctx.GetStatus(node.Config["fromNodeId"].(string))
|
||||||
for _, branch := range node.ConditionNodes {
|
for _, branch := range node.ConditionNodes {
|
||||||
if branch.Config["type"] == string(lastStatus) {
|
if branch.Config["type"] == string(lastStatus) {
|
||||||
return RunNode(branch, ctx)
|
err := RunNode(branch, ctx)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("执行条件分支失败: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user