[ Server ] [ Harbor ] - sync projects - 8

This commit is contained in:
zeaslity
2023-11-16 11:12:35 +08:00
parent a31d9318b4
commit eac8866484

View File

@@ -261,18 +261,18 @@ func (hOp *HarborOperator) SyncProjectExec(funcArgs []string) (bool, []string) {
Description: "", Description: "",
DestNamespace: "", // 可以指定目标 Harbor 中的特定项目,如果为空,则使用源项目名称 DestNamespace: "", // 可以指定目标 Harbor 中的特定项目,如果为空,则使用源项目名称
DestNamespaceReplaceCount: nil, DestNamespaceReplaceCount: nil,
SrcRegistry: octopusSourceRegistry, SrcRegistry: &model.Registry{
DestRegistry: nil, ID: octopusSourceRegistry.ID,
Enabled: true, },
DestRegistry: &model.Registry{
ID: 0,
},
Enabled: true,
Filters: []*model.ReplicationFilter{ Filters: []*model.ReplicationFilter{
{ {
Type: "name", Type: "name",
Value: "cmii/**", // 根据需要同步的仓库进行调整 Value: "cmii/**", // 根据需要同步的仓库进行调整
}, },
{
Type: "name",
Value: "rancher/**", // 根据需要同步的仓库进行调整
},
}, },
ID: 0, ID: 0,
Name: "octopus-sync-replication", Name: "octopus-sync-replication",