Explorar o código

ignore secret env variables for build

Alexander Belanger %!s(int64=5) %!d(string=hai) anos
pai
achega
6b4ab6d1dd
Modificáronse 1 ficheiros con 5 adicións e 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")
 			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
 	return mapEnvConfig, nil