Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/jenkins/bin/autest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

set +x

INSTALL="${WORKSPACE}/${BUILD_NUMBER}/install"
INSTALL="${ATS_BUILD_BASEDIR}/install"
URL="https://ci.trafficserver.apache.org/autest"
JOB_ID=${ghprbPullId:-${ATS_BRANCH:-master}}
AUSB="ausb-${JOB_ID}.${BUILD_NUMBER}"
Expand Down
4 changes: 2 additions & 2 deletions ci/jenkins/bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ echo "CCACHE: $CCACHE"
echo "WERROR: $WERROR"

# Change to the build area (this is previously setup in extract.sh)
cd "${WORKSPACE}/${BUILD_NUMBER}/build"
cd "${ATS_BUILD_BASEDIR}/build"
mkdir -p BUILDS && cd BUILDS

# Restore verbose shell output
set -x

../configure \
--prefix="${WORKSPACE}/${BUILD_NUMBER}/install" \
--prefix="${ATS_BUILD_BASEDIR}/install" \
--enable-experimental-plugins \
--enable-example-plugins \
--with-user=jenkins \
Expand Down
4 changes: 2 additions & 2 deletions ci/jenkins/bin/cache-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

PREFIX="${WORKSPACE}/${BUILD_NUMBER}/install"
PREFIX="${ATS_BUILD_BASEDIR}/install"
REMAP="${PREFIX}/etc/trafficserver/remap.config"
RECORDS="${PREFIX}/etc/trafficserver/records.config"

Expand All @@ -25,7 +25,7 @@ TWEAK=""

# Change to the build area (this is previously setup in extract.sh)
set +x
cd "${WORKSPACE}/${BUILD_NUMBER}/build"
cd "${ATS_BUILD_BASEDIR}/build"

./configure \
--prefix=${PREFIX} \
Expand Down
12 changes: 12 additions & 0 deletions ci/jenkins/bin/clang-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# 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!!!
Expand All @@ -25,6 +26,17 @@ if [ "1" != "$?" ]; then
echo "Error: Please run: git grep -IE ' +$'"
exit 1
fi
echo "Success! No trailing whitespace"

# Make sure there are no DOS shit here.
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
Expand Down
7 changes: 3 additions & 4 deletions ci/jenkins/bin/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
# limitations under the License.

# Do a distclean, to verify that we can actually satisfy this (common) build target
cd "${WORKSPACE}/${BUILD_NUMBER}/build"
cd "${ATS_BUILD_BASEDIR}/build"
[ -d BUILDS ] && cd BUILDS

${ATS_MAKE} distclean

# Final cleanup, this removes the build and install areas
cd "${WORKSPACE}"
rm -rf ${BUILD_NUMBER}
# Final cleanup, this removes the build and install areas, not really needed nor right for docker builds
cd "${WORKSPACE}" && rm -rf ${BUILD_NUMBER}
40 changes: 21 additions & 19 deletions ci/jenkins/bin/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@

# Show which platform we're actually building on
set +x
echo -n "Build platform: "

# 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

# Shouldn't have to tweak this
export ATS_SRC_HOME="/home/jenkins/src"
Expand All @@ -40,15 +46,9 @@ export TODAY=$(/bin/date +'%m%d%Y')

# Extract the current branch (default to master). ToDo: Can we do this better ?
ATS_BRANCH=master
ATS_IS_7="yes"

test "${JOB_NAME#*-5.3.x}" != "${JOB_NAME}" && ATS_BRANCH=5.3.x && ATS_IS_7="no"
test "${JOB_NAME#*-6.2.x}" != "${JOB_NAME}" && ATS_BRANCH=6.2.x && ATS_IS_7="no"
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
test "${JOB_NAME#*-8.2.x}" != "${JOB_NAME}" && ATS_BRANCH=8.2.x
test "${JOB_NAME#*-8.3.x}" != "${JOB_NAME}" && ATS_BRANCH=8.3.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
Expand Down Expand Up @@ -89,17 +89,14 @@ else
# Default is gcc / g++
export CC=gcc
export CXX=g++
# Only test for non standard compilers on ATS v7.x and later. ToDo: Remove this when 6.x is EOLifed.
if test "$ATS_IS_7" == "yes"; then
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
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

Expand All @@ -111,7 +108,12 @@ echo "CXX: $CXX"
$CXX -v

# Figure out parallelism for regular builds / bots
ATS_MAKE_FLAGS="-j6"
export ATS_MAKE_FLAGS="-j6"
if [ "yes" == "$IS_DOCKER" ]; then
export ATS_BUILD_BASEDIR="${WORKSPACE}"
else
export ATS_BUILD_BASEDIR="${WORKSPACE}/${BUILD_NUMBER}"
fi

# Restore verbose shell output
set -x
10 changes: 5 additions & 5 deletions ci/jenkins/bin/extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@

set +x
# Setup the build and install area for this build
mkdir -p "${WORKSPACE}/${BUILD_NUMBER}/build"
mkdir -p "${WORKSPACE}/${BUILD_NUMBER}/install"
mkdir -p "${ATS_BUILD_BASEDIR}/build"
mkdir -p "${ATS_BUILD_BASEDIR}/install"

cd "${WORKSPACE}/${BUILD_NUMBER}/build"
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: ${WORKSPACE}/${BUILD_NUMBER}/build"
echo "install: ${WORKSPACE}/${BUILD_NUMBER}/install"
echo "build: ${ATS_BUILD_BASEDIR}/build"
echo "install: ${ATS_BUILD_BASEDIR}/install"

# Restore verbose shell output
set -x
2 changes: 1 addition & 1 deletion ci/jenkins/bin/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

set +x

INSTALL="${WORKSPACE}/${BUILD_NUMBER}/install"
INSTALL="${ATS_BUILD_BASEDIR}/install"

# Optional settings
CCACHE=""
Expand Down
4 changes: 2 additions & 2 deletions ci/jenkins/bin/regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cd "${WORKSPACE}/${BUILD_NUMBER}/build"
cd "${ATS_BUILD_BASEDIR}/build"
[ -d BUILDS ] && cd BUILDS

echo
Expand All @@ -27,5 +27,5 @@ ${ATS_MAKE} install || exit 1

echo
echo -n "Regression tests started at " && date
"${WORKSPACE}/${BUILD_NUMBER}/install/bin/traffic_server" -k -K -R 1
"${ATS_BUILD_BASEDIR}/install/bin/traffic_server" -k -K -R 1
echo -n "Regression tests finished at " && date