diff --git a/ci/jenkins/bin/autest.sh b/ci/jenkins/bin/autest.sh index 2b8f86565ba..dfe4b8817d3 100755 --- a/ci/jenkins/bin/autest.sh +++ b/ci/jenkins/bin/autest.sh @@ -19,8 +19,10 @@ set +x cd src +sleep 30 -if [ ! -z "$ghprbActualCommit" ]; then +git branch --contains ${ghprbActualCommit} > /dev/null +if [ $? = 0 -a ! -z "$ghprbActualCommit" ]; then git diff ${ghprbActualCommit}^...${ghprbActualCommit} --name-only | egrep -E '^(build|iocore|proxy|tests|include|mgmt|plugins|proxy|src)/' > /dev/null if [ $? = 1 ]; then echo "No relevant files changed, skipping run" diff --git a/ci/jenkins/bin/build.sh b/ci/jenkins/bin/build.sh index 808f12bdc58..93d23282f2c 100755 --- a/ci/jenkins/bin/build.sh +++ b/ci/jenkins/bin/build.sh @@ -28,9 +28,14 @@ CCACHE="--enable-ccache" # When to enable -Werror WERROR="--enable-werror" +# Optional settings +ASAN="" +[ "1" == "$enable_asan" ] && ASAN="--enable-asan" + echo "DEBUG: $DEBUG" echo "CCACHE: $CCACHE" echo "WERROR: $WERROR" +echo "ASAN: $ASAN" # Change to the build area (this is previously setup in extract.sh) cd "${ATS_BUILD_BASEDIR}/build" @@ -46,7 +51,8 @@ set -x --with-user=jenkins \ ${CCACHE} \ ${WERROR} \ - ${DEBUG} + ${DEBUG} \ + ${ASAN} echo echo -n "Main build started at " && date diff --git a/ci/jenkins/bin/cache-tests.sh b/ci/jenkins/bin/cache-tests.sh index 1870ad64412..21771f94f9d 100755 --- a/ci/jenkins/bin/cache-tests.sh +++ b/ci/jenkins/bin/cache-tests.sh @@ -37,9 +37,10 @@ ${ATS_MAKE} -i ${ATS_MAKE_FLAGS} V=1 Q= ${ATS_MAKE} -i install [ -x ${PREFIX}/bin/traffic_server ] || exit 1 +ldd ${PREFIX}/bin/traffic_server -# Get NPM v10 -source /opt/rh/rh-nodejs10/enable +# Get NPM v12 +source /opt/rh/rh-nodejs12/enable # Setup and start ATS with the required remap rule echo "map http://127.0.0.1:8080 http://192.168.3.1:8000" >> $REMAP @@ -49,7 +50,7 @@ ${PREFIX}/bin/trafficserver start set -x cd /home/jenkins/cache-tests -npm run --silent cli --base=http://127.0.0.1:8080/ > /CA/cache-tests/${ATS_BRANCH}.json +npm run --silent cli --base=http://127.0.0.1:8080 > /CA/cache-tests/${ATS_BRANCH}.json cat /CA/cache-tests/${ATS_BRANCH}.json ${PREFIX}/bin/trafficserver stop @@ -61,7 +62,7 @@ if [ "" != "$TWEAK" ]; then echo "CONFIG proxy.config.http.negative_caching_enabled INT 1" >> $RECORDS ${PREFIX}/bin/trafficserver start cd /home/jenkins/cache-tests - npm run --silent cli --base=http://127.0.0.1:8080/ > /CA/cache-tests/${ATS_BRANCH}${TWEAK}.json + npm run --silent cli --base=http://127.0.0.1:8080 > /CA/cache-tests/${ATS_BRANCH}${TWEAK}.json echo "TWEAKED RESULTS" cat /CA/cache-tests/${ATS_BRANCH}${TWEAK}.json diff --git a/ci/jenkins/bin/clang-analyzer.sh b/ci/jenkins/bin/clang-analyzer.sh index c2ebb423833..5704fd83a36 100755 --- a/ci/jenkins/bin/clang-analyzer.sh +++ b/ci/jenkins/bin/clang-analyzer.sh @@ -38,9 +38,6 @@ checkers="-enable-checker alpha.unix.cstring.BufferOverlap \ test -z "${ATS_MAKE}" && ATS_MAKE="make" test ! -z "${WORKSPACE}" && cd "${WORKSPACE}/src" -# Check to see if this is a Github PR build (so not a github branch per-se) -test "${JOB_NAME#*-github}" != "${JOB_NAME}" && ATS_BRANCH="github" - # Where to store the results, special case for the CI output="/tmp" @@ -103,6 +100,3 @@ fi if [ -x "/admin/bin/clean-clang.sh" ]; then /admin/bin/clean-clang.sh fi - -# Exit with the scan-build exit code (thanks to --status-bugs) -exit $status diff --git a/ci/jenkins/bin/environment.sh b/ci/jenkins/bin/environment.sh index 83e54ccead5..b3559ebe810 100755 --- a/ci/jenkins/bin/environment.sh +++ b/ci/jenkins/bin/environment.sh @@ -47,6 +47,11 @@ export TODAY=$(/bin/date +'%m%d%Y') # Extract the current branch (default to master). ToDo: Can we do this better ? ATS_BRANCH=master +# Make sure to leave these, for the HTTP cache tests +test "${JOB_NAME#*-5.3.x}" != "${JOB_NAME}" && ATS_BRANCH=5.3.x +test "${JOB_NAME#*-6.2.x}" != "${JOB_NAME}" && ATS_BRANCH=6.2.x + +# These should be maintained and cleaned up as needed. test "${JOB_NAME#*-7.1.x}" != "${JOB_NAME}" && ATS_BRANCH=7.1.x test "${JOB_NAME#*-8.0.x}" != "${JOB_NAME}" && ATS_BRANCH=8.0.x test "${JOB_NAME#*-8.1.x}" != "${JOB_NAME}" && ATS_BRANCH=8.1.x @@ -59,6 +64,9 @@ test "${JOB_NAME#*-10.1.x}" != "${JOB_NAME}" && ATS_BRANCH=10.1.x test "${JOB_NAME#*-10.2.x}" != "${JOB_NAME}" && ATS_BRANCH=10.2.x test "${JOB_NAME#*-10.3.x}" != "${JOB_NAME}" && ATS_BRANCH=10.3.x +# Special case for the full build of clang analyzer +test "${JOB_NAME}" == "clang-analyzer-full" && ATS_BRANCH=FULL + export ATS_BRANCH echo "Branch is $ATS_BRANCH"