From e2a1062431606e5ffa3c1c97105e95d509cfab16 Mon Sep 17 00:00:00 2001 From: Ovidio Mallo Date: Fri, 9 Dec 2016 14:38:54 +0100 Subject: [PATCH] PoC to read the config from a file --- deployment/config.yaml | 4 ++++ deployment/pipeline.groovy | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 deployment/config.yaml diff --git a/deployment/config.yaml b/deployment/config.yaml new file mode 100644 index 0000000..85868f2 --- /dev/null +++ b/deployment/config.yaml @@ -0,0 +1,4 @@ +dev: + foo: bar +test: + foo2: bar2 diff --git a/deployment/pipeline.groovy b/deployment/pipeline.groovy index 82597de..6ddf774 100644 --- a/deployment/pipeline.groovy +++ b/deployment/pipeline.groovy @@ -11,9 +11,14 @@ def getReplicasOrDefault(deploymentConfig, project, defaultReplicas) { node() { def ocCmd = getOcCmd() + def configFile = "deployment/config.yaml" def buildManifest = "deployment/manifests/build.yaml" def appManifest = "deployment/manifests/app.yaml" + Yaml configFileYaml = new Yaml() + def config = configFileYaml.load(configFile) + println config + stage("Build") { git "https://github.com/omallo/ruby-ex.git" sh "${ocCmd} process -f ${buildManifest} -n rubex-dev | ${ocCmd} apply -f - -n rubex-dev"