-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
73 lines (64 loc) · 2.12 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
64
65
66
67
68
69
70
71
72
73
#!groovy
buildResult = 'NOT_BUILT'
def getStages(rosDistribution, ubuntuVersion) {
return {
node('docker') {
step([$class: 'StashNotifier'])
try {
dir('src/franka_ros') {
checkout scm
}
sh 'rm -rf dist'
dir('dist') {
try {
step([$class: 'CopyArtifact',
filter: "libfranka-*-amd64-${ubuntuVersion}.tar.gz",
fingerprintArtifacts: true,
projectName: "SWDEV/libfranka/${java.net.URLEncoder.encode(env.BRANCH_NAME, "UTF-8")}",
selector: [$class: 'StatusBuildSelector', stable: false]])
} catch (e) {
// Fall back to develop branch.
step([$class: 'CopyArtifact',
filter: "libfranka-*-amd64-${ubuntuVersion}.tar.gz",
fingerprintArtifacts: true,
projectName: "SWDEV/libfranka/develop",
selector: [$class: 'StatusBuildSelector', stable: false]])
}
sh """
tar xfz libfranka-*-amd64-${ubuntuVersion}.tar.gz
ln -sf libfranka-*-amd64 libfranka
"""
}
docker.build("franka_ros-ci-worker:${rosDistribution}",
"-f src/franka_ros/.ci/Dockerfile.${rosDistribution} src/franka_ros/.ci").inside('-e MAKEFLAGS') {
withEnv(["CMAKE_PREFIX_PATH+=${env.WORKSPACE}/dist/libfranka/lib/cmake/Franka",
"ROS_HOME=${env.WORKSPACE}/ros-home"]) {
stage("${rosDistribution}: Build & Lint (Debug)") {
sh """
. /opt/ros/${rosDistribution}/setup.sh
src/franka_ros/.ci/debug.sh
"""
junit 'build-debug/test_results/**/*.xml'
}
}
}
if (buildResult != 'FAILED') {
buildResult = 'SUCCESS'
}
} catch (e) {
buildResult = 'FAILED'
}
}
}
}
node {
step([$class: 'StashNotifier'])
}
parallel(
'kinetic': getStages('kinetic', 'xenial'),
'melodic': getStages('melodic', 'bionic'),
)
node {
currentBuild.result = buildResult
step([$class: 'StashNotifier'])
}