You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2021/06/25 13:59:31 UTC
[trafficserver-ci] branch main updated: add initial jenkins scripts
This is an automated email from the ASF dual-hosted git repository.
bnolsen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git
The following commit(s) were added to refs/heads/main by this push:
new 71113be add initial jenkins scripts
new ca36fcf Merge pull request #15 from traeak/branch_scripts
71113be is described below
commit 71113be9efb0a4e0668ce0ba5bd38edc3596e68d
Author: Brian Olsen <bn...@gmail.com>
AuthorDate: Fri Jun 25 06:58:22 2021 -0700
add initial jenkins scripts
---
jenkins/bin/autest.sh | 158 ++++++++++++++++++++++++++++++++++++++++++
jenkins/bin/build.sh | 70 +++++++++++++++++++
jenkins/bin/cache-tests.sh | 73 +++++++++++++++++++
jenkins/bin/clang-analyzer.sh | 126 +++++++++++++++++++++++++++++++++
jenkins/bin/clang-format.sh | 58 ++++++++++++++++
jenkins/bin/cleanup.sh | 26 +++++++
jenkins/bin/coverity.sh | 41 +++++++++++
jenkins/bin/docs.sh | 53 ++++++++++++++
jenkins/bin/environment.sh | 136 ++++++++++++++++++++++++++++++++++++
jenkins/bin/extract.sh | 33 +++++++++
jenkins/bin/gh-mirror.sh | 86 +++++++++++++++++++++++
jenkins/bin/github.sh | 81 ++++++++++++++++++++++
jenkins/bin/in_tree.sh | 34 +++++++++
jenkins/bin/out_of_tree.sh | 35 ++++++++++
jenkins/bin/rat.sh | 38 ++++++++++
jenkins/bin/regression.sh | 34 +++++++++
jenkins/bin/snapshot.sh | 38 ++++++++++
17 files changed, 1120 insertions(+)
diff --git a/jenkins/bin/autest.sh b/jenkins/bin/autest.sh
new file mode 100755
index 0000000..7ec18ee
--- /dev/null
+++ b/jenkins/bin/autest.sh
@@ -0,0 +1,158 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set +x
+
+cd src
+sleep 30
+
+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"
+ exit 0
+ fi
+fi
+
+# Set default encoding UTF-8 for AuTest
+export LC_ALL=en_US.UTF-8
+export LANG=en_US.UTF-8
+echo "LC_ALL: $LC_ALL"
+echo "LANG: $LANG"
+
+# Check python version & encoding
+python3 --version
+echo "python default encoding: "
+python3 -c "import sys; print(sys.getdefaultencoding())"
+
+INSTALL="${ATS_BUILD_BASEDIR}/install"
+URL="https://ci.trafficserver.apache.org/autest"
+JOB_ID=${ghprbPullId:-${ATS_BRANCH:-master}}
+AUSB="ausb-${JOB_ID}.${BUILD_NUMBER}"
+SANDBOX="/var/tmp/${AUSB}"
+PROXY_VERIFIER_VERSIONS="/home/jenkins/proxy-verifier"
+PROXY_VERIFIER_VERSION_FILE="tests/proxy-verifier-version.txt"
+PROXY_VERIFIER_PREPARE="tests/prepare_proxy_verifier.sh"
+
+# Optional settings
+CCACHE=""
+WERROR=""
+DEBUG=""
+WCCP=""
+LUAJIT=""
+QUIC=""
+CURL=""
+AUTEST_DEBUG=""
+AUTEST_VERBOSE=""
+PROXY_VERIFIER_ARGUMENT=""
+
+[ "1" == "$enable_ccache" ] && CCACHE="--enable-ccache"
+[ "1" == "$enable_werror" ] && WERROR="--enable-werror"
+[ "1" == "$enable_debug" ] && DEBUG="--enable-debug"
+[ "1" == "$enable_wccp" ] && WCCP="--enable-wccp"
+[ "1" == "$enable_luajit" ] && LUAJIT="--enable-luajit"
+[ "1" == "$enable_quic" ] && QUIC="--with-openssl=/opt/openssl-quic"
+[ "1" == "$disable_curl" ] && CURL="--disable-curl"
+[ "1" == "$enable_autest_debug" ] && AUTEST_DEBUG="--debug"
+[ "1" == "$enable_autest_verbose" ] && AUTEST_VERBOSE="--verbose"
+
+mkdir -p ${INSTALL}
+
+# The tests directory must exist (i.e. for older branches we don't run this)
+[ -d tests ] || exit 0
+
+echo "CCACHE: $CCACHE"
+echo "WERROR: $WERROR"
+echo "DEBUG: $DEBUG"
+echo "WCCP: $WCCP"
+echo "LUAJIT: $LUAJIT"
+echo "QUIC: $QUIC"
+echo "CURL: $CURL"
+
+# Restore verbose shell output
+set -x
+
+# Configure
+autoreconf -if
+./configure \
+ --prefix="${INSTALL}" \
+ --with-user=jenkins \
+ --enable-experimental-plugins \
+ --enable-example-plugins \
+ ${CCACHE} \
+ ${WCCP} \
+ ${LUAJIT} \
+ ${QUIC} \
+ ${WERROR} \
+ ${DEBUG} \
+ ${CURL}
+
+# Build and run regressions
+${ATS_MAKE} -j4 && ${ATS_MAKE} install
+[ -x ${INSTALL}/bin/traffic_server ] || exit -1
+
+# Now run autest
+set +x
+echo -n "=======>>>> Started on "
+date
+
+AUTEST="/usr/bin/autest"
+[ ! -x ${AUTEST} ] && AUTEST="/usr/local/bin/autest"
+set -x
+
+pv_version=""
+if [ -f "${PROXY_VERIFIER_VERSION_FILE}" ]; then
+ pv_version=`cat "${PROXY_VERIFIER_VERSION_FILE}"`
+elif [ -f "${PROXY_VERIFIER_PREPARE}" ]; then
+ pv_version=`awk -F'"' '/^pv_version/ {print $2}' "${PROXY_VERIFIER_PREPARE}"`
+fi
+if [ "x${pv_version}" != "x" ]; then
+ PROXY_VERIFIER_BIN="${PROXY_VERIFIER_VERSIONS}/${pv_version}/bin"
+ PROXY_VERIFIER_ARGUMENT="--proxy-verifier-bin ${PROXY_VERIFIER_BIN}"
+fi
+
+${AUTEST} \
+ -D ./tests/gold_tests \
+ --sandbox "$SANDBOX" \
+ --ats-bin "${INSTALL}/bin" \
+ $PROXY_VERIFIER_ARGUMENT \
+ $AUTEST_DEBUG \
+ $AUTEST_VERBOSE
+status=$?
+
+set +x
+echo -n "=======<<<< Finished on "
+date
+
+# Cleanup
+cd /var/tmp # To be safer
+chmod -R a+r ${SANDBOX}
+if [ "0" != "$status" ]; then
+ if [ -d "$SANDBOX" ]; then
+ find "$SANDBOX" -name \*.db -exec rm {} \;
+ mv "$SANDBOX" /CA/autest
+ echo "Sandbox is available at ${URL}/${AUSB}/"
+ fi
+ exit -1
+else
+ [ -d "$SANDBOX" ] && rmdir "$SANDBOX"
+ exit 0
+fi
+
+set -x
diff --git a/jenkins/bin/build.sh b/jenkins/bin/build.sh
new file mode 100755
index 0000000..69e2f24
--- /dev/null
+++ b/jenkins/bin/build.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set +x
+
+printenv
+
+# Check if it's a debug or release build
+DEBUG=""
+test "${JOB_NAME#*type=debug}" != "${JOB_NAME}" && DEBUG="--enable-debug"
+[ "${TYPE}" == "debug" ] && DEBUG="--enable-debug"
+HARDENING=""
+[ "${TYPE}" == "hardening" ] && HARDENING="--enable-hardening"
+
+# When to turn on ccache, disabled for some builds
+CCACHE="--enable-ccache"
+
+# When to enable -Werror
+#WERROR="--enable-werror"
+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"
+mkdir -p install
+#mkdir -p BUILDS && cd BUILDS
+
+# Restore verbose shell output
+set -x
+
+#../configure \
+./configure \
+ --prefix="${ATS_BUILD_BASEDIR}/install" \
+ --enable-experimental-plugins \
+ --enable-example-plugins \
+ --with-user=jenkins \
+ ${CCACHE} \
+ ${WERROR} \
+ ${DEBUG} \
+ ${HARDENING} \
+ ${ASAN}
+
+echo
+echo -n "Main build and install started at " && date
+${ATS_MAKE} ${ATS_MAKE_FLAGS} V=1 Q= || exit 1
+${ATS_MAKE} ${ATS_MAKE_FLAGS} install
+echo -n "Main build and install at " && date
diff --git a/jenkins/bin/cache-tests.sh b/jenkins/bin/cache-tests.sh
new file mode 100755
index 0000000..21771f9
--- /dev/null
+++ b/jenkins/bin/cache-tests.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+PREFIX="${ATS_BUILD_BASEDIR}/install"
+REMAP="${PREFIX}/etc/trafficserver/remap.config"
+RECORDS="${PREFIX}/etc/trafficserver/records.config"
+
+TWEAK=""
+[ "1" == "$enable_tweak" ] && TWEAK="-tweak"
+
+# Change to the build area (this is previously setup in extract.sh)
+set +x
+cd "${ATS_BUILD_BASEDIR}/build"
+
+./configure \
+ --prefix=${PREFIX} \
+ --with-user=jenkins \
+ --enable-ccache
+
+# Not great, but these can fail on the "docs' builds for older versions, sigh
+${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 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
+
+${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
+cat /CA/cache-tests/${ATS_BRANCH}.json
+
+${PREFIX}/bin/trafficserver stop
+
+
+# Now run it again, maybe, with the tweaked configs
+if [ "" != "$TWEAK" ]; then
+# echo "CONFIG proxy.config.http.cache.required_headers INT 1" >> $RECORDS
+ 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
+ echo "TWEAKED RESULTS"
+ cat /CA/cache-tests/${ATS_BRANCH}${TWEAK}.json
+
+ ${PREFIX}/bin/trafficserver stop
+fi
+
+# We should check the .json file here, but not yet
+exit 0
diff --git a/jenkins/bin/clang-analyzer.sh b/jenkins/bin/clang-analyzer.sh
new file mode 100755
index 0000000..9f96012
--- /dev/null
+++ b/jenkins/bin/clang-analyzer.sh
@@ -0,0 +1,126 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+test -z "${WORKSPACE}" && WORKSPACE=".."
+
+mkdir -p ${WORKSPACE}/output/
+head -1 README
+autoreconf -fiv
+
+scan-build-10 --keep-cc \
+ ./configure --enable-experimental-plugins --with-luajit
+
+make -j4 -C lib all-local V=1 Q=
+
+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/ \
+ --html-title="clang-analyzer: ${GITHUB_BRANCH}" \
+make -j4 V=1 Q=
+
+make -j4
+[ ! -f ${WORKSPACE}/output/index.html ] && touch "${WORKSPACE}/output/No Errors Reported"; exit 0 || exit 1
+
+# Where are our LLVM tools?
+NPROCS=${NPROCS:-$(getconf _NPROCESSORS_ONLN)}
+
+# Options
+options="--status-bugs --keep-cc"
+configure="--enable-experimental-plugins --with-luajit"
+
+# Additional checkers
+# Phil says these are all FP's: -enable-checker alpha.security.ArrayBoundV2
+# -enable-checker alpha.unix.PthreadLock\
+checkers="-enable-checker alpha.unix.cstring.BufferOverlap \
+ -enable-checker alpha.core.BoolAssignment \
+ -enable-checker alpha.core.CastSize \
+ -enable-checker alpha.core.SizeofPtr"
+
+# These shenanigans are here to allow it to run both manually, and via Jenkins
+test -z "${ATS_MAKE}" && ATS_MAKE="make"
+test ! -z "${WORKSPACE}" && cd "${WORKSPACE}/src"
+
+# Where to store the results, special case for the CI
+output="/tmp"
+test ! -z "${WORKSPACE}" && output="${WORKSPACE}/output"
+
+# Find a Jenkins output tree if possible
+#if [ "${JOB_NAME#*-github}" != "${JOB_NAME}" ]; then
+ # This is a Github PR build, override the branch name accordingly
+# ATS_BRANCH="github"
+# if [ -w "${OUTPUT_BASE}/${ATS_BRANCH}" ]; then
+# output="${OUTPUT_BASE}/${ATS_BRANCH}/${ghprbPullId}"
+# [ ! -d "${output}" ] && mkdir "${output}"
+# fi
+# github_pr=" PR #${ghprbPullId}"
+# results_url="https://ci.trafficserver.apache.org/clang-analyzer/${ATS_BRANCH}/${ghprbPullId}/"
+#else
+# test -w "${OUTPUT_BASE}/${ATS_BRANCH}" && output="${OUTPUT_BASE}/${ATS_BRANCH}"
+# github_pr=""
+# results_url="https://ci.trafficserver.apache.org/clang-analyzer/${ATS_BRANCH}/"
+#fi
+
+export LLVM_BASE=/usr
+
+# Tell scan-build to use clang as the underlying compiler to actually build
+# source. If you don't do this, it will default to GCC.
+export CCC_CC=${LLVM_BASE}/bin/clang
+export CCC_CXX=${LLVM_BASE}/bin/clang++
+
+# This can be used to override any of those settings above
+[ -f ./.clang-analyzer ] && source ./.clang-analyzer
+
+# Don't do clang-analyzer runs on 7.1.x branch, for e.g. Github PRs
+grep -q 70010 configure.ac && echo "7.1.x branch detected, stop here!" && exit 0
+grep -q 80000 configure.ac && echo "8.0.x branch detected, stop here!" && exit 0
+grep -q 80010 configure.ac && echo "8.1.x branch detected, stop here!" && exit 0
+
+# Start the build / scan
+[ "$output" != "/tmp" ] && echo "Results (if any) can be found at ${results_url}"
+autoreconf -fi
+${LLVM_BASE}/bin/scan-build-10 --keep-cc ./configure ${configure} \
+ || exit 1
+
+# Since we don't want the analyzer to look at yamlcpp, build it first
+# without scan-build. The subsequent make will then skip it.
+# the all-local can be taken out and lib changed to lib/yamlcpp
+# by making yaml cpp a SUBDIRS in lib/Makefile.am.
+${ATS_MAKE} -j ${NPROCS} -C lib all-local V=1 Q= || exit 1
+
+${LLVM_BASE}/bin/scan-build-10 --keep-cc ${checkers} ${options} -o ${output} \
+ --html-title="clang-analyzer: ${ATS_BRANCH}${github_pr}" \
+ ${ATS_MAKE} -j ${NPROCS} V=1 Q=
+status=$?
+
+# Clean the work area unless NOCLEAN is set. This is just for debugging when you
+# need to see what the generated build did.
+#if [ -z "$NOCLEAN" ]; then
+# ${ATS_MAKE} distclean
+#fi
+[ "$output" != "/tmp" ] && echo "Results (if any) can be found at ${results_url}"
+
+# Cleanup old reports, for main clang and github as well (if the local helper script is available)
+#if [ -x "/admin/bin/clean-clang.sh" ]; then
+# /admin/bin/clean-clang.sh
+#fi
+
+exit $status
diff --git a/jenkins/bin/clang-format.sh b/jenkins/bin/clang-format.sh
new file mode 100755
index 0000000..4f1ab18
--- /dev/null
+++ b/jenkins/bin/clang-format.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set +x
+cd "${WORKSPACE}/src"
+
+# First, make sure there are no trailing WS!!!
+git grep -IE ' +$' | fgrep -v '.gold:'
+if [ "1" != "$?" ]; then
+ echo "Error: Trailing whitespaces are not allowed!"
+ echo "Error: Please run: git grep -IE ' +$'"
+ exit 1
+fi
+
+echo "Success! No trailing whitespace"
+# Unix format please!
+git grep -IE $'\r$' | fgrep -v 'lib/yamlcpp'
+if [ "1" != "$?" ]; then
+ echo "Error: Please make sure to run dos2unix on the above file(s)"
+ exit 1
+fi
+echo "Success! No DOS carriage return"
+
+set -x
+
+autoreconf -if && ./configure
+[ "0" != "$?" ] && exit 1
+
+${ATS_MAKE} clang-format
+[ "0" != "$?" ] && exit 1
+
+# Only enforce autopep8 on branches where the pre-commit hook was updated to
+# check it. Otherwise, none of the PRs for older branches will pass this check.
+if grep -q autopep8 tools/git/pre-commit; then
+ ${ATS_MAKE} autopep8
+ [ "0" != "$?" ] && exit 1
+fi
+
+git diff --exit-code
+[ "0" != "$?" ] && exit 1
+
+# Normal exit
+exit 0
diff --git a/jenkins/bin/cleanup.sh b/jenkins/bin/cleanup.sh
new file mode 100755
index 0000000..39c3de0
--- /dev/null
+++ b/jenkins/bin/cleanup.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Do a distclean, to verify that we can actually satisfy this (common) build target
+cd "${ATS_BUILD_BASEDIR}/build"
+[ -d BUILDS ] && cd BUILDS
+
+${ATS_MAKE} distclean
+
+# Final cleanup, this removes the build and install areas, not really needed nor right for docker builds
+cd "${WORKSPACE}" && rm -rf ${BUILD_NUMBER}
diff --git a/jenkins/bin/coverity.sh b/jenkins/bin/coverity.sh
new file mode 100755
index 0000000..b7a19ad
--- /dev/null
+++ b/jenkins/bin/coverity.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+cd "${WORKSPACE}/src"
+
+# Get the Coverity tools into our path
+source /opt/rh/devtoolset-7/enable
+export PATH=/home/coverity/bin:${PATH}
+
+COV_TARBALL=/tmp/trafficserver-${TODAY}.tgz
+COV_VERSION=$(git rev-parse --short HEAD)
+
+autoreconf -fi
+./configure --enable-experimental-plugins --enable-wccp
+
+cov-build --dir cov-int ${ATS_MAKE} -j4 V=1
+tar czvf ${COV_TARBALL} cov-int
+
+# Now submit this artifact
+/home/admin/bin/cov-submit.sh ${COV_TARBALL} ${COV_VERSION}
+
+# Cleanup
+rm -rf cov-int
+rm ${COV_TARBALL}
+
+${ATS_MAKE} distclean
diff --git a/jenkins/bin/docs.sh b/jenkins/bin/docs.sh
new file mode 100755
index 0000000..5af6ae5
--- /dev/null
+++ b/jenkins/bin/docs.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# These shenanigans are here to allow it to run both manually, and via Jenkins
+test -z "${ATS_MAKE}" && ATS_MAKE="make"
+test ! -z "${WORKSPACE}" && cd "${WORKSPACE}/src"
+
+# Skip if nothing in doc has changed
+INCLUDE_FILES=$(for i in $(git grep literalinclude doc/ | awk '{print $3}'); do basename $i; done | sort -u | paste -sd\|)
+echo $INCLUDE_FILES
+if [ ! -z "$ghprbActualCommit" ]; then
+ git diff ${ghprbActualCommit}^...${ghprbActualCommit} --name-only | egrep -E "(^doc/|$INCLUDE_FILES)" > /dev/null
+ if [ $? = 1 ]; then
+ echo "No relevant files changed, skipping run"
+ exit 0
+ fi
+fi
+
+# Run configure on the docs builds each time in case there have been updates
+autoreconf -fi && ./configure --enable-docs || exit 1
+
+cd doc
+
+echo "Building English version"
+rm -rf docbuild/html
+${ATS_MAKE} -e SPHINXOPTS="-D language='en'" html
+[ $? != 0 ] && exit 1
+
+# Only continue with the rsync and JA build if we're on the official docs updates
+[ -w /home/docs ] || exit 0
+
+/usr/bin/rsync --delete -av docbuild/html/ /home/docs/en/${ATS_BRANCH}
+
+echo "Building JA version"
+rm -rf docbuild/html
+${ATS_MAKE} -e SPHINXOPTS="-D language='ja'" html
+[ $? != 0 ] && exit 1
+/usr/bin/rsync --delete -av docbuild/html/ /home/docs/ja/${ATS_BRANCH}
diff --git a/jenkins/bin/environment.sh b/jenkins/bin/environment.sh
new file mode 100755
index 0000000..fce2e71
--- /dev/null
+++ b/jenkins/bin/environment.sh
@@ -0,0 +1,136 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Show which platform we're actually building on
+set +x
+
+# Deduct if this build is on a docker instance
+IS_DOCKER="no"
+df / | fgrep -q overlay && IS_DOCKER="yes"
+export IS_DOCKER
+
+echo -n "Build platform: "
+[ -f /etc/lsb-release ] && grep DISTRIB_RELEASE /etc/lsb-release
+[ -f /etc/debian_version ] && cat /etc/debian_version
+[ -f /etc/redhat-release ] && cat /etc/redhat-release
+echo "Build on Docker: " $IS_DOCKER
+
+# Jenkins workspace
+WORKSPACE="${WORKSPACE:=${PWD}}"
+echo "Workspace is: " $WORKSPACE
+
+# ccache dir as mounted in container
+CCACHE_DIR="${CCACHE_DIR:=/tmp/ccache}"
+
+# Shouldn't have to tweak this
+#export ATS_SRC_HOME="/home/jenkins/src"
+
+# Check if we're doing Debian style hardening
+[ "hardening" == "${TYPE}" ] && export DEB_BUILD_HARDENING=1
+test "${JOB_NAME#*type=hardening}" != "${JOB_NAME}" && export DEB_BUILD_HARDENING=1
+
+# Check if we need to use a different "make"
+ATS_MAKE=make
+PLATFORM=${PLATFORM:=linux}
+[ "freebsd" == "${PLATFORM}" ] && ATS_MAKE="gmake"
+export ATS_MAKE
+
+# Useful for timestamps etc. for daily runs
+export TODAY=$(/bin/date +'%m%d%Y')
+
+# Extract the current branch (default to master). ToDo: Can we do this better ?
+#ATS_BRANCH=master
+ATS_BRANCH=${GITHUB_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#*-8.0.x}" != "${JOB_NAME}" && ATS_BRANCH=8.0.x
+test "${JOB_NAME#*-8.1.x}" != "${JOB_NAME}" && ATS_BRANCH=8.1.x
+test "${JOB_NAME#*-9.0.x}" != "${JOB_NAME}" && ATS_BRANCH=9.0.x
+test "${JOB_NAME#*-9.1.x}" != "${JOB_NAME}" && ATS_BRANCH=9.1.x
+test "${JOB_NAME#*-9.2.x}" != "${JOB_NAME}" && ATS_BRANCH=9.2.x
+test "${JOB_NAME#*-9.3.x}" != "${JOB_NAME}" && ATS_BRANCH=9.3.x
+test "${JOB_NAME#*-10.0.x}" != "${JOB_NAME}" && ATS_BRANCH=10.0.x
+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"
+
+# If the job name includes the string "clang", force clang. This can also be set
+# explicitly for specific jobs.
+test "${JOB_NAME#*compiler=clang}" != "${JOB_NAME}" && enable_clang=1
+
+COMPILER=${COMPILER:=gcc}
+[ "${COMPILER}" == "clang" ] && enable_clang=1
+[ "${COMPILER}" == "icc" ] && enable_icc=1
+[ "${COMPILER}" == "gcc" ] && enable_gcc=1
+
+if [ "1" == "$enable_clang" ]; then
+ export CC="clang"
+ export CXX="clang++"
+ export CXXFLAGS="-Qunused-arguments"
+ export WITH_LIBCPLUSPLUS="yes"
+elif [ "1" == "$enable_icc" ]; then
+ source /opt/rh/devtoolset-7/enable
+ source /opt/intel/bin/iccvars.sh intel64
+ export CC=icc
+ export CXX=icpc
+else
+ # Default is gcc / g++
+ export CC=gcc
+ export CXX=g++
+ if test -f "/opt/rh/devtoolset-7/enable"; then
+ # This changes the path such that gcc / g++ is the right version. This is for CentOS 6 / 7.
+ source /opt/rh/devtoolset-7/enable
+ echo "Enabling devtoolset-7"
+ elif test -x "/usr/bin/g++-7"; then
+ # This is for Debian platforms
+ export CC=/usr/bin/gcc-7
+ export CXX=/usr/bin/g++-7
+ fi
+fi
+
+# Echo out compiler information
+echo "Compiler information:"
+echo "CC: ${CC}"
+$CC -v
+echo "CXX: $CXX"
+$CXX -v
+
+# Figure out parallelism for regular builds / bots
+export ATS_MAKE_FLAGS="-j4"
+if [ "yes" == "$IS_DOCKER" ]; then
+ export ATS_BUILD_BASEDIR="${WORKSPACE}"
+else
+ export ATS_BUILD_BASEDIR="${WORKSPACE}/${BUILD_NUMBER}"
+fi
+
+# ccache settings
+#export CCACHE_BASEDIR=${ATS_BUILD_BASEDIR}
+#export CCACHE_COMPRESS=true
+
+# Restore verbose shell output
+set -x
diff --git a/jenkins/bin/extract.sh b/jenkins/bin/extract.sh
new file mode 100755
index 0000000..5c498a3
--- /dev/null
+++ b/jenkins/bin/extract.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set +x
+# Setup the build and install area for this build
+mkdir -p "${ATS_BUILD_BASEDIR}/build"
+mkdir -p "${ATS_BUILD_BASEDIR}/install"
+
+cd "${ATS_BUILD_BASEDIR}/build"
+#echo "Artifact: ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2"
+#tar xf ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2
+#mv trafficserver-*/* .
+
+echo "build: ${ATS_BUILD_BASEDIR}/build"
+echo "install: ${ATS_BUILD_BASEDIR}/install"
+
+# Restore verbose shell output
+set -x
diff --git a/jenkins/bin/gh-mirror.sh b/jenkins/bin/gh-mirror.sh
new file mode 100755
index 0000000..9bf2e3e
--- /dev/null
+++ b/jenkins/bin/gh-mirror.sh
@@ -0,0 +1,86 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This should probably be configurable ...
+cd /home/mirror/trafficserver.git || exit
+
+# Check that we got a token for Jenkins access
+if [ "" == "$1" ]; then
+ echo "Must provide the auth token for Jenkins"
+ exit 1
+fi
+token="build?token=$1"
+
+# Optional second argument is the base URL, no trailing slash
+BASE_URL=${2:-"https://ci.trafficserver.apache.org"}
+
+# Some environment overridable defines
+GIT=${GIT:-/usr/bin/git}
+GREP=${GREP:-/usr/bin/grep}
+CURL=${CURL:-/usr/bin/curl}
+
+# Get the ref in the current version of the tree
+function getRef() {
+ local branch="$1"
+
+ ${GIT} show-ref -s refs/heads/${branch}
+}
+
+# Check the diff, and trigger builds as appropriate
+function checkBuild() {
+ local ref="$1"
+ local branch="$2"
+ local diff
+
+ # Do the actual diff from the previous ref to current branch head
+ diff=$(${GIT} log --name-only --pretty=format: ${ref}..refs/heads/${branch} | ${GREP} -v '^$')
+
+ # Check if commits have doc/ changes
+ echo -n "$diff" | ${GREP} -F -e doc/ >/dev/null
+ if [ 0 == $? ]; then
+ echo "Triggerd Docs build for ${branch}"
+ ${CURL} -o /dev/null -s ${BASE_URL}/job/docs-${branch}/${token}
+ fi
+
+ # Check if commits have non doc/ changes
+ echo -n "$diff" | ${GREP} -F -v -e doc/ >/dev/null
+ if [ 0 == $? ]; then
+ echo "Triggered main build for ${branch}"
+ ${CURL} -o /dev/null -s ${BASE_URL}/job/start-${branch}/${token}
+ fi
+}
+
+# Save away previous ref-specs, you must save all branches
+REF_6_2=$(getRef "6.2.x")
+REF_7_1=$(getRef "7.1.x")
+REF_8_0=$(getRef "8.0.x")
+REF_8_1=$(getRef "8.1.x")
+REF_9_0=$(getRef "9.0.x")
+REF_master=$(getRef "master")
+
+# Do the updates
+${GIT} remote update --prune >/dev/null 2>&1
+${GIT} update-server-info
+
+# Check the branches, this makes assumptions that the Jenkins build are named after the branches
+checkBuild "$REF_6_2" "6.2.x"
+checkBuild "$REF_7_1" "7.1.x"
+checkBuild "$REF_8_0" "8.0.x"
+checkBuild "$REF_8_1" "8.1.x"
+checkBuild "$REF_9_0" "9.0.x"
+checkBuild "$REF_master" "master"
diff --git a/jenkins/bin/github.sh b/jenkins/bin/github.sh
new file mode 100755
index 0000000..054d98e
--- /dev/null
+++ b/jenkins/bin/github.sh
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set +x
+
+INSTALL="${ATS_BUILD_BASEDIR}/install"
+
+# Optional settings
+CCACHE=""
+WERROR=""
+DEBUG=""
+WCCP=""
+LUAJIT=""
+QUIC=""
+[ "1" == "$enable_ccache" ] && CCACHE="--enable-ccache"
+[ "1" == "$enable_werror" ] && WERROR="--enable-werror"
+[ "1" == "$enable_debug" ] && DEBUG="--enable-debug"
+[ "1" == "$enable_wccp" ] && WCCP="--enable-wccp"
+[ "1" == "$enable_luajit" ] && LUAJIT="--enable-luajit"
+[ "1" == "$enable_quic" ] && QUIC="--with-openssl=/opt/openssl-quic"
+
+mkdir -p ${INSTALL}
+cd src
+
+echo "CCACHE: $CCACHE"
+echo "WERROR: $WERROR"
+echo "DEBUG: $DEBUG"
+echo "WCCP: $WCCP"
+echo "LUAJIT: $LUAJIT"
+echo "QUIC: $QUIC"
+
+# Restore verbose shell output
+set -x
+
+# Configure
+autoreconf -if
+
+./configure --prefix="${INSTALL}" \
+ --with-user=jenkins \
+ --enable-experimental-plugins \
+ --enable-example-plugins \
+ ${CCACHE} \
+ ${WCCP} \
+ ${LUAJIT} \
+ ${QUIC} \
+ ${WERROR} \
+ ${DEBUG}
+
+# Build and run regressions
+echo
+echo -n "Main build started at " && date
+${ATS_MAKE} ${ATS_MAKE_FLAGS} V=1 Q= || exit 1
+echo -n "Main build finished at " && date
+echo
+echo -n "Unit tests started at " && date
+${ATS_MAKE} -j 2 check VERBOSE=Y V=1 && ${ATS_MAKE} install
+echo -n "Unit tests finished at " && date
+
+[ -x ${INSTALL}/bin/traffic_server ] || exit 1
+
+echo
+echo -n "Regression tests started at " && date
+${INSTALL}/bin/traffic_server -K -k -R 1
+rval=$?
+echo -n "Regression tests finished at " && date
+exit $rval
diff --git a/jenkins/bin/in_tree.sh b/jenkins/bin/in_tree.sh
new file mode 100755
index 0000000..c866cd0
--- /dev/null
+++ b/jenkins/bin/in_tree.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This does intentionally not run the regressions, it's primarily a "build" test
+
+cd "${WORKSPACE}/src"
+
+autoreconf -fi
+./configure \
+ --with-user=jenkins \
+ --enable-ccache \
+ --enable-werror \
+ --enable-experimental-plugins \
+ --enable-example-plugins \
+ --enable-wccp
+
+${ATS_MAKE} ${ATS_MAKE_FLAGS} V=1
+#${ATS_MAKE} check VERBOSE=Y
+${ATS_MAKE} clean
diff --git a/jenkins/bin/out_of_tree.sh b/jenkins/bin/out_of_tree.sh
new file mode 100755
index 0000000..edc5273
--- /dev/null
+++ b/jenkins/bin/out_of_tree.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This does intentionally not run the regressions, it's primarily a "build" test
+
+cd "${WORKSPACE}/src"
+
+autoreconf -fi
+mkdir -p BUILDS && cd BUILDS
+../configure \
+ --with-user=jenkins \
+ --enable-ccache \
+ --enable-werror \
+ --enable-experimental-plugins \
+ --enable-example-plugins \
+ --enable-wccp
+
+${ATS_MAKE} -j5 V=1
+#${ATS_MAKE} check VERBOSE=Y
+${ATS_MAKE} clean
diff --git a/jenkins/bin/rat.sh b/jenkins/bin/rat.sh
new file mode 100755
index 0000000..ce67af7
--- /dev/null
+++ b/jenkins/bin/rat.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+cd "${WORKSPACE}/src"
+
+autoreconf -if && ./configure
+
+# WTF
+rm -f lib/ts/stamp-h1
+
+${ATS_MAKE} rat | tee RAT.txt
+#mv RAT.txt /CA/RAT/rat-${ATS_BRANCH}.txt.new
+#mv /CA/RAT/rat-${ATS_BRANCH}.txt.new /CA/RAT/rat-${ATS_BRANCH}.txt
+
+# Purgatory
+#curl -o /dev/null -k -s -X PURGE https://ci.trafficserver.apache.org/RAT/rat-${ATS_BRANCH}.txt
+
+# Mark as failed if there are any unknown licesnes
+#grep '0 Unknown Licenses' /CA/RAT/rat-${ATS_BRANCH}.txt >/dev/null || exit 1
+grep '0 Unknown Licenses' RAT.txt >/dev/null || exit 1
+
+# Normal exit
+exit 0
diff --git a/jenkins/bin/regression.sh b/jenkins/bin/regression.sh
new file mode 100755
index 0000000..66901e5
--- /dev/null
+++ b/jenkins/bin/regression.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#cd "${ATS_BUILD_BASEDIR}/build"
+#cd "${ATS_BUILD_BASEDIR}"
+[ -d BUILDS ] && cd BUILDS
+
+echo
+echo -n "Unit tests started at " && date
+${ATS_MAKE} -j4 check VERBOSE=Y V=1 || exit 1
+echo -n "Unit tests finished at " && date
+${ATS_MAKE} install || exit 1
+
+echo
+echo -n "Regression tests started at " && date
+"${ATS_BUILD_BASEDIR}/install/bin/traffic_server" -k -K -R 1
+rval=$?
+echo -n "Regression tests finished at " && date
+exit $rval
diff --git a/jenkins/bin/snapshot.sh b/jenkins/bin/snapshot.sh
new file mode 100755
index 0000000..6315491
--- /dev/null
+++ b/jenkins/bin/snapshot.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+cd "${WORKSPACE}/src"
+
+autoreconf -fi
+
+./configure \
+ --with-user=jenkins \
+ --enable-ccache \
+ --enable-debug \
+ --enable-werror \
+ --enable-experimental-plugins \
+ --enable-example-plugins
+
+${ATS_MAKE} asf-dist
+
+# Make an "atomic" copy of the artifact (and leave it here for the archive)
+#cp trafficserver-*.tar.bz2 ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2.new
+#mv ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2.new ${WORKSPACE}/trafficserver-${ATS_BRANCH}.tar.bz2
+
+# Make sure we get a chance to synchronize the /CA/src directory to remote sites.
+#sleep 5