Skip to content

sergiomartins8/jenkins-slave-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jenkins-slave-base

A jenkins-slave customized docker image 🐳

version release size stars pulls license

About

The goal is to build a useful image to serve as the base for Jenkins slaves. Thus, containing goods such as java, node, git, maven and python. And, on top of that it provides kubectl and helm binaries for working with a Kubernetes cluster.

Getting Started

Pull the image

$ docker pull sergiomartins8/jenkins-slave-base:latest

Jenkinsfile example

podTemplate(label: 'jenkins-slave-base-pod', serviceAccount: 'jenkins', containers: [
    containerTemplate(
        name: 'base', 
        image: 'sergiomartins8/jenkins-slave-base:latest', 
        ttyEnabled: true, 
        command: 'cat'
    )
  ],
  volumes: [
    hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock')
  ]
  ) {
    node('jenkins-slave-base-pod') {
        stage('Awesome stage') {
            container('base') {
                sh 'kubectl get po'
                sh 'helm env'
            }
        }
    }
}

Try out the above example using the jenkins-k8s-minikube project 🚀