update
This commit is contained in:
@@ -37,6 +37,48 @@ func TestCmiiEnvDeploy(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_HuNanErJiPingTaiJianGuan(t *testing.T) {
|
||||
|
||||
// 湖南二级平台 监管
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "36.137.146.187",
|
||||
WebPort: "8088",
|
||||
HarborIPOrCustomImagePrefix: "hncm-fc766f84.ecis.changsha-2.cmecloud.cn/cmii",
|
||||
HarborPort: "",
|
||||
Namespace: "zyly",
|
||||
TagVersion: "uas-2.0",
|
||||
TenantEnv: "",
|
||||
MinioPublicIP: "",
|
||||
MinioInnerIP: "helm-minio",
|
||||
NFSServerIP: "hcms-efs-class",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.CmiiUas2ImageList)
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ZhuHaiBianFangShengJi(t *testing.T) {
|
||||
|
||||
// 珠海边防升级 6.2.0-demo
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "36.141.69.163",
|
||||
WebPort: "8888",
|
||||
HarborIPOrCustomImagePrefix: "192.168.233.100",
|
||||
HarborPort: "8033",
|
||||
Namespace: "zhbf",
|
||||
TagVersion: "6.2.0",
|
||||
TenantEnv: "",
|
||||
MinioPublicIP: "192.168.233.100",
|
||||
MinioInnerIP: "192.168.233.100",
|
||||
NFSServerIP: "192.168.233.100",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii620ImageList)
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ChongQingSanHua(t *testing.T) {
|
||||
|
||||
// chongqing sanhua
|
||||
|
||||
@@ -138,7 +138,12 @@ func (syncCondition *ImageSyncEntity) PullFromEntityAndSyncConditionally() (imag
|
||||
syncCondition.DownloadCondition.FullNameImageList = concatAndUniformCmiiImage(syncCondition.DownloadCondition.FullNameImageList, syncCondition.DownloadCondition.CmiiNameTagList)
|
||||
|
||||
// gzip file folder path
|
||||
syncCondition.CompressCondition.GzipLocalFolder = filepath.Join(image.OfflineImageGzipFolderPrefix, "tmp")
|
||||
localGzipFolderName := "tmp"
|
||||
if syncCondition.DownloadCondition.ProjectName != "" {
|
||||
localGzipFolderName = syncCondition.DownloadCondition.ProjectName
|
||||
}
|
||||
|
||||
syncCondition.CompressCondition.GzipLocalFolder = filepath.Join(image.OfflineImageGzipFolderPrefix, localGzipFolderName)
|
||||
|
||||
// DCU
|
||||
A_DownloadCompressUpload(syncCondition, imageSyncResult)
|
||||
|
||||
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"testing"
|
||||
image2 "wdd.io/agent-common/image"
|
||||
"wdd.io/agent-common/real_project"
|
||||
"wdd.io/agent-common/utils"
|
||||
)
|
||||
|
||||
@@ -47,16 +48,21 @@ func TestLoadSplitDepGzipImageToTargetHarbor(t *testing.T) {
|
||||
|
||||
func TestPullFromEntityAndSyncConditionally(t *testing.T) {
|
||||
|
||||
// 全部镜像列表
|
||||
fullImageList := []string{}
|
||||
|
||||
fullImageList = append(fullImageList, real_project.CmiiUas2ImageList...)
|
||||
fullImageList = append(fullImageList, real_project.CmiiSRSImageList...)
|
||||
fullImageList = append(fullImageList, real_project.CmiiDorisImageList...)
|
||||
|
||||
// 下载镜像的核心函数
|
||||
sync := ImageSyncEntity{
|
||||
DownloadCondition: &DownloadEntity{
|
||||
ShouldDownloadImage: true,
|
||||
ProjectName: "6.2.0_demo",
|
||||
ProjectVersion: "6.2.0-demo",
|
||||
CmiiNameTagList: []string{
|
||||
//"cmii-uav-mqtthandler:5.4.0-bjdyt-052102",
|
||||
},
|
||||
FullNameImageList: []string{},
|
||||
ShouldDownloadImage: true,
|
||||
ProjectName: "uavms-2.0",
|
||||
ProjectVersion: "",
|
||||
CmiiNameTagList: []string{},
|
||||
FullNameImageList: fullImageList,
|
||||
DownloadAuthUserName: "",
|
||||
DownloadAuthPassword: "",
|
||||
},
|
||||
|
||||
@@ -203,6 +203,11 @@ func (op *CmiiK8sOperator) changeOperatorEnv(cmiiEnv string) {
|
||||
|
||||
if strings.Contains(cmiiEnv, "demo") {
|
||||
op.CurrentNamespace = config.Demo
|
||||
|
||||
// 2025年4月7日 特殊情况
|
||||
log.Info("2025年4月7日 特殊情况 demo现在在DEV环境!")
|
||||
op.CurrentClient = op.DevClient
|
||||
return
|
||||
}
|
||||
|
||||
if strings.Contains(cmiiEnv, "uavms") {
|
||||
|
||||
Reference in New Issue
Block a user