This commit is contained in:
Ovidio Mallo 2016-12-09 16:46:44 +01:00
parent c0c636f91d
commit b3626ed2b3

View file

@ -12,8 +12,8 @@ def getReplicasOrDefault(deploymentConfig, project, defaultReplicas) {
} }
@NonCPS @NonCPS
def getConfig(cfg) { def parseYaml(content) {
return new Yaml().load(readFile(file: "deployment/config.yaml", encoding: "UTF-8")) return new Yaml().load(content)
} }
node() { node() {
@ -22,24 +22,13 @@ node() {
def buildManifest = "deployment/manifests/build.yaml" def buildManifest = "deployment/manifests/build.yaml"
def appManifest = "deployment/manifests/app.yaml" def appManifest = "deployment/manifests/app.yaml"
def config = null
stage("Build") { stage("Build") {
git "https://github.com/omallo/ruby-ex.git" git "https://github.com/omallo/ruby-ex.git"
def a = readFile(file: "deployment/config.yaml", encoding: "UTF-8") config = parseYaml(readFile("deployment/config.yaml"))
def b = "a: 1\nb: 2\nc:\n - aaa\n - bbb"
if (!a.equals(b)) {
println "huch"
} else {
println "yeah"
}
println readFile("deployment/config.yaml")
println "teeeeeest start"
def config = getConfig(a)
println config.getClass()
println config println config
println "teeeeeest end"
//sh "${ocCmd} process -f ${buildManifest} -n rubex-dev | ${ocCmd} apply -f - -n rubex-dev" //sh "${ocCmd} process -f ${buildManifest} -n rubex-dev | ${ocCmd} apply -f - -n rubex-dev"
//sh "${ocCmd} start-build frontend -w -n rubex-dev" //sh "${ocCmd} start-build frontend -w -n rubex-dev"