Explorar o código

set job to paused on upgrades'

Alexander Belanger %!s(int64=4) %!d(string=hai) anos
pai
achega
ff75f7bb95
Modificáronse 2 ficheiros con 6 adicións e 1 borrados
  1. 1 1
      cli/cmd/deploy.go
  2. 5 0
      cli/cmd/deploy/deploy.go

+ 1 - 1
cli/cmd/deploy.go

@@ -417,7 +417,7 @@ func updatePushWithAgent(updateAgent *deploy.DeployAgent) error {
 
 func updateUpgradeWithAgent(updateAgent *deploy.DeployAgent) error {
 	// push the deployment
-	color.New(color.FgGreen).Println("Calling webhook for", app)
+	color.New(color.FgGreen).Println("Upgrading configuration for", app)
 
 	// read the values if necessary
 	valuesObj, err := readValuesFile()

+ 5 - 0
cli/cmd/deploy/deploy.go

@@ -279,6 +279,11 @@ func (d *DeployAgent) UpdateImageAndValues(overrideValues map[string]interface{}
 	// overwrite the tag based on a new image
 	currImageSection := mergedValues["image"].(map[string]interface{})
 
+	// if this is a job chart, set "paused" to false so that the job doesn't run
+	if d.release.Chart.Name() == "job" {
+		mergedValues["paused"] = true
+	}
+
 	// if the current image section is hello-porter, the image must be overriden
 	if currImageSection["repository"] == "public.ecr.aws/o1j4x7p4/hello-porter" ||
 		currImageSection["repository"] == "public.ecr.aws/o1j4x7p4/hello-porter-job" {