[ Server ] [ Harbor ] - sync projects - 10
This commit is contained in:
@@ -322,6 +322,24 @@ func (hOp *HarborOperator) SyncProjectExec(funcArgs []string) (bool, []string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
realOctopusReplicationPolicy, err := targetClient.GetReplicationPolicyByName(ctx, octopusReplicationPolicyName)
|
||||||
|
if err != nil {
|
||||||
|
return false, []string{
|
||||||
|
"[Harbor Sync Project ] - failed to get the realOctopusReplicationPolicy!",
|
||||||
|
err.Error(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
err = targetClient.TriggerReplicationExecution(ctx, &model.StartReplicationExecution{
|
||||||
|
PolicyID: realOctopusReplicationPolicy.ID,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return false, []string{
|
||||||
|
"[Harbor Sync Project ] - failed to start the harbor sync execution !",
|
||||||
|
err.Error(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
func (hOp *HarborOperator) Command(baseFuncName string, funcArgs ...string) []string {
|
func (hOp *HarborOperator) Command(baseFuncName string, funcArgs ...string) []string {
|
||||||
|
|||||||
Reference in New Issue
Block a user