[Cmii][ImageSync] -Image Function accomplish -1

This commit is contained in:
zeaslity
2024-03-26 17:17:46 +08:00
committed by zeaslity
parent d800d5dfb8
commit 2b53db2141
14 changed files with 245 additions and 52 deletions

View File

@@ -12,14 +12,14 @@ func TestAgentOsOperator_Sync(t *testing.T) {
// imageFullName gzipFolderPrefix gzipFileName ossUrlPrefix proxyUrl targetHarborHost namespace targetImageFullName
funcArgs := []string{
"harbor.cdcyy.com.cn/cmii/busybox:0326",
"/root/octopus_image/",
"",
"https://oss.demo.uavcmlc.com/cmlc-installation/tmp/",
"",
"/var/lib/docker/octopus_image/",
"cmlc=cmii=busybox=0326.tar.gz",
"https://oss.demo.uavcmlc.com:18000/cmlc-installation/tmp/",
"",
"10.250.0.100",
"",
}
sync, strings := agentOP.Sync("DOWNLOAD_DOCKER_IMAGE", funcArgs...)
sync, strings := agentOP.Sync("PUSH_IMAGE_TO_TARGET_HARBOR", funcArgs...)
fmt.Println("func result are => " + strconv.FormatBool(sync))
utils.BeautifulPrint(strings)
}