You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-09-16 09:26:22 +02:00
Change config to have default
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user