PoC to read the config from a file

This commit is contained in:
Ovidio Mallo 2016-12-09 14:38:54 +01:00
parent ce7365b565
commit e2a1062431
2 changed files with 9 additions and 0 deletions

4
deployment/config.yaml Normal file
View file

@ -0,0 +1,4 @@
dev:
foo: bar
test:
foo2: bar2

View file

@ -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"