-
Notifications
You must be signed in to change notification settings - Fork 71
/
Jenkinsfile
43 lines (37 loc) · 1.24 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
#!groovy
def BN = (BRANCH_NAME == 'master' || BRANCH_NAME.startsWith('releases/')) ? BRANCH_NAME : 'releases/2024-12'
library "knime-pipeline@$BN"
properties([
buildDiscarder(logRotator(numToKeepStr: '5')),
disableConcurrentBuilds()
])
try {
node('maven && large && java17') {
stage('Checkout Sources') {
env.lastStage = env.STAGE_NAME
checkout scm
}
stage('Materialize API Baseline') {
env.lastStage = env.STAGE_NAME
sh '''#!/bin/bash -eux
DEST="/var/cache/jenkins/p2/baselines/$BRANCH_NAME"
TEMP_DEST="$DEST.$$"
mkdir -p "$TEMP_DEST"
cp org.knime.sdk.setup/API-Baseline.target "$TEMP_DEST/"
/opt/p2-director/p2-director -data "$TEMP_DEST" -application org.eclipse.pde.api.tools.apiAnalyzer \\
-project org.knime.sdk.setup -baseline "$TEMP_DEST/API-Baseline.target" -vmargs -Xmx2048m
if [[ -d "$DEST" ]]; then
mv "$DEST" "$DEST.old"
fi
mv "$TEMP_DEST" "$DEST"
rm -rf "$DEST.old"
'''
}
}
} catch (ex) {
currentBuild.result = 'FAILURE'
throw ex
} finally {
notifications.notifyBuild(currentBuild.result);
}
/* vim: set shiftwidth=4 expandtab smarttab: */