-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
63 lines (52 loc) · 1.53 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
@Library('ecdc-pipeline')
import ecdcpipeline.ContainerBuildNode
import ecdcpipeline.ConanPackageBuilder
project = "conan-graylog-logger"
conan_user = "ess-dmsc"
conan_pkg_channel = "stable"
container_build_bodes = [
'centos': ContainerBuildNode.getDefaultContainerBuildNode('centos7-gcc11'),
'debian': ContainerBuildNode.getDefaultContainerBuildNode('debian11'),
'ubuntu': ContainerBuildNode.getDefaultContainerBuildNode('ubuntu2204')
]
package_builder = new ConanPackageBuilder(this, container_build_bodes, conan_pkg_channel)
package_builder.activateEmailFailureNotifications()
package_builder.defineRemoteUploadNode('centos')
builders = package_builder.createPackageBuilders { container ->
package_builder.addConfiguration(container, [
'settings': [
'graylog_logger:build_type': 'Release'
]
])
}
node {
checkout scm
if (env.ENABLE_MACOS_BUILDS.toUpperCase() == 'TRUE') {
builders['macOS'] = get_macos_pipeline()
}
try {
parallel builders
} catch (e) {
package_builder.handleFailureMessages()
throw e
}
// 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 graylog-logger:build_type=Release \
--build=outdated"
} // stage
} // dir
} // node
} // return
} // def