trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject git commit: Add the build scripts from the new Jenkins instance
Date Tue, 06 May 2014 01:20:19 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 6d15b4e58 -> 3da2edb33


Add the build scripts from the new Jenkins instance


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3da2edb3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3da2edb3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3da2edb3

Branch: refs/heads/master
Commit: 3da2edb33aa6a357386d57a2ef14dc0e935fee0d
Parents: 6d15b4e
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Mon May 5 18:19:49 2014 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Mon May 5 18:19:49 2014 -0700

----------------------------------------------------------------------
 ci/jenkins/bin/build.sh       | 39 ++++++++++++++++++++++++++++++++++++++
 ci/jenkins/bin/cleanup.sh     | 25 ++++++++++++++++++++++++
 ci/jenkins/bin/environment.sh | 34 +++++++++++++++++++++++++++++++++
 ci/jenkins/bin/extract.sh     | 25 ++++++++++++++++++++++++
 ci/jenkins/bin/in_tree.sh     | 34 +++++++++++++++++++++++++++++++++
 ci/jenkins/bin/out_of_tree.sh | 35 ++++++++++++++++++++++++++++++++++
 ci/jenkins/bin/rat.sh         | 27 ++++++++++++++++++++++++++
 ci/jenkins/bin/regression.sh  | 22 +++++++++++++++++++++
 ci/jenkins/bin/snapshot.sh    | 26 +++++++++++++++++++++++++
 9 files changed, 267 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3da2edb3/ci/jenkins/bin/build.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/build.sh b/ci/jenkins/bin/build.sh
new file mode 100755
index 0000000..4ac6b9f
--- /dev/null
+++ b/ci/jenkins/bin/build.sh
@@ -0,0 +1,39 @@
+#!/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.
+
+# Parse debug / release
+enable_debug=""
+test "${JOB_NAME#*type=debug}" != "${JOB_NAME}" && enable_debug="--enable-debug"
+
+# Parse compiler, only turn on ccache with gcc (clang fails, sigh)
+enable_ccache=""
+test "${JOB_NAME#*compiler=gcc}" != "${JOB_NAME}" && enable_ccache="--enable-ccache"
+
+# Change to the build area (this is previously setup in extract.sh)
+cd "${WORKSPACE}/${BUILD_NUMBER}/build"
+
+./configure \
+    --prefix="${WORKSPACE}/${BUILD_NUMBER}/install" \
+    --enable-werror \
+    --enable-experimental-plugins \
+    --enable-example-plugins \
+    --enable-test-tools \
+    ${enable_ccache} \
+    ${enable_debug}
+
+make -j4 V=1

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3da2edb3/ci/jenkins/bin/cleanup.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/cleanup.sh b/ci/jenkins/bin/cleanup.sh
new file mode 100755
index 0000000..2c7cbdd
--- /dev/null
+++ b/ci/jenkins/bin/cleanup.sh
@@ -0,0 +1,25 @@
+#!/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 "${WORKSPACE}/${BUILD_NUMBER}/build"
+make distclean
+
+# Final cleanup, this removes the build and install areas
+cd "${WORKSPACE}
+rm ${BUILD_NUMBER}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3da2edb3/ci/jenkins/bin/environment.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/environment.sh b/ci/jenkins/bin/environment.sh
new file mode 100755
index 0000000..a80f1b5
--- /dev/null
+++ b/ci/jenkins/bin/environment.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.
+
+# Shouldn't have to tweak this
+export ATS_SRC_HOME="/home/jenkins/src"
+
+# Extract the current branch (default to master). ToDo: Can we do this better ?
+ATS_BRANCH=master
+test "${JOB_NAME#*-4.2.x}" != "${JOB_NAME}" && ATS_BRANCH=4.2.x
+test "${JOB_NAME#*-5.0.x}" != "${JOB_NAME}" && ATS_BRANCH=5.0.x
+export ATS_BRANCH
+
+# Decide on compilers, gcc is the default
+if test "${JOB_NAME#*compiler=clang}" != "${JOB_NAME}"; then
+    export CC="clang"
+    export CXX="clang++"
+    export CXXFLAGS="-Qunused-arguments -std=c++11"
+    export WITH_LIBCPLUSPLUS="yes"
+fi

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3da2edb3/ci/jenkins/bin/extract.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/extract.sh b/ci/jenkins/bin/extract.sh
new file mode 100755
index 0000000..e60b46f
--- /dev/null
+++ b/ci/jenkins/bin/extract.sh
@@ -0,0 +1,25 @@
+#!/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.
+
+# Setup the build and install area for this build
+mkdir -p "${WORKSPACE}/${BUILD_NUMBER}/build"
+mkdir -p "${WORKSPACE}/${BUILD_NUMBER}/install"
+
+cd "${WORKSPACE}/${BUILD_NUMBER}/build"
+tar xf ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2
+mv trafficserver-*/* .

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3da2edb3/ci/jenkins/bin/in_tree.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/in_tree.sh b/ci/jenkins/bin/in_tree.sh
new file mode 100755
index 0000000..ffa7777
--- /dev/null
+++ b/ci/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.
+
+cd "${WORKSPACE}/src"
+
+if test "${JOB_NAME#*type=in_tree}" != "${JOB_NAME}"; then
+    ./configure \
+	--enable-ccache \
+	--enable-debug \
+	--enable-werror \
+	--enable-experimental-plugins \
+	--enable-example-plugins \
+	--enable-test-tools
+
+    make -j8 V=1
+    make check
+
+    make distclean
+fi

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3da2edb3/ci/jenkins/bin/out_of_tree.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/out_of_tree.sh b/ci/jenkins/bin/out_of_tree.sh
new file mode 100755
index 0000000..8385c2b
--- /dev/null
+++ b/ci/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.
+
+cd "${WORKSPACE}/src"
+
+if test "${JOB_NAME#*type=out_of_tree}" != "${JOB_NAME}"; then
+    mkdir -p BUILDS && cd BUILDS
+    ../configure \
+	--enable-ccache \
+	--enable-debug \
+	--enable-werror \
+	--enable-experimental-plugins \
+	--enable-example-plugins \
+	--enable-test-tools
+
+    make -j8 V=1
+    make check
+
+    make distclean
+fi

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3da2edb3/ci/jenkins/bin/rat.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/rat.sh b/ci/jenkins/bin/rat.sh
new file mode 100755
index 0000000..82debec
--- /dev/null
+++ b/ci/jenkins/bin/rat.sh
@@ -0,0 +1,27 @@
+#!/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"
+
+if test "${JOB_NAME#*type=RAT}" != "${JOB_NAME}"; then
+    ./configure
+    make rat | tee RAT.txt
+    cp RAT.txt /home/jenkins/RAT/rat-${ATS_BRANCH}.txt
+    grep 'Unknown Licenses' RAT.txt# && exit -1
+    make distclean
+fi

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3da2edb3/ci/jenkins/bin/regression.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/regression.sh b/ci/jenkins/bin/regression.sh
new file mode 100755
index 0000000..8d07acc
--- /dev/null
+++ b/ci/jenkins/bin/regression.sh
@@ -0,0 +1,22 @@
+#!/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}/${BUILD_NUMBER}/build"
+make test && make install
+
+"${WORKSPACE}/${BUILD_NUMBER}/install/bin/traffic_server" -R 1

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3da2edb3/ci/jenkins/bin/snapshot.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/snapshot.sh b/ci/jenkins/bin/snapshot.sh
new file mode 100755
index 0000000..5e16e1f
--- /dev/null
+++ b/ci/jenkins/bin/snapshot.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.
+
+cd "${WORKSPACE}/src"
+
+autoreconf -fi
+./configure
+make asf-dist
+
+cp trafficserver-*.tar.bz2 ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2.new
+mv ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2.new ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2


Mime
View raw message