in pkg/cmdhelpers/workflow_helpers.go [35:56]
func UpdateProductionDeployments(deployType, dest string, draftConfig *config.DraftConfig, templateWriter templatewriter.TemplateWriter) error {
acr, err := draftConfig.GetVariable("AZURECONTAINERREGISTRY")
if err != nil {
return fmt.Errorf("get variable: %w", err)
}
containerName, err := draftConfig.GetVariable("CONTAINERNAME")
if err != nil {
return fmt.Errorf("get variable: %w", err)
}
productionImage := fmt.Sprintf("%s.azurecr.io/%s", acr.Value, containerName.Value)
switch deployType {
case "helm":
return setHelmContainerImage(dest+"/charts/production.yaml", productionImage, templateWriter)
case "kustomize":
return setDeploymentContainerImage(dest+"/overlays/production/deployment.yaml", productionImage)
case "manifests":
return setDeploymentContainerImage(dest+"/manifests/deployment.yaml", productionImage)
}
return nil
}