From 2b68721ab3a069c3763abf5746a7a8823d804791 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 1 Sep 2015 13:41:31 -0400 Subject: [PATCH] Initial lttng-ust jobs --- jobs/inc/lttng-ust-versions.yaml.inc | 3 + jobs/lttng-ust.yaml | 225 ++++++++++++++++++++++ scripts/lttng-ust/build.sh | 79 +++++++- scripts/lttng-ust/lttng-ust-master.sh | 108 ----------- scripts/lttng-ust/lttng-ust-stable-2.4.sh | 59 ------ scripts/lttng-ust/lttng-ust-stable-2.5.sh | 59 ------ scripts/lttng-ust/lttng-ust-stable-2.6.sh | 104 ---------- scripts/lttng-ust/pylint.sh | 1 + scripts/lttng-ust/scan-build.sh | 66 +++++++ 9 files changed, 368 insertions(+), 336 deletions(-) create mode 100644 jobs/inc/lttng-ust-versions.yaml.inc create mode 100644 jobs/lttng-ust.yaml delete mode 100755 scripts/lttng-ust/lttng-ust-master.sh delete mode 100755 scripts/lttng-ust/lttng-ust-stable-2.4.sh delete mode 100755 scripts/lttng-ust/lttng-ust-stable-2.5.sh delete mode 100755 scripts/lttng-ust/lttng-ust-stable-2.6.sh create mode 100644 scripts/lttng-ust/pylint.sh create mode 100755 scripts/lttng-ust/scan-build.sh diff --git a/jobs/inc/lttng-ust-versions.yaml.inc b/jobs/inc/lttng-ust-versions.yaml.inc new file mode 100644 index 0000000..376c9f3 --- /dev/null +++ b/jobs/inc/lttng-ust-versions.yaml.inc @@ -0,0 +1,3 @@ +- stable-2.6 +- stable-2.7 +- master diff --git a/jobs/lttng-ust.yaml b/jobs/lttng-ust.yaml new file mode 100644 index 0000000..33ad79f --- /dev/null +++ b/jobs/lttng-ust.yaml @@ -0,0 +1,225 @@ +- defaults: + name: lttng-ust + description: | + LTTng-UST, the Linux Trace Toolkit Next Generation Userspace Tracer, is a + port of the low-overhead tracing capabilities of the LTTng kernel tracer + to user-space. The library "liblttng-ust" enables tracing of + applications and libraries. + +

Job is managed by Jenkins Job Builder.

+ + project-type: freestyle + + logrotate: + daysToKeep: -1 + numToKeep: 2 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + + wrappers: + - workspace-cleanup + - timestamps + - ansicolor + + scm: + - git: + url: https://github.com/lttng/lttng-ust.git + browser: githubweb + browser-url: https://github.com/lttng/lttng-ust.git + branches: + - origin/{version} + + triggers: + - pollscm: + cron: "@hourly" + + properties: + - github: + url: https://github.com/lttng/lttng-ust/ + + +## Templates +- job-template: + name: lttng-ust_{version}_{buildtype} + defaults: lttng-ust + + project-type: matrix + node: 'x86-32 || x86-64' # Applies only to matrix flyweight task + execution-strategy: + combination-filter: | + (build=="std") || (liburcu_version=="master") + axes: + - axis: + type: slave + name: arch + values: '{obj:arch}' + - axis: + type: user-defined + name: conf + values: + - std + - java-agent + - python-agent + - axis: + type: user-defined + name: liburcu_version + values: + !include jobs/inc/liburcu-versions.yaml.inc + - axis: + type: user-defined + name: build + values: '{obj:build}' + + builders: + - copyartifact: + project: liburcu_${{liburcu_version}}_{buildtype}/arch=$arch,conf=std,build=std + which-build: last-successful + stable: true + filter: 'build/**' + target: 'deps/liburcu' + do-not-fingerprint: true + - shell: + !include-raw-escape scripts/lttng-ust/build.sh + + # TODO: Scan for open tasks + publishers: + - tap: + results: 'tap/**/*.tap' + failed-tests-mark-build-as-failure: true + - warnings: + console-log-parsers: + - 'GNU Make + GNU C Compiler (gcc)' + total-thresholds: + failed: + total-all: 0 + total-high: 0 + total-normal: 0 + total-low: 0 + - archive: + artifacts: 'build/**' + allow-empty: false + - workspace-cleanup + + +- job-template: + name: lttng-ust_{version}_cppcheck + defaults: lttng-ust + + triggers: + - pollscm: + cron: "@daily" + + builders: + - shell: | + rm -f lttng-ust-cppcheck.xml + cppcheck --enable=all --xml --xml-version=2 $WORKSPACE 2> lttng-ust-cppcheck.xml + + publishers: + - archive: + artifacts: 'lttng-ust-cppcheck.xml' + allow-empty: false + - cppcheck: + pattern: 'lttng-ust-cppcheck.xml' + - email: + recipients: 'ci-notification@lists.lttng.org' + notify-every-unstable-build: true + send-to-individuals: false + +- job-template: + name: lttng-ust_{version}_scan-build + defaults: lttng-ust + node: 'x86-64' + + triggers: + - pollscm: + cron: "@daily" + + builders: + - shell: + !include-raw-escape scripts/lttng-ust/scan-build.sh + + publishers: + - html-publisher: + name: 'HTML Report' + dir: 'scan-build-archive/' + files: 'index.html' + +# TODO: lttng-ust_{version}_coverity +#- job-template: +# name: lttng-ust_{version}_coverity +# defaults: lttng-ust +# node: 'x86-64' +# +# triggers: +# - pollscm: +# cron: "@daily" +# +# builders: +# - shell: +# !include-raw-escape scripts/lttng-ust/coverity.sh +# +# publishers: +# - html-publisher: +# name: 'HTML Report' +# dir: 'scan-build-archive/' +# files: 'index.html' + +- job-template: + name: lttng-ust_{version}_pylint + defaults: lttng-ust + node: 'x86-64' + + scm: [] + + triggers: + - pollscm: + cron: "@daily" + + builders: + - copyartifact: + project: lttng-ust-{version}/arch=x86-64,build=std,conf=python-agent + which-build: last-successful + stable: true + filter: 'build/**' + target: 'deps/lttng-ust' + do-not-fingerprint: true + - shell: + !include-raw-escape scripts/lttng-ust/pylint.sh + + publishers: + - archive: + artifacts: 'pep8.out,pylint.out' + - violations: + pep8: + pattern: pep8.out + min: 10 + max: 999 + unstable: 999 + pylint: + pattern: pylint.out + min: 10 + max: 999 + unstable: 999 + - email: + recipients: 'ci-notification@lists.lttng.org' + notify-every-unstable-build: true + send-to-individuals: false + + +## Project +- project: + name: lttng-ust + version: + !include jobs/inc/lttng-ust-versions.yaml.inc + jobs: + - 'lttng-ust_{version}_{buildtype}': + buildtype: build + arch: !!python/tuple [x86-32, x86-64] + build: !!python/tuple [std, oot, dist] + - 'lttng-ust_{version}_{buildtype}': + buildtype: portbuild + arch: !!python/tuple [armhf, powerpc] + build: !!python/tuple [std] + - 'lttng-ust_{version}_cppcheck' + - 'lttng-ust_{version}_scan-build' + diff --git a/scripts/lttng-ust/build.sh b/scripts/lttng-ust/build.sh index 3d52a49..4062e3e 100755 --- a/scripts/lttng-ust/build.sh +++ b/scripts/lttng-ust/build.sh @@ -1,14 +1,32 @@ +#!/bin/sh -exu +# +# Copyright (C) 2015 - Jonathan Rajotte-Julien +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + # Create build directory rm -rf $WORKSPACE/build mkdir -p $WORKSPACE/build # liburcu -URCU_INCS="$WORKSPACE/dependencies/liburcu/build/include/" -URCU_LIBS="$WORKSPACE/dependencies/liburcu/build/lib/" +URCU_INCS="$WORKSPACE/deps/liburcu/build/include/" +URCU_LIBS="$WORKSPACE/deps/liburcu/build/lib/" export CPPFLAGS="-I$URCU_INCS" export LDFLAGS="-L$URCU_LIBS" -export LD_LIBRARY_PATH="$URCU_LIBS:$LD_LIBRARY_PATH" +export LD_LIBRARY_PATH="$URCU_LIBS:${LD_LIBRARY_PATH:-}" PREFIX="$WORKSPACE/build" @@ -27,13 +45,57 @@ java-agent) export CLASSPATH="/usr/share/java/log4j-1.2.jar" CONF_OPTS="--enable-java-agent-all" ;; +python-agent) + echo "Python agent build" + CONF_OPTS="--enable-python-agent" + ;; *) echo "Standard build" CONF_OPTS="" ;; esac -./configure --prefix=$PREFIX $CONF_OPTS +# Build type +# oot : out-of-tree build +# dist: build via make dist +# * : normal tree build +# +# Make sure to move to the build_path and configure +# before continuing + +BUILD_PATH=$WORKSPACE +case "$build" in + oot) + echo "Out of tree build" + BUILD_PATH=$WORKSPACE/oot + mkdir -p $BUILD_PATH + cd $BUILD_PATH + $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS + ;; + dist) + echo "Distribution out of tree build" + BUILD_PATH=`mktemp -d` + + # Initial configure and generate tarball + ./configure + make dist + + mkdir -p $BUILD_PATH + cp *.tar.* $BUILD_PATH/ + cd $BUILD_PATH + + # Ignore level 1 of tar + tar xvf *.tar.* --strip 1 + + $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS + ;; + *) + BUILD_PATH=$WORKSPACE + echo "Standard tree build" + $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS + ;; +esac + make V=1 make install @@ -41,9 +103,9 @@ make install rm -rf $WORKSPACE/tap mkdir -p $WORKSPACE/tap/unit -cd $WORKSPACE/tests +cd $BUILD_PATH/tests -prove --merge --exec '' - < $WORKSPACE/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true +prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true # TAP plugin is having a hard time with .yml files. rm -f $WORKSPACE/tap/unit/meta.yml @@ -57,3 +119,8 @@ make clean # Cleanup rpath and libtool .la files find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; + +# Clean temp dir for dist build +if [ $build = "dist" ]; then + rm -rf $BUILD_PATH +fi diff --git a/scripts/lttng-ust/lttng-ust-master.sh b/scripts/lttng-ust/lttng-ust-master.sh deleted file mode 100755 index f792c17..0000000 --- a/scripts/lttng-ust/lttng-ust-master.sh +++ /dev/null @@ -1,108 +0,0 @@ -# Create build directory -rm -rf $WORKSPACE/build -mkdir -p $WORKSPACE/build - -# liburcu -URCU_INCS="$WORKSPACE/dependencies/liburcu/build/include/" -URCU_LIBS="$WORKSPACE/dependencies/liburcu/build/lib/" - -export CPPFLAGS="-I$URCU_INCS" -export LDFLAGS="-L$URCU_LIBS" -export LD_LIBRARY_PATH="$URCU_LIBS:$LD_LIBRARY_PATH" - -PREFIX="$WORKSPACE/build" - -./bootstrap - -CONF_OPTS="" - -case "$conf" in -# Unsupported! liblttng-ust can't pull in it's static (.a) dependencies. -#static) -# echo "Static build" -# CONF_OPTS="--enable-static --disable-shared" -# ;; -java-agent) - echo "Java agent build" - export CLASSPATH="/usr/share/java/log4j-1.2.jar" - CONF_OPTS="--enable-java-agent-all" - ;; -python-agent) - echo "Python agent build" - CONF_OPTS="--enable-python-agent" - ;; -*) - echo "Standard build" - CONF_OPTS="" - ;; -esac - -# Build type -# oot : out-of-tree build -# dist: build via make dist -# * : normal tree build -# -# Make sure to move to the build_path and configure -# before continuing - -BUILD_PATH=$WORKSPACE -case "$build" in - oot) - echo "Out of tree build" - BUILD_PATH=$WORKSPACE/oot - mkdir -p $BUILD_PATH - cd $BUILD_PATH - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS - ;; - dist) - echo "Distribution out of tree build" - BUILD_PATH=`mktemp -d` - - # Initial configure and generate tarball - ./configure - make dist - - mkdir -p $BUILD_PATH - cp *.tar.* $BUILD_PATH/ - cd $BUILD_PATH - - # Ignore level 1 of tar - tar xvf *.tar.* --strip 1 - - $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS - ;; - *) - BUILD_PATH=$WORKSPACE - echo "Standard tree build" - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS - ;; -esac - -make V=1 -make install - -# Run tests -rm -rf $WORKSPACE/tap -mkdir -p $WORKSPACE/tap/unit - -cd $BUILD_PATH/tests - -prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true - -# TAP plugin is having a hard time with .yml files. -rm -f $WORKSPACE/tap/unit/meta.yml - -# And also with files without extension, so rename all result to *.tap -find $WORKSPACE/tap/unit/ -type f -exec mv {} {}.tap \; - -# Cleanup -make clean - -# Cleanup rpath and libtool .la files -find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; -find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; - -# Clean temp dir for dist build -if [ $build = "dist" ]; then - rm -rf $BUILD_PATH -fi diff --git a/scripts/lttng-ust/lttng-ust-stable-2.4.sh b/scripts/lttng-ust/lttng-ust-stable-2.4.sh deleted file mode 100755 index 3d52a49..0000000 --- a/scripts/lttng-ust/lttng-ust-stable-2.4.sh +++ /dev/null @@ -1,59 +0,0 @@ -# Create build directory -rm -rf $WORKSPACE/build -mkdir -p $WORKSPACE/build - -# liburcu -URCU_INCS="$WORKSPACE/dependencies/liburcu/build/include/" -URCU_LIBS="$WORKSPACE/dependencies/liburcu/build/lib/" - -export CPPFLAGS="-I$URCU_INCS" -export LDFLAGS="-L$URCU_LIBS" -export LD_LIBRARY_PATH="$URCU_LIBS:$LD_LIBRARY_PATH" - -PREFIX="$WORKSPACE/build" - -./bootstrap - -CONF_OPTS="" - -case "$conf" in -# Unsupported! liblttng-ust can't pull in it's static (.a) dependencies. -#static) -# echo "Static build" -# CONF_OPTS="--enable-static --disable-shared" -# ;; -java-agent) - echo "Java agent build" - export CLASSPATH="/usr/share/java/log4j-1.2.jar" - CONF_OPTS="--enable-java-agent-all" - ;; -*) - echo "Standard build" - CONF_OPTS="" - ;; -esac - -./configure --prefix=$PREFIX $CONF_OPTS -make V=1 -make install - -# Run tests -rm -rf $WORKSPACE/tap -mkdir -p $WORKSPACE/tap/unit - -cd $WORKSPACE/tests - -prove --merge --exec '' - < $WORKSPACE/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true - -# TAP plugin is having a hard time with .yml files. -rm -f $WORKSPACE/tap/unit/meta.yml - -# And also with files without extension, so rename all result to *.tap -find $WORKSPACE/tap/unit/ -type f -exec mv {} {}.tap \; - -# Cleanup -make clean - -# Cleanup rpath and libtool .la files -find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; -find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; diff --git a/scripts/lttng-ust/lttng-ust-stable-2.5.sh b/scripts/lttng-ust/lttng-ust-stable-2.5.sh deleted file mode 100755 index 3d52a49..0000000 --- a/scripts/lttng-ust/lttng-ust-stable-2.5.sh +++ /dev/null @@ -1,59 +0,0 @@ -# Create build directory -rm -rf $WORKSPACE/build -mkdir -p $WORKSPACE/build - -# liburcu -URCU_INCS="$WORKSPACE/dependencies/liburcu/build/include/" -URCU_LIBS="$WORKSPACE/dependencies/liburcu/build/lib/" - -export CPPFLAGS="-I$URCU_INCS" -export LDFLAGS="-L$URCU_LIBS" -export LD_LIBRARY_PATH="$URCU_LIBS:$LD_LIBRARY_PATH" - -PREFIX="$WORKSPACE/build" - -./bootstrap - -CONF_OPTS="" - -case "$conf" in -# Unsupported! liblttng-ust can't pull in it's static (.a) dependencies. -#static) -# echo "Static build" -# CONF_OPTS="--enable-static --disable-shared" -# ;; -java-agent) - echo "Java agent build" - export CLASSPATH="/usr/share/java/log4j-1.2.jar" - CONF_OPTS="--enable-java-agent-all" - ;; -*) - echo "Standard build" - CONF_OPTS="" - ;; -esac - -./configure --prefix=$PREFIX $CONF_OPTS -make V=1 -make install - -# Run tests -rm -rf $WORKSPACE/tap -mkdir -p $WORKSPACE/tap/unit - -cd $WORKSPACE/tests - -prove --merge --exec '' - < $WORKSPACE/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true - -# TAP plugin is having a hard time with .yml files. -rm -f $WORKSPACE/tap/unit/meta.yml - -# And also with files without extension, so rename all result to *.tap -find $WORKSPACE/tap/unit/ -type f -exec mv {} {}.tap \; - -# Cleanup -make clean - -# Cleanup rpath and libtool .la files -find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; -find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; diff --git a/scripts/lttng-ust/lttng-ust-stable-2.6.sh b/scripts/lttng-ust/lttng-ust-stable-2.6.sh deleted file mode 100755 index fb1fec4..0000000 --- a/scripts/lttng-ust/lttng-ust-stable-2.6.sh +++ /dev/null @@ -1,104 +0,0 @@ -# Create build directory -rm -rf $WORKSPACE/build -mkdir -p $WORKSPACE/build - -# liburcu -URCU_INCS="$WORKSPACE/dependencies/liburcu/build/include/" -URCU_LIBS="$WORKSPACE/dependencies/liburcu/build/lib/" - -export CPPFLAGS="-I$URCU_INCS" -export LDFLAGS="-L$URCU_LIBS" -export LD_LIBRARY_PATH="$URCU_LIBS:$LD_LIBRARY_PATH" - -PREFIX="$WORKSPACE/build" - -./bootstrap - -CONF_OPTS="" - -case "$conf" in -# Unsupported! liblttng-ust can't pull in it's static (.a) dependencies. -#static) -# echo "Static build" -# CONF_OPTS="--enable-static --disable-shared" -# ;; -java-agent) - echo "Java agent build" - export CLASSPATH="/usr/share/java/log4j-1.2.jar" - CONF_OPTS="--enable-java-agent-all" - ;; -*) - echo "Standard build" - CONF_OPTS="" - ;; -esac - -# Build type -# oot : out-of-tree build -# dist: build via make dist -# * : normal tree build -# -# Make sure to move to the build_path and configure -# before continuing - -BUILD_PATH=$WORKSPACE -case "$build" in - oot) - echo "Out of tree build" - BUILD_PATH=$WORKSPACE/oot - mkdir -p $BUILD_PATH - cd $BUILD_PATH - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS - ;; - dist) - echo "Distribution out of tree build" - BUILD_PATH=`mktemp -d` - - # Initial configure and generate tarball - ./configure - make dist - - mkdir -p $BUILD_PATH - cp *.tar.* $BUILD_PATH/ - cd $BUILD_PATH - - # Ignore level 1 of tar - tar xvf *.tar.* --strip 1 - - $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS - ;; - *) - BUILD_PATH=$WORKSPACE - echo "Standard tree build" - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS - ;; -esac - -make V=1 -make install - -# Run tests -rm -rf $WORKSPACE/tap -mkdir -p $WORKSPACE/tap/unit - -cd $BUILD_PATH/tests - -prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true - -# TAP plugin is having a hard time with .yml files. -rm -f $WORKSPACE/tap/unit/meta.yml - -# And also with files without extension, so rename all result to *.tap -find $WORKSPACE/tap/unit/ -type f -exec mv {} {}.tap \; - -# Cleanup -make clean - -# Cleanup rpath and libtool .la files -find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; -find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; - -# Clean temp dir for dist build -if [ $build = "dist" ]; then - rm -rf $BUILD_PATH -fi diff --git a/scripts/lttng-ust/pylint.sh b/scripts/lttng-ust/pylint.sh new file mode 100644 index 0000000..4640904 --- /dev/null +++ b/scripts/lttng-ust/pylint.sh @@ -0,0 +1 @@ +# TODO diff --git a/scripts/lttng-ust/scan-build.sh b/scripts/lttng-ust/scan-build.sh new file mode 100755 index 0000000..e67305a --- /dev/null +++ b/scripts/lttng-ust/scan-build.sh @@ -0,0 +1,66 @@ +#!/bin/sh -exu +# +# Copyright (C) 2015 - Jonathan Rajotte-Julien +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# do not exit immediately if any command fails +set +e + +# temp directory to store the scan-build report +SCAN_BUILD_TMPDIR=$( mktemp -d /tmp/scan-build.XXXXXX ) + +# directory to use for archiving the scan-build report +SCAN_BUILD_ARCHIVE="${WORKSPACE}/scan-build-archive" + +# Create build directory +rm -rf $WORKSPACE/build +mkdir -p $WORKSPACE/build + +export CFLAGS="-O0 -g -DDEBUG" +PREFIX="$WORKSPACE/build" + +./bootstrap +./configure --prefix=$PREFIX +make clean +# generate the scan-build report +scan-build -k -o ${SCAN_BUILD_TMPDIR} make + +# get the directory name of the report created by scan-build +SCAN_BUILD_REPORT=$( find ${SCAN_BUILD_TMPDIR} -maxdepth 1 -not -empty -not -name `basename ${SCAN_BUILD_TMPDIR}` ) +rc=$? + +if [ -z "${SCAN_BUILD_REPORT}" ]; then + echo ">>> No new bugs identified." + echo ">>> No scan-build report has been generated" +else + echo ">>> New scan-build report generated in ${SCAN_BUILD_REPORT}" + + if [ ! -d "${SCAN_BUILD_ARCHIVE}" ]; then + echo ">>> Creating scan-build archive directory" + install -d -o jenkins -g jenkins -m 0755 "${SCAN_BUILD_ARCHIVE}" + else + echo ">>> Removing any previous scan-build reports from ${SCAN_BUILD_ARCHIVE}" + rm -f ${SCAN_BUILD_ARCHIVE}/* + fi + + echo ">>> Archiving scan-build report to ${SCAN_BUILD_ARCHIVE}" + mv ${SCAN_BUILD_REPORT}/* ${SCAN_BUILD_ARCHIVE}/ + + echo ">>> Removing any temporary files and directories" + rm -rf "${SCAN_BUILD_TMPDIR}" +fi + +exit ${rc} -- 2.34.1