15 releases have gone by in 7 months since 1.0 last September
Some interesting new features since 1.0 and a lot of bugfixes and overall stability improvements. For instance now you can use yaml to define the Pod that will be used for your job:
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
apiVersion: v1
kind: Pod
metadata:
labels:
some-label: some-label-value
spec:
containers:
- name: busybox
image: busybox
command:
- cat
tty: true
"""
) {
node (label) {
container('busybox') {
sh "hostname"
}
}
}
You can use readFile step to load the yaml from a file in your git repo.
- Allow creating Pod templates from yaml. This allows setting all possible fields in Kubernetes API using yaml JENKINS-50282 #275
- Support passing
kubeconfigfile as credentials using secretFile credentials JENKINS-49817 #294
You can find the full changelog in GitHub.
“You can use readFile step to load the yaml from a file in your git repo.” Could you expand on this please? Wouldn’t this require running a node beforehand to get the file from scm?
I think I have tried it at some pooint without a running node but I don’t recall now