1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

Change config to have default

This commit is contained in:
Linda Siebert 2022-09-30 15:54:03 +02:00
parent 22d8b9f894
commit e65517457f
No known key found for this signature in database
GPG Key ID: E89C1C2E193579AB

View File

@ -234,6 +234,9 @@ type deployConfig struct {
}
func handleCFNativeDeployment(config *cloudFoundryDeployOptions, command command.ExecRunner) error {
if len(config.Manifest) == 0 {
config.Manifest = "manifest.yml"
}
deployType, err := checkAndUpdateDeployTypeForNotSupportedManifest(config)
@ -377,9 +380,6 @@ func getAppName(config *cloudFoundryDeployOptions) (string, error) {
if config.DeployType == "blue-green" {
return "", fmt.Errorf("Blue-green plugin requires app name to be passed (see https://github.com/bluemixgaragelondon/cf-blue-green-deploy/issues/27)")
}
if len(config.Manifest) == 0 {
return "", fmt.Errorf("Manifest file not provided in configuration. Cannot retrieve app name")
}
fileExists, err := fileUtils.FileExists(config.Manifest)
if err != nil {
return "", errors.Wrapf(err, "Cannot check if file '%s' exists", config.Manifest)
@ -613,9 +613,6 @@ func toStringInterfaceMap(in *orderedmap.OrderedMap, err error) (map[string]inte
func checkAndUpdateDeployTypeForNotSupportedManifest(config *cloudFoundryDeployOptions) (string, error) {
manifestFile := config.Manifest
if len(manifestFile) == 0 {
manifestFile = "manifest.yml"
}
manifestFileExists, err := fileUtils.FileExists(manifestFile)
if err != nil {