-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
57 lines (45 loc) · 1.47 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
@Library('ecdc-pipeline')
import ecdcpipeline.ContainerBuildNode
import ecdcpipeline.ConanPackageBuilder
project = "conan-readerwriterqueue"
conan_user = "ess-dmsc"
conan_pkg_channel = "stable"
containerBuildNodes = [
'centos': ContainerBuildNode.getDefaultContainerBuildNode('centos7-gcc11'),
'debian': ContainerBuildNode.getDefaultContainerBuildNode('debian11'),
'ubuntu': ContainerBuildNode.getDefaultContainerBuildNode('ubuntu2204')
]
packageBuilder = new ConanPackageBuilder(this, containerBuildNodes, conan_pkg_channel)
packageBuilder.defineRemoteUploadNode('centos')
builders = packageBuilder.createPackageBuilders { container ->
packageBuilder.addConfiguration(container)
}
node {
checkout scm
if (env.ENABLE_MACOS_BUILDS.toUpperCase() == 'TRUE') {
builders['macOS'] = get_macos_pipeline()
}
parallel builders
// Delete workspace when build is done.
cleanWs()
}
def get_macos_pipeline() {
return {
node('macos') {
cleanWs()
dir("${project}") {
stage("macOS: Checkout") {
checkout scm
} // stage
stage("macOS: Package") {
sh "conan create . ${conan_user}/${conan_pkg_channel} \
--settings readerwriter:build_type=Release \
--build=outdated"
sh "conan create . ${conan_user}/${conan_pkg_channel} \
--settings readerwriter:build_type=Release \
--build=outdated"
} // stage
} // dir
} // node
} // return
} // def