@@ -250,7 +250,8 @@ func (m *Meta) Init() error {
250
250
}
251
251
}
252
252
installVersion := common .GetVersion (m .DevopsMode , m .Type , m .Version )
253
- m .Log .Infof ("devops: %v, type: %s, version: %s, channel: %s" , m .DevopsMode , m .Type , installVersion , common .GetChannel (m .Version ))
253
+ repoChannel := common .GetChannel (m .Version )
254
+ m .Log .Infof ("devops: %v, type: %s, version: %s, channel: %s" , m .DevopsMode , m .Type , installVersion , repoChannel )
254
255
m .Log .Debugf ("start init %s" , common .GetInstallType (m .DevopsMode ))
255
256
cfg .Quickon .Type = common .QuickonType (m .Type )
256
257
cfg .Quickon .DevOps = m .DevopsMode
@@ -342,13 +343,7 @@ func (m *Meta) Init() error {
342
343
m .Log .Done ("check operator ready success" )
343
344
}
344
345
345
- helmchan := common .GetChannel (m .Version )
346
- helmargs := []string {"experimental" , "helm" , "upgrade" , "--name" , common .GetReleaseName (m .DevopsMode ), "--repo" , common .DefaultHelmRepoName , "--chart" , common .GetReleaseName (m .DevopsMode ), "--namespace" , common .GetDefaultSystemNamespace (true ), "--set" , "env.APP_DOMAIN=" + m .Domain , "--set" , "env.CNE_API_TOKEN=" + token , "--set" , "cloud.defaultChannel=" + helmchan }
347
- if helmchan != "stable" {
348
- helmargs = append (helmargs , "--set" , "env.PHP_DEBUG=2" )
349
- helmargs = append (helmargs , "--set" , "cloud.switchChannel=true" )
350
- helmargs = append (helmargs , "--set" , "cloud.selectVersion=true" )
351
- }
346
+ helmargs := []string {"experimental" , "helm" , "upgrade" , "--name" , common .GetReleaseName (m .DevopsMode ), "--repo" , common .DefaultHelmRepoName , "--chart" , common .GetReleaseName (m .DevopsMode ), "--namespace" , common .GetDefaultSystemNamespace (true ), "--set" , "env.APP_DOMAIN=" + m .Domain , "--set" , "env.CNE_API_TOKEN=" + token , "--set" , "cloud.defaultChannel=" + repoChannel }
352
347
hostdomain := m .Domain
353
348
if kutil .IsLegalDomain (hostdomain ) && m .DomainType == "api" {
354
349
m .Log .Debugf ("use tls cert for domain %s" , hostdomain )
@@ -380,21 +375,19 @@ func (m *Meta) Init() error {
380
375
}
381
376
382
377
helmargs = append (helmargs , "--set" , fmt .Sprintf ("ingress.host=%s" , hostdomain ))
383
-
384
378
if m .DevopsMode {
385
379
// 指定类型
386
380
helmargs = append (helmargs , "--set" , fmt .Sprintf ("deploy.product=%s" , m .Type ))
387
- // deployVersion := fmt.Sprintf("deploy.versions.%s=%s%s.k8s", m.Type, m.Type, installVersion)
388
- // if m.Type == common.ZenTaoOSSType.String() {
389
- // deployVersion = fmt.Sprintf("deploy.versions.%s=%s", m.Type, installVersion)
390
- // }
391
- // helmargs = append(helmargs, "--set", deployVersion)
392
- if helmchan != "stable" {
381
+ if repoChannel == "test" {
393
382
helmargs = append (helmargs , "--set" , "image.repository=test/zentao" )
394
383
helmargs = append (helmargs , "--set" , "sidecars.backend.image.tag=dev" )
395
384
helmargs = append (helmargs , "--set" , "sidecars.backend.image.pullPolicy=Always" )
385
+ helmargs = append (helmargs , "--set" , "env.PHP_DEBUG=2" )
386
+ helmargs = append (helmargs , "--set" , "cloud.switchChannel=true" )
387
+ helmargs = append (helmargs , "--set" , "cloud.selectVersion=true" )
388
+ }
389
+ if common .NeedUseCustomVersion (m .Version ) {
396
390
deployVersion := fmt .Sprintf ("deploy.versions.%s=%s%s.k8s" , m .Type , m .Type , installVersion )
397
- helmargs = append (helmargs , "--set" , deployVersion )
398
391
if m .Type == common .ZenTaoOSSType .String () || m .Type == common .ZenTaoOldOSSType .String () {
399
392
deployVersion = fmt .Sprintf ("deploy.versions.open=%s" , installVersion )
400
393
}
0 commit comments