3 {% set test_job_name = 'integration_lttng-tools-32-64_test' %}
8 /* Global options for the pipeline */
11 buildDiscarder(logRotator(numToKeepStr: '5'))
12 disableConcurrentBuilds()
22 string(name: 'LTTNG_TOOLS_GIT_REPO', defaultValue: 'https://github.com/lttng/lttng-tools', description: 'The http git repo to be cloned for the lttng-tools project')
23 string(name: 'LTTNG_TOOLS_GIT_BRANCH', defaultValue: '{{ version }}', description: 'The {{ version }} equivalent branch to be checkout-ed')
28 * i386 artefact cannot be reused for 2 reason.
29 * The first one is that the amd64 and i386 node do not run the same distro and libc version.
30 * The second, is that we need to ensure that the lttng-ust used
31 * is the same for the amd64 and i386 and that for now we do not
32 * have this guarantee since we used 2 different jobs
34 stage('Checkout all sources') {
35 agent { label 'deb12-amd64' }
37 dir("src/userspace-rcu") {
38 checkout([$class: 'GitSCM', branches: [[name: '{{ urcu_version }}']], extensions: [], gitTool: 'Default', userRemoteConfigs: [[url: 'https://github.com/urcu/userspace-rcu']]])
40 dir("src/lttng-modules") {
41 checkout([$class: 'GitSCM', branches: [[name: '{{ version }}']], extensions: [], gitTool: 'Default', userRemoteConfigs: [[url: 'https://github.com/lttng/lttng-modules']]])
43 dir("src/lttng-ust") {
44 checkout([$class: 'GitSCM', branches: [[name: '{{ version }}']], extensions: [], gitTool: 'Default', userRemoteConfigs: [[url: 'https://github.com/lttng/lttng-ust']]])
46 dir("src/lttng-tools") {
47 checkout([$class: 'GitSCM', branches: [[name: "${params.LTTNG_TOOLS_GIT_BRANCH}"]], extensions: [], gitTool: 'Default', userRemoteConfigs: [[url: "${params.LTTNG_TOOLS_GIT_REPO}"]]])
49 stash name: 'dep-sources', includes: 'src/userspace-rcu/**,src/lttng-ust/**'
50 stash name: 'modules-sources', includes: 'src/lttng-modules/**'
51 stash name: 'tools-sources', includes: 'src/lttng-tools/**,'
56 /* Build the i386 and amd64 artifacts in parallel */
58 stage('Build amd64 deps') {
59 agent { label 'deb12-amd64' }
61 stage('Clean workspace') {
69 BASEDIR_64 = "$WORKSPACE/deps-64"
70 BASEDIR_BUILD_64 = "$BASEDIR_64/build"
71 INCLUDE_DIR_64 = "$BASEDIR_BUILD_64/include"
72 CPPFLAGS = "-I$INCLUDE_DIR_64"
73 LDFLAGS = "-L$BASEDIR_BUILD_64/lib"
74 PKG_CONFIG_PATH = "$BASEDIR_BUILD_64/lib/pkgconfig"
75 LD_LIBRARY_PATH ="$BASEDIR_BUILD_64/lib:$LD_LIBRARY_PATH"
76 PATH ="$PATH:$BASEDIR_64/bin"
78 JAVA_HOME="/usr/lib/jvm/default-java"
79 CLASSPATH="/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-1.2.jar"
81 PYTHON_CONFIG="python3-config"
86 unstash name: 'dep-sources'
88 /* Prevent non existent include dir warnings */
89 sh 'mkdir -p $INCLUDE_DIR_64'
91 dir("src/userspace-rcu") {
94 ./configure --prefix="$PREFIX"
96 make install DESTDIR="$WORKSPACE"
100 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
101 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
105 /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
107 cp -rv build/ $BASEDIR_64
111 dir("src/lttng-ust") {
114 ./configure --prefix="$PREFIX" --enable-java-agent-all --enable-jni-interface --enable-python-agent
115 make -j"$(nproc)" V=1
116 make install DESTDIR="$WORKSPACE"
120 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
121 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
125 /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
127 cp -rv build/ $BASEDIR_64
131 stash name: "amd64-deps-lttng-tools", includes: 'deps-64/**'
136 stage('Build i386, including lttng-tools') {
137 agent { label 'deb12-i386' }
139 stage('Clean workspace') {
147 BASEDIR_32 = "$WORKSPACE/deps-32"
148 BASEDIR_BUILD_32 = "$BASEDIR_32/build"
149 INCLUDE_DIR_32 = "$BASEDIR_BUILD_32/include"
150 CPPFLAGS = "-I$INCLUDE_DIR_32"
151 LDFLAGS = "-L$BASEDIR_BUILD_32/lib"
152 PKG_CONFIG_PATH = "$BASEDIR_BUILD_32/lib/pkgconfig"
153 LD_LIBRARY_PATH ="$BASEDIR_BUILD_32/lib"
154 PATH ="$PATH:$BASEDIR_32/bin"
160 unstash name: 'dep-sources'
161 unstash name: 'tools-sources'
163 /* Prevent non existent include dir warnings */
164 sh 'mkdir -p $INCLUDE_DIR_32'
166 dir("src/userspace-rcu") {
169 ./configure --prefix="$PREFIX"
170 make -j"$(nproc)" V=1
171 make install DESTDIR="$WORKSPACE"
175 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
176 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
180 /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
182 cp -rv build/ $BASEDIR_32
187 dir("src/lttng-ust") {
190 ./configure --prefix="$PREFIX"
192 make install DESTDIR="$WORKSPACE"
196 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
197 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
201 /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
203 cp -rv build/ $BASEDIR_32
207 dir("src/lttng-tools") {
210 ./configure --prefix="$PREFIX"
212 make install DESTDIR="$WORKSPACE"
215 find "$WORKSPACE/build/bin" -type f -perm -0500 -exec chrpath --delete {} \\;
216 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
217 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
221 /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
223 cp -rv build/ $BASEDIR_32
227 stash name: "i386-deps-lttng-tools", includes: 'deps-32/**'
229 {% if version != 'stable-2.12' %}
230 /* Save the i386 ld_preloaded libraries for sessiond pausing */
231 stash name: "i386-deps-sessiond-notification-pause-lib", includes: 'src/lttng-tools/tests/regression/tools/notification/.libs/libpause_sessiond.so'
239 stage('Object store') {
240 agent { label 'deb12-amd64' }
242 S3_PREFIX = "s3://jenkins/32-64-bit-integration"
247 unstash name: "modules-sources"
248 unstash name: "tools-sources"
251 unstash name: "i386-deps-lttng-tools"
252 unstash name: "amd64-deps-lttng-tools"
254 dir('tar/testing-overlay/sessiond') {
255 {% if version == 'stable-2.12' %}
257 echo "No testing overlay" > testing_overlay.txt
260 unstash name: "i386-deps-sessiond-notification-pause-lib"
268 tar -cf "$WORKSPACE/$BUILD_TAG.tar.bz2" -I pbzip2 .
273 echo "# Setup endpoint
274 host_base = obj.internal.efficios.com
275 host_bucket = obj.internal.efficios.com
276 bucket_location = us-east-1
281 secret_key = echo123456
283 # Enable S3 v4 signature APIs
284 signature_v2 = False" > "$WORKSPACE/.s3cfg"
285 s3cmd -c "$WORKSPACE/.s3cfg" put "$WORKSPACE/$BUILD_TAG.tar.bz2" "$S3_PREFIX/"
295 build job: '{{ test_job_name }}', parameters: [string(name: 'ARTIFACT_ID', value: "${BUILD_TAG}.tar.bz2"), string(name: 'TEST_TYPE', value: 'canary'), string(name: 'BT_VERSION', value: "{{ babelversion }}")]
298 stage('CLI 32-bit') {
301 build job: '{{ test_job_name }}', parameters: [string(name: 'ARTIFACT_ID', value: "${BUILD_TAG}.tar.bz2"), string(name: 'TEST_TYPE', value: '32bit-cli'), string(name: 'BT_VERSION', value: "{{ babelversion }}")]
304 stage('sessiond 32-bit') {
307 build job: '{{ test_job_name }}', parameters: [string(name: 'ARTIFACT_ID', value: "${BUILD_TAG}.tar.bz2"), string(name: 'TEST_TYPE', value: '32bit-sessiond'), string(name: 'BT_VERSION', value: "{{ babelversion }}")]
310 stage('relayd 32-bit') {
313 build job: '{{ test_job_name }}', parameters: [string(name: 'ARTIFACT_ID', value: "${BUILD_TAG}.tar.bz2"), string(name: 'TEST_TYPE', value: '32bit-relayd'), string(name: 'BT_VERSION', value: "{{ babelversion }}")]