[Cmii][ImageSync] - 优化处理逻辑

This commit is contained in:
zeaslity
2024-03-25 09:20:08 +08:00
committed by zeaslity
parent 46b9ba59e9
commit 2af05c903c
9 changed files with 51 additions and 13 deletions

View File

@@ -51,6 +51,7 @@ func Execute(em *ExecutionMessage) (bool, []string) {
}
} else if strings.HasPrefix(em.ExecutionType, "HARBOR") {
// harbor function
if em.FuncContent == nil || len(em.FuncContent) <= 1 {
ok = false
resultLog = []string{
@@ -61,6 +62,7 @@ func Execute(em *ExecutionMessage) (bool, []string) {
ok, resultLog = HarborOperatorCache.Exec(em.FuncContent[0], em.FuncContent[1:]...)
} else {
// deprecated
// shell command
if em.PipeLineCommand != nil && len(em.PipeLineCommand) != 0 {
// 管道命令