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 'bionic-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/**,'
57 stage('Build amd64 deps') {
58 agent { label 'bionic-amd64' }
60 stage('Clean workspace') {
68 BASEDIR_64 = "$WORKSPACE/deps-64"
69 BASEDIR_BUILD_64 = "$BASEDIR_64/build"
70 INCLUDE_DIR_64 = "$BASEDIR_BUILD_64/include"
71 CPPFLAGS = "-I$INCLUDE_DIR_64"
72 LDFLAGS = "-L$BASEDIR_BUILD_64/lib"
73 PKG_CONFIG_PATH = "$BASEDIR_BUILD_64/lib/pkgconfig"
74 LD_LIBRARY_PATH ="$BASEDIR_BUILD_64/lib:$LD_LIBRARY_PATH"
75 PATH ="$PATH:$BASEDIR_64/bin"
77 JAVA_HOME="/usr/lib/jvm/default-java"
78 CLASSPATH="/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-1.2.jar"
80 PYTHON_CONFIG="python3-config"
85 unstash name: 'dep-sources'
87 /* Prevent non existent include dir warnings */
88 sh 'mkdir -p $INCLUDE_DIR_64'
90 dir("src/userspace-rcu") {
93 ./configure --prefix="$PREFIX"
95 make install DESTDIR="$WORKSPACE"
99 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
100 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
104 /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
106 cp -rv build/ $BASEDIR_64
110 dir("src/lttng-ust") {
113 ./configure --prefix="$PREFIX" --enable-java-agent-all --enable-jni-interface --enable-python-agent
114 make -j"$(nproc)" V=1
115 make install DESTDIR="$WORKSPACE"
119 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
120 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
124 /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
126 cp -rv build/ $BASEDIR_64
130 stash name: "amd64-deps-lttng-tools", includes: 'deps-64/**'
135 stage('Build i386, including lttng-tools') {
136 agent { label 'bionic-i386' }
138 stage('Clean workspace') {
146 BASEDIR_32 = "$WORKSPACE/deps-32"
147 BASEDIR_BUILD_32 = "$BASEDIR_32/build"
148 INCLUDE_DIR_32 = "$BASEDIR_BUILD_32/include"
149 CPPFLAGS = "-I$INCLUDE_DIR_32"
150 LDFLAGS = "-L$BASEDIR_BUILD_32/lib"
151 PKG_CONFIG_PATH = "$BASEDIR_BUILD_32/lib/pkgconfig"
152 LD_LIBRARY_PATH ="$BASEDIR_BUILD_32/lib"
153 PATH ="$PATH:$BASEDIR_32/bin"
159 unstash name: 'dep-sources'
160 unstash name: 'tools-sources'
162 /* Prevent non existent include dir warnings */
163 sh 'mkdir -p $INCLUDE_DIR_32'
165 dir("src/userspace-rcu") {
168 ./configure --prefix="$PREFIX"
169 make -j"$(nproc)" V=1
170 make install DESTDIR="$WORKSPACE"
174 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
175 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
179 /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
181 cp -rv build/ $BASEDIR_32
186 dir("src/lttng-ust") {
189 ./configure --prefix="$PREFIX"
191 make install DESTDIR="$WORKSPACE"
195 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
196 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
200 /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
202 cp -rv build/ $BASEDIR_32
206 dir("src/lttng-tools") {
209 ./configure --prefix="$PREFIX"
211 make install DESTDIR="$WORKSPACE"
214 find "$WORKSPACE/build/bin" -type f -perm -0500 -exec chrpath --delete {} \\;
215 find "$WORKSPACE/build/lib" -name "*.so" -exec chrpath --delete {} \\;
216 find "$WORKSPACE/build/lib" -name "*.la" -exec rm -vf {} \\;
220 /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */
222 cp -rv build/ $BASEDIR_32
226 stash name: "i386-deps-lttng-tools", includes: 'deps-32/**'
228 {% if version != 'stable-2.12' %}
229 /* Save the i386 ld_preloaded libraries for sessiond pausing */
230 stash name: "i386-deps-sessiond-notification-pause-lib", includes: 'src/lttng-tools/tests/regression/tools/notification/.libs/libpause_sessiond.so'
238 stage('Object store') {
239 agent { label 'bionic-amd64' }
241 S3_PREFIX = "s3://jenkins/32-64-bit-integration"
246 unstash name: "modules-sources"
247 unstash name: "tools-sources"
250 unstash name: "i386-deps-lttng-tools"
251 unstash name: "amd64-deps-lttng-tools"
253 dir('tar/testing-overlay/sessiond') {
254 {% if version == 'stable-2.12' %}
256 echo "No testing overlay" > testing_overlay.txt
259 unstash name: "i386-deps-sessiond-notification-pause-lib"
267 tar -cf "$WORKSPACE/$BUILD_TAG.tar.bz2" -I pbzip2 .
272 echo "# Setup endpoint
273 host_base = obj.internal.efficios.com
274 host_bucket = obj.internal.efficios.com
275 bucket_location = us-east-1
280 secret_key = echo123456
282 # Enable S3 v4 signature APIs
283 signature_v2 = False" > "$WORKSPACE/.s3cfg"
284 s3cmd -c "$WORKSPACE/.s3cfg" put "$WORKSPACE/$BUILD_TAG.tar.bz2" "$S3_PREFIX/"
294 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 }}")]
297 stage('CLI 32-bit') {
300 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 }}")]
303 stage('sessiond 32-bit') {
306 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 }}")]
309 stage('relayd 32-bit') {
312 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 }}")]