-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
91 lines (88 loc) · 2.25 KB
/
Jenkinsfile
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
podTemplate(label: 'oci-build', containers: [
containerTemplate(name: 'oci-build', nodeSelector: "type=server,zone=b", image: 'crucible.lab:4000/oci/build:latest', ttyEnabled: true, privileged: true, alwaysPullImage: true, command: 'bash')
]) {
node('oci-build') {
stage('Run entrypoint') {
container('oci-build') {
sh 'sudo GOPATH=/root/.go/ TERM=xterm /usr/local/bin/entrypoint.sh -d'
}
}
stage('Build catalyst') {
container('oci-build') {
sh 'sudo TERM=xterm /usr/local/bin/build -p -c'
}
}
stage('Build initial') {
container('oci-build') {
sh 'sudo TERM=xterm /usr/local/bin/build -i'
}
}
stage('Build projects') {
container('oci-build') {
sh 'sudo TERM=xterm /usr/local/bin/build -b all'
}
}
}
}
*/
pipeline {
agent {
kubernetes {
label 'oci-build'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
name: oci-build
labels:
label: oci-build
spec:
nodeSelector:
type: server
zone: b
nodeName: crucible
containers:
- name: oci-build
image: crucible.lab:4000/oci/build:latest
command:
- bash
tty: true
securityContext:
privileged: true
imagePullPolicy: Always
"""
}
}
stages {
stage('Run entrypoint') {
steps {
container('oci-build') {
sh 'sudo GOPATH=/root/.go/ TERM=xterm /usr/local/bin/entrypoint.sh -d'
}
}
}
stage('Build catalyst') {
steps {
container('oci-build') {
sh 'sudo TERM=xterm /usr/local/bin/build -p -c'
}
}
}
stage('Build initial') {
steps {
container('oci-build') {
sh 'sudo TERM=xterm /usr/local/bin/build -i'
}
}
}
stage('Build projects') {
steps {
container('oci-build') {
sh 'sudo TERM=xterm /usr/local/bin/build -b all'
}
}
}
}
}