From 8186f7748d108c3d33adc8a60a38424fff08fb31 Mon Sep 17 00:00:00 2001 From: zeaslity Date: Thu, 16 Nov 2023 10:03:23 +0800 Subject: [PATCH] [agent] [harbor] - modify harbor excutor --- agent-go/executor/HarborExecutor.go | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/agent-go/executor/HarborExecutor.go b/agent-go/executor/HarborExecutor.go index 18ee1fd..a87f59a 100644 --- a/agent-go/executor/HarborExecutor.go +++ b/agent-go/executor/HarborExecutor.go @@ -234,20 +234,15 @@ func (hOp *HarborOperator) SyncProjectExec(funcArgs []string) (bool, []string) { Insecure: true, Name: "cmii", // 源 Harbor 实例的注册表 ID,通常为 0 Type: "harbor", - URL: "10.250.0.126:8033", + URL: "http://10.250.0.126:8033", }, Enabled: true, - //Filters: []*model.ReplicationFilter{ - // { - // Type: "name", - // Value: "cmii/**", // 根据需要同步的仓库进行调整 - // }, - // { - // Type: "name", - // Value: "rancher/**", // 根据需要同步的仓库进行调整 - // }, - //}, - Filters: nil, + Filters: []*model.ReplicationFilter{ + { + Type: "name", + Value: "cmii/**", // 根据需要同步的仓库进行调整 + }, + }, ID: 0, Name: "sync-repositories-to-target", Override: true, @@ -264,7 +259,7 @@ func (hOp *HarborOperator) SyncProjectExec(funcArgs []string) (bool, []string) { Insecure: true, Name: "cmii", // 源 Harbor 实例的注册表 ID,通常为 0 Type: "harbor", - URL: "10.250.0.100:8033", + URL: "http://10.250.0.100:8033", }, Trigger: &model.ReplicationTrigger{ Type: "manual", // 可以是 "manual", "scheduled", 或 "event_based"