Skip to content

Commit 883523e

Browse files
committed
fix: jenkins pipeline patched to skip build examples stage and build pylibfranka docs only on 20.04
1 parent 02ea35e commit 883523e

File tree

1 file changed

+11
-33
lines changed

1 file changed

+11
-33
lines changed

Jenkinsfile

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* groovylint-disable NestedBlockDepth */
12
def PYTHON_VERSION_BY_UBUNTU = ['20.04': '3.9', '22.04': '3.10', '24.04': '3.12']
23

34
pipeline {
@@ -117,28 +118,6 @@ pipeline {
117118
}
118119
}
119120
}
120-
stage('Build examples (debug)') {
121-
steps {
122-
script {
123-
def distro = env.DISTRO
124-
dir("build-debug-examples.${distro}") {
125-
sh "cmake -DCMAKE_PREFIX_PATH=../install-debug.${distro} ../examples"
126-
sh 'make -j$(nproc)'
127-
}
128-
}
129-
}
130-
}
131-
stage('Build examples (release)') {
132-
steps {
133-
script {
134-
def distro = env.DISTRO
135-
dir("build-release-examples.${distro}") {
136-
sh "cmake -DCMAKE_PREFIX_PATH=../install-release.${distro} ../examples"
137-
sh 'make -j$(nproc)'
138-
}
139-
}
140-
}
141-
}
142121
stage('Build coverage') {
143122
when {
144123
not {
@@ -209,7 +188,7 @@ pipeline {
209188
stage('Test') {
210189
steps {
211190
catchError(buildResult: env.UNSTABLE, stageResult: env.UNSTABLE) {
212-
timeout(time: 300, unit: 'SECONDS') {
191+
timeout(time: 300, unit: 'SECONDS') {
213192
sh '''
214193
# ASLR Fix: Disable ASLR temporarily for ASan compatibility
215194
echo "[Debug Tests] Disabling ASLR for ASan compatibility..."
@@ -257,6 +236,11 @@ pipeline {
257236
}
258237
}
259238
stage('Publish') {
239+
when {
240+
expression {
241+
env.UBUNTU_VERSION == '20.04'
242+
}
243+
}
260244
steps {
261245
script {
262246
def distro = env.DISTRO
@@ -282,11 +266,10 @@ pipeline {
282266
}
283267
}
284268

285-
// Build and publish pylibfranka documentation
269+
// Build and publish pylibfranka documentation (only on Ubuntu 20.04)
286270
catchError(buildResult: env.UNSTABLE, stageResult: env.UNSTABLE) {
287271
script {
288-
def distro = env.DISTRO
289-
withEnv(["DISTRO=${distro}"]) {
272+
withEnv(["DISTRO=${env.DISTRO}"]) {
290273
sh '''
291274
# Install pylibfranka from root (builds against libfranka in build-release.${DISTRO})
292275
export LD_LIBRARY_PATH="${WORKSPACE}/build-release.${DISTRO}:${LD_LIBRARY_PATH:-}"
@@ -315,20 +298,15 @@ pipeline {
315298
# Add libfranka to library path
316299
export LD_LIBRARY_PATH="${WORKSPACE}/build-release.${DISTRO}:${LD_LIBRARY_PATH:-}"
317300
318-
# Build the documentation only on Ubuntu 20.04
319-
if [ "${UBUNTU_VERSION}" = "20.04" ]; then
320-
make html
321-
else
322-
echo "Skipping docs build on ${UBUNTU_VERSION}"
323-
fi
301+
make html
324302
'''
325303

326304
publishHTML([allowMissing: false,
327305
alwaysLinkToLastBuild: false,
328306
keepAll: true,
329307
reportDir: '_build/html',
330308
reportFiles: 'index.html',
331-
reportName: "pylibfranka Documentation (${distro})"])
309+
reportName: "pylibfranka Documentation (${env.DISTRO})"])
332310
}
333311
}
334312
}

0 commit comments

Comments
 (0)