Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Created June 19, 2018 01:20
Show Gist options
  • Save vfarcic/ced1806af8e092d202942a79e81d5ba9 to your computer and use it in GitHub Desktop.
Save vfarcic/ced1806af8e092d202942a79e81d5ba9 to your computer and use it in GitHub Desktop.
podTemplate(
label: "kubernetes",
namespace: "go-demo-3-build",
serviceAccount: "build",
yaml: """
apiVersion: v1
kind: Pod
spec:
containers:
- name: kubectl
image: vfarcic/kubectl
command: ["sleep"]
args: ["100000"]
- name: oc
image: vfarcic/openshift-client
command: ["sleep"]
args: ["100000"]
- name: golang
image: golang:1.9
command: ["sleep"]
args: ["100000"]
- name: helm
image: vfarcic/helm:2.8.2
command: ["sleep"]
args: ["100000"]
"""
) {
node("kubernetes") {
container("kubectl") {
stage("kubectl") {
sh "kubectl version"
}
}
container("oc") {
stage("oc") {
sh "oc version"
}
}
container("golang") {
stage("golang") {
sh "go version"
}
}
container("helm") {
stage("helm") {
sh "helm version --tiller-namespace go-demo-3-build"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment