[deploy]- bug fix for devflight
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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: "",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user