Right now I read an external podTemplate from a file in my Jenkinsfile with:
podTemplate(label: podLabel, yaml: readTrusted('pod.yaml')) {
timestamps {
node(podLabel) {
stage('Checkout') {
checkout scm
}
stage('Info') {
sh 'whoami'
container('gradle') {
sh 'whoami'
}
}
}
}
}
where pod.yaml is located in the same repo that is being checked out on the agent.
But is it possible to specify I want to read that file from the master/controller instead so I don’t have to store it in each repo?
I know I can create podTemplates on the master using e.g. JCASC but until then I would like I simple getting started approach where I just read a file from the master - if possible?