-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
146 lines (136 loc) · 6 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
def tascar_build_steps(stage_name) {
// Extract components from stage_name:
def system, arch, devenv
(system,arch,devenv) = stage_name.split(/ *&& */) // regexp for missing/extra spaces
// checkout ov-client from version control system, the exact same revision that
// triggered this job on each build slave
checkout scm
// Avoid that artifacts from previous builds influence this build
sh "git reset --hard && git clean -ffdx"
// Update submodules
sh "git submodule update --init --recursive"
// Clean up down to submodules
sh "make clean"
// Compile binaries
sh "make"
// Package debians
sh "make packaging"
// Store debian packets for later retrieval by the repository manager
stash name: (arch+"_"+system), includes: 'packaging/deb/debian/'
}
pipeline {
agent {label "pipeline"}
options {
buildDiscarder(logRotator(daysToKeepStr: '7', artifactDaysToKeepStr: '7'))
}
stages {
stage("build") {
parallel {
stage( "noble && x86_64 && tascardev") {
agent {
docker {
image "hoertech/docker-buildenv:tascar_x86_64-linux-gcc-13"
label "docker_x86_64"
alwaysPull true
args "-v /home/u:/home/u --hostname docker"
}
}
steps {tascar_build_steps("noble && x86_64 && tascardev")}
}
stage( "jammy && x86_64 && tascardev") {
agent {
docker {
image "hoertech/docker-buildenv:tascar_x86_64-linux-gcc-11"
label "docker_x86_64"
alwaysPull true
args "-v /home/u:/home/u --hostname docker"
}
}
steps {tascar_build_steps("jammy && x86_64 && tascardev")}
}
stage( "focal && x86_64 && tascardev") {
agent {
docker {
image "hoertech/docker-buildenv:tascar_x86_64-linux-gcc-9"
label "docker_x86_64"
alwaysPull true
args "-v /home/u:/home/u --hostname docker"
}
}
steps {tascar_build_steps("focal && x86_64 && tascardev")}
}
//stage( "bionic && x86_64 && tascardev") {
// agent {
// docker {
// image "hoertech/docker-buildenv:tascar_x86_64-linux-gcc-7"
// label "docker_x86_64"
// alwaysPull true
// args "-v /home/u:/home/u --hostname docker"
// }
// }
// steps {tascar_build_steps("bionic && x86_64 && tascardev")}
//}
stage( "bionic && armv7 && tascardev") {
agent {
docker {
image "hoertech/docker-buildenv:tascar_armv7-linux-gcc-7"
label "docker_qemu"
alwaysPull true
args "-v /home/u:/home/u --hostname docker"
}
}
//agent {label "bionic && armv7 && tascardev"}
steps {tascar_build_steps("bionic && armv7 && tascardev")}
}
stage( "bullseye && armv7 && tascardev") {
agent {
docker {
image "hoertech/docker-buildenv:tascar_armv7-linux-gcc-10"
label "docker_qemu"
alwaysPull true
args "-v /home/u:/home/u --hostname docker"
}
}
//agent {label "bullseye && armv7 && tascardev"}
steps {tascar_build_steps("bullseye && armv7 && tascardev")}
}
stage( "bullseye && aarch64 && tascardev") {
//agent {
// docker {
// image "hoertech/docker-buildenv:tascar_aarch64-linux-gcc-10"
// label "docker_qemu"
// alwaysPull true
// //args "-v /home/u:/home/u --hostname docker"
// }
//}
agent {label "bullseye && aarch64 && tascardev"}
steps {tascar_build_steps("bullseye && aarch64 && tascardev")}
}
}
}
stage("artifacts") {
agent {label "aptly"}
// do not publish packages for any branches except these
when { anyOf { branch 'master'; branch 'development' } }
steps {
// receive all deb packages from tascarpro build
unstash "x86_64_jammy"
unstash "x86_64_focal"
//unstash "x86_64_bionic"
unstash "armv7_bullseye"
unstash "aarch64_bullseye"
unstash "armv7_bionic"
// Copies the new debs to the stash of existing debs,
sh "make -f htchstorage.mk storage"
build job: "/Packaging/hoertech-aptly/$BRANCH_NAME", quietPeriod: 300, wait: false
}
}
}
post {
failure {
mail to: 'giso.grimm@vegri.net',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL} ($GIT_URL)"
}
}
}