adds pod restart

This commit is contained in:
Hyatt 2022-01-15 09:30:43 -06:00
parent 897ef125fa
commit 8e39509405
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -1,4 +1,5 @@
def label = "jenkins-${UUID.randomUUID().toString()}" def label = "jenkins-${UUID.randomUUID().toString()}"
def templateName = "pipeline-worker"
def repository = "registry.c.test-chamber-13.lan" def repository = "registry.c.test-chamber-13.lan"
def kanikoImage = "${repository}/library/kaniko:latest" def kanikoImage = "${repository}/library/kaniko:latest"
@ -10,18 +11,13 @@ def steamTokenName = "ssfn7445013141740368289"
podTemplate( podTemplate(
label: label, label: label,
name: "pipeline-worker", name: templateName,
yaml: """--- yaml: functions.podYaml(
apiVersion: v1 repo: repository,
kind: Pod templateName: templateName,
spec: kaniko: true,
containers: alpine: true
- name: kaniko )
image: ${kanikoImage}
tty: true
command:
- /busybox/cat
""",
) { ) {
node (label) { node (label) {
def workspace = pwd() def workspace = pwd()
@ -95,5 +91,12 @@ ENTRYPOINT ["/bin/bash", "-c", "/home/steam/ProjectZomboid/start-server.sh"]
} }
} }
} }
functions.deletePod(
kubeAuth: "rancher-admin-token",
kubeURL: "https://rancher.test-chamber-13.lan/k8s/clusters/c-mc9cq",
namespace: "game-servers",
selector: "workload.user.cattle.io/workloadselector=apps.deployment-game-servers-project-zomboid"
)
} }
} }