-
Notifications
You must be signed in to change notification settings - Fork 8
/
my-k8s-job-ns.groovy
50 lines (50 loc) · 1.03 KB
/
my-k8s-job-ns.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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"
}
}
}
}