changes foldername

This commit is contained in:
2022-01-06 11:03:53 -06:00
parent 959d4cbd2b
commit f3619d3ac3

40
vars/PodTemplates.groovy Normal file
View File

@@ -0,0 +1,40 @@
#!groovy
// Return random label for runner
def podLabel() {
return "jenkins-${UUID.randomUUID().toString()}"
}
// return kubernetes pod defination
def podYaml(def requiredContainers){
def dockerRepo = "registry.c.test-chamber-13.lan"
def output = """
---
apiVersion: v1
kind: Pod
metadata:
name: pipeline-worker
spec:
containers:
"""
if requiredContainers['kaniko'] == true {
output += """
- name: kaniko
imagePullPolicy: Always
image: ${dockerRepo}/library/kaniko:latest
tty: true
command:
- /busybox/sh
"""
}
if requiredContainer['alpine'] == true {
output += """
- name: alpine
imagePullPolicy: Always
image: ${dockerRepo}/library/alpine:latest
tty: true
"""
}
return output
}