Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Kubernetes Plugin for Jenkins 1.5

DZone's Guide to

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.

· DevOps Zone ·
Free Resource

DevOps involves integrating development, testing, deployment and release cycles into a collaborative process. Learn more about the 4 steps to an effective DevSecOps infrastructure.

15 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.


Read the 4-part DevOps testing eBook to learn how to detect problems earlier in your DevOps testing processes.

Topics:
devops ,jenkins ,kubernetes ,plugin ,code

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}