blob: d0456052de57ec5cf4da26d259c4d6e82739a663 [file] [log] [blame]
pipeline {
agent {
docker {
image 'controller.trafficserver.org/ats/ubuntu:20.04'
registryUrl 'https://controller.trafficserver.org/'
args '-v /home/rooter/clang-analyzer:/tmp/clang-analyzer:rw'
label 'docker'
}
}
stages {
stage('Clone') {
steps {
dir('src') {
echo "${sha1}"
checkout([$class: 'GitSCM',
branches: [[name: sha1]],
extensions: [],
userRemoteConfigs: [[url: github_url, refspec: '+refs/pull/*:refs/remotes/origin/pr/*']]])
}
echo 'Finished Cloning'
}
}
stage('Build') {
steps {
echo 'Starting build'
dir('src') {
sh('autoreconf -fiv')
sh('scan-build-10 --keep-cc ./configure --enable-experimental-plugins --with-luajit')
sh('make -j4 -C lib all-local V=1 Q=')
sh '''scan-build-10 --keep-cc -enable-checker alpha.unix.cstring.BufferOverlap -enable-checker \
alpha.core.BoolAssignment -enable-checker alpha.core.CastSize -enable-checker alpha.core.SizeofPtr \
--status-bugs --keep-empty \
-o ${WORKSPACE}/output/${GITHUB_PR_NUMBER} --html-title="clang-analyzer: ${GITHUB_PR_NUMBER}" \
make -j3 V=1 Q='''
//sh('CC="clang" CXX="clang++" CXXFLAGS="-Qunused-arguments" WITH_LIBCPLUSPLUS="yes" ./configure --enable-experimental-plugins')
sh('make -j4')
sh '''
[ ! -f ${WORKSPACE}/output/${GITHUB_PR_NUMBER}/index.html ] && touch ${WORKSPACE}/output/No\\ Errors\\ Reported; exit 0 || exit 1
'''
}
}
}
}
post {
always {
archiveArtifacts artifacts: 'output/**/*', fingerprint: true, allowEmptyArchive: true
}
cleanup {
cleanWs()
}
}
}