Created
September 16, 2018 18:35
-
-
Save anir/29b1e88195dc9f6307dc3e0c2342b5f9 to your computer and use it in GitHub Desktop.
declared services
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// serviceConfig.each { | |
// serviceName, config -> | |
// println serviceName | |
// println config | |
// def plan = config.plan | |
// def label = config.label | |
// | |
// def createServiceCmd = "cf create-service ${label} ${plan} ${serviceName}" | |
// def isServiceAvailable = "cf services | grep -w \'${serviceName}\' | wc -l" | |
// | |
// isServiceAvailable = sh(script: isServiceAvailable, returnStdout: true).trim() | |
// println "${serviceName} service available? count # " + isServiceAvailable | |
// if(isServiceAvailable != "1"){ | |
// println '*** Creating Service : ' + serviceName | |
// createServiceCmd = sh script: createServiceCmd, returnStatus: true | |
// if(createServiceCmd != 0){ | |
// throw new Exception("[ERROR] Could not successfully create declared service : " + serviceName) | |
// } | |
// } else { | |
// println '*** Service already available. Skipping service creation for ' + serviceName | |
// } | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment