[Agent][Deploy] - add zjyd
This commit is contained in:
@@ -504,6 +504,7 @@ func (op *CmiiK8sOperator) DeploymentUpdateTagByImageFullName(cmiiEnv, imageFull
|
||||
return op.DeploymentUpdateTag(cmiiEnv, appName, newTag)
|
||||
}
|
||||
|
||||
// DeploymentUpdateTag 更新一个Deployment的Tag,返回true或者false。 同时更新IMAGE_VERSION BIZ_GROUP
|
||||
func (op *CmiiK8sOperator) DeploymentUpdateTag(cmiiEnv, appName, newTag string) bool {
|
||||
|
||||
if newTag == "" {
|
||||
@@ -545,15 +546,15 @@ func (op *CmiiK8sOperator) DeploymentUpdateTag(cmiiEnv, appName, newTag string)
|
||||
tagVersion = strings.Split(newTag, "-")[0]
|
||||
}
|
||||
envList := container.Env
|
||||
for _, envVar := range envList {
|
||||
for index, envVar := range envList {
|
||||
if envVar.Name == "IMAGE_VERSION" {
|
||||
envVar.Value = tagVersion
|
||||
envList[index].Value = tagVersion
|
||||
}
|
||||
if envVar.Name == "BIZ_CONFIG_GROUP" {
|
||||
envVar.Value = tagVersion
|
||||
envList[index].Value = tagVersion
|
||||
}
|
||||
if envVar.Name == "SYS_CONFIG_GROUP" {
|
||||
envVar.Value = tagVersion
|
||||
envList[index].Value = tagVersion
|
||||
}
|
||||
}
|
||||
log.DebugF("[DeploymentUpdateTag] - update env IMAGE_VERSION to [%s]", tagVersion)
|
||||
|
||||
Reference in New Issue
Block a user