This repository has been archived by the owner on May 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile.disabled
96 lines (81 loc) · 2.52 KB
/
Jenkinsfile.disabled
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
@Library('ecdc-pipeline')
import ecdcpipeline.ContainerBuildNode
import ecdcpipeline.ConanPackageBuilder
project = "conan-librdkafka"
conan_user = "ess-dmsc"
conan_pkg_channel = "stable"
containerBuildNodes = [
'centos': ContainerBuildNode.getDefaultContainerBuildNode('centos7-gcc8'),
'debian': ContainerBuildNode.getDefaultContainerBuildNode('debian10'),
'ubuntu': ContainerBuildNode.getDefaultContainerBuildNode('ubuntu1804-gcc8')
]
packageBuilder = new ConanPackageBuilder(this, containerBuildNodes, conan_pkg_channel)
packageBuilder.defineRemoteUploadNode('centos')
builders = packageBuilder.createPackageBuilders { container ->
packageBuilder.addConfiguration(container, [
'settings': [
'librdkafka:build_type': 'Debug'
],
'options': [
'librdkafka:shared': 'False'
]
])
packageBuilder.addConfiguration(container, [
'options': [
'librdkafka:shared': 'True'
]
])
packageBuilder.addConfiguration(container)
}
node {
checkout scm
builders['macOS'] = get_macos_pipeline()
builders['windows10'] = get_win10_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 librdkafka:build_type=Release \
--options librdkafka:shared=False \
--build=outdated"
sh "conan create . ${conan_user}/${conan_pkg_channel} \
--settings librdkafka:build_type=Release \
--options librdkafka:shared=True \
--build=outdated"
} // stage
} // dir
} // node
} // return
} // def
def get_win10_pipeline() {
return {
node('windows10') {
// Use custom location to avoid Win32 path length issues
ws('c:\\jenkins\\') {
cleanWs()
dir("${project}") {
stage("win10: Checkout") {
checkout scm
} // stage
stage("win10: Package") {
bat """C:\\Users\\dmgroup\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\conan.exe \
create . ${conan_user}/${conan_pkg_channel} \
--settings librdkafka:build_type=Release \
--options librdkafka:shared=True \
--build=outdated"""
} // stage
} // dir
} // ws
} // node
} // return
} // def