adds pod restart
This commit is contained in:
parent
897ef125fa
commit
8e39509405
@ -1,4 +1,5 @@
|
||||
def label = "jenkins-${UUID.randomUUID().toString()}"
|
||||
def templateName = "pipeline-worker"
|
||||
|
||||
def repository = "registry.c.test-chamber-13.lan"
|
||||
def kanikoImage = "${repository}/library/kaniko:latest"
|
||||
@ -10,18 +11,13 @@ def steamTokenName = "ssfn7445013141740368289"
|
||||
|
||||
podTemplate(
|
||||
label: label,
|
||||
name: "pipeline-worker",
|
||||
yaml: """---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
containers:
|
||||
- name: kaniko
|
||||
image: ${kanikoImage}
|
||||
tty: true
|
||||
command:
|
||||
- /busybox/cat
|
||||
""",
|
||||
name: templateName,
|
||||
yaml: functions.podYaml(
|
||||
repo: repository,
|
||||
templateName: templateName,
|
||||
kaniko: true,
|
||||
alpine: true
|
||||
)
|
||||
) {
|
||||
node (label) {
|
||||
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"
|
||||
)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user