Explorar el Código

ignore secret env variables for build

Alexander Belanger hace 5 años
padre
commit
6b4ab6d1dd
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      cli/cmd/deploy/deploy.go

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

@@ -301,7 +301,11 @@ func (d *DeployAgent) getEnvFromRelease() (map[string]string, error) {
 			return nil, fmt.Errorf("could not cast environment variables to object")
 		}
 
-		mapEnvConfig[key] = valStr
+		// if the value contains PORTERSECRET, this is a "dummy" env that gets injected during
+		// run-time, so we ignore it
+		if !strings.Contains(valStr, "PORTERSECRET") {
+			mapEnvConfig[key] = valStr
+		}
 	}
 
 	return mapEnvConfig, nil