Kubernetes Plugin for Jenkins 1.5
Kubernetes Plugin for Jenkins 1.5
Take a look at the new features, bug fixes, and stability improvements since version 1.0 of the Kubernetes Plugin for Jenkins.
Join the DZone community and get the full member experience.
Join For Free15 releases have gone by in 7 months since 1.0 last September
There have been 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 the readFile
step to load the YAML from a file in your Git repo.
- Allows creation of Pod templates from YAML. This allows setting all possible fields in Kubernetes API using YAML: JENKINS-50282#275
- Supports passing
kubeconfig
file as credentials using secretFile credentials: JENKINS-49817#294
You can find the full changelog on GitHub.
Published at DZone with permission of Carlos Sanchez , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
{{ parent.title || parent.header.title}}
{{ parent.tldr }}
{{ parent.linkDescription }}
{{ parent.urlSource.name }}