[deploy]- bug fix for devflight

This commit is contained in:
zeaslity
2024-11-12 11:38:50 +08:00
parent bf45eeb735
commit 332cc1d9eb
10 changed files with 14163 additions and 14441 deletions

View File

@@ -36,16 +36,16 @@ func CmiiEnvDeploy(
folderPrefix := DeployFilePrefix + deployCommonEnv.Namespace + "/"
tenantEnv := deployCommonEnv.Namespace
// uavcloud-devflight ==> devflight
// uavcloud-dev ==> dev
//if strings.Contains(tenantEnv, "-") {
// split := strings.Split(tenantEnv, "-")
// tenantEnv = split[len(split)-1]
//} else {
// // demo ==> ""
// // cqlyj ==> ""
// tenantEnv = ""
//}
//uavcloud-devflight ==> devflight
//uavcloud-dev ==> dev
if strings.Contains(tenantEnv, "-") {
split := strings.Split(tenantEnv, "-")
tenantEnv = split[len(split)-1]
} else {
// demo ==> ""
// cqlyj ==> ""
tenantEnv = ""
}
// assign folder prefix
deployCommonEnv.ApplyFilePrefix = folderPrefix

View File

@@ -25,7 +25,7 @@ func TestCmiiEnvDeploy(t *testing.T) {
HarborPort: "",
Namespace: deployNamespace,
TagVersion: "6.0.0",
TenantEnv: "",
TenantEnv: "devflight",
MinioPublicIP: "",
MinioInnerIP: "127.0.0.1",
NFSServerIP: "",

View File

@@ -257,7 +257,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
now := time.Now()
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 16, 45, 00, 0, now.Location())
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 9, 28, 00, 0, now.Location())
duration := time.Duration(0)
@@ -277,7 +277,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
cmiiEnv := demo
appNameTagMap := map[string]string{
"cmii-uav-platform-uasms": "6.0.0-110902",
"cmii-uas-lifecycle": "6.0.0-111201",
}
for appName, newTag := range appNameTagMap {