-
Notifications
You must be signed in to change notification settings - Fork 319
/
Jenkinsfile.conan
111 lines (94 loc) · 3.98 KB
/
Jenkinsfile.conan
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
#!groovy
// ***************************************************************
// This is an internal Bloomberg Conan recipe. *
// This recipe does not work outside of Bloomberg infrastructure *
// ***************************************************************
library identifier: "conan-pipeline@main",
retriever: modernSCM([
$class: 'GitSCMSource',
remote: "https://bbgithub.dev.bloomberg.com/conan/conan-pipeline",
credentialsId: 'bbgithub_token'
])
jobInfo.failIfBranchIndexing()
node('WINDOWS') {
try {
stage('Checkout') {
checkout scm
}
withConan { conan ->
stage('Create package(s)') {
String user = 'test'
String channel = 'unstable'
if (env.CHANGE_ID) {
user = 'pr'
channel = "pr-${env.CHANGE_ID}"
}
conan.getReleaseProfiles().each { profile ->
writeFile(file:"standalones/CMakeLists.txt", text: "")
writeFile(file:"groups/CMakeLists.txt", text: "")
writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(ryu)")
conan.create(name: 'libryu-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)
writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(inteldfp/LIBRARY)")
conan.create(name: 'libinteldfp-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)
writeFile(file:"thirdparty/CMakeLists.txt", text: "add_subdirectory(pcre2)")
conan.create(name: 'libpcre2-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)
writeFile(file:"thirdparty/CMakeLists.txt", text: "")
writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bsl)")
conan.create(name: 'libbsl-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)
writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bdl)")
conan.create(name: 'libbdl-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)
writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bal)")
conan.create(name: 'libbal-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)
writeFile(file:"groups/CMakeLists.txt", text: "add_subdirectory(bbl)")
conan.create(name: 'libbbl-dev',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable',
'-pr:h': profile)
}
}
stage('Publish package(s)') {
Boolean dryRun = true
if ((env.BRANCH_NAME ?: '').startsWith('releases/') && debian.isChangelogUpdated()) {
dryRun = false
}
conan.remoteBbConan { remote ->
remote.upload(dryRun: dryRun, pattern: 'libryu-dev')
remote.upload(dryRun: dryRun, pattern: 'libinteldfp-dev')
remote.upload(dryRun: dryRun, pattern: 'libpcre2-dev')
remote.upload(dryRun: dryRun, pattern: 'libbsl-dev')
remote.upload(dryRun: dryRun, pattern: 'libbdl-dev')
remote.upload(dryRun: dryRun, pattern: 'libbal-dev')
remote.upload(dryRun: dryRun, pattern: 'libbbl-dev')
}
}
}
}
finally {
deleteDir()
}
}