-
Notifications
You must be signed in to change notification settings - Fork 49
/
Jenkinsfile.conan
61 lines (51 loc) · 1.92 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
#!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)') {
conan.profile.detect()
String user = 'test'
String channel = 'unstable'
if (env.CHANGE_ID) {
user = 'pr'
channel = "pr-${env.CHANGE_ID}"
}
conan.create(name: 'bde-tools',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable')
conan.create(name: 'bbs-cmake-module',
user: user,
channel: channel,
'-o:a': '*:dependency_user_channel=test/unstable')
}
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: 'bde-tools')
remote.upload(dryRun: dryRun, pattern: 'bbs-cmake-module')
}
}
}
}
finally {
deleteDir()
}
}