瀏覽代碼

add check to make sure image repo is never written as hello-porter

Alexander Belanger 4 年之前
父節點
當前提交
d1fb1825f9
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      api/server/handlers/release/update_rollback.go

+ 3 - 1
api/server/handlers/release/update_rollback.go

@@ -118,7 +118,9 @@ func updateReleaseRepo(config *config.Config, release *models.Release, helmRelea
 		return fmt.Errorf("Could not find field repository in config")
 	}
 
-	if repoStr != release.ImageRepoURI {
+	if repoStr != release.ImageRepoURI &&
+		repoStr != "public.ecr.aws/o1j4x7p4/hello-porter" &&
+		repoStr != "public.ecr.aws/o1j4x7p4/hello-porter-job" {
 		release.ImageRepoURI = repoStr
 		_, err := config.Repo.Release().UpdateRelease(release)