PoC to read the config from a file

This commit is contained in:
Ovidio Mallo 2016-12-09 14:42:09 +01:00
parent 5572d4751e
commit 50dffbc7d0

View file

@ -1,5 +1,3 @@
import org.yaml.snakeyaml.Yaml
def getOcCmd() {
return "oc --token=`cat /var/run/secrets/kubernetes.io/serviceaccount/token` --server=https://openshift.default.svc.cluster.local --certificate-authority=/run/secrets/kubernetes.io/serviceaccount/ca.crt"
}
@ -17,8 +15,7 @@ node() {
def buildManifest = "deployment/manifests/build.yaml"
def appManifest = "deployment/manifests/app.yaml"
Yaml configFileYaml = new Yaml()
def config = configFileYaml.load(configFile)
def config = def config = new JsonSlurper().parse(new File(configFile))
println config
stage("Build") {