PoC to read the config from a file
This commit is contained in:
parent
ce7365b565
commit
e2a1062431
2 changed files with 9 additions and 0 deletions
4
deployment/config.yaml
Normal file
4
deployment/config.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
dev:
|
||||||
|
foo: bar
|
||||||
|
test:
|
||||||
|
foo2: bar2
|
|
@ -11,9 +11,14 @@ def getReplicasOrDefault(deploymentConfig, project, defaultReplicas) {
|
||||||
node() {
|
node() {
|
||||||
def ocCmd = getOcCmd()
|
def ocCmd = getOcCmd()
|
||||||
|
|
||||||
|
def configFile = "deployment/config.yaml"
|
||||||
def buildManifest = "deployment/manifests/build.yaml"
|
def buildManifest = "deployment/manifests/build.yaml"
|
||||||
def appManifest = "deployment/manifests/app.yaml"
|
def appManifest = "deployment/manifests/app.yaml"
|
||||||
|
|
||||||
|
Yaml configFileYaml = new Yaml()
|
||||||
|
def config = configFileYaml.load(configFile)
|
||||||
|
println config
|
||||||
|
|
||||||
stage("Build") {
|
stage("Build") {
|
||||||
git "https://github.com/omallo/ruby-ex.git"
|
git "https://github.com/omallo/ruby-ex.git"
|
||||||
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"
|
||||||
|
|
Loading…
Reference in a new issue