Repository: cassandra-builds Updated Branches: refs/heads/master 4bf0ea6ae -> 1c49e7003
Add artifacts and unittest build scripts Project: http://git-wip-us.apache.org/repos/asf/cassandra-builds/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra-builds/commit/1c49e700 Tree: http://git-wip-us.apache.org/repos/asf/cassandra-builds/tree/1c49e700 Diff: http://git-wip-us.apache.org/repos/asf/cassandra-builds/diff/1c49e700 Branch: refs/heads/master Commit: 1c49e70033e8ed55f8aa4e9880e54142e3ca367f Parents: 4bf0ea6 Author: Michael Shuler <mich...@pbandjelly.org> Authored: Mon Nov 14 17:37:05 2016 -0600 Committer: Michael Shuler <mich...@pbandjelly.org> Committed: Mon Nov 14 17:37:05 2016 -0600 ---------------------------------------------------------------------- build-scripts/cassandra-artifacts.sh | 39 +++++++++++++++++++++++++++++++ build-scripts/cassandra-unittest.sh | 36 ++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/1c49e700/build-scripts/cassandra-artifacts.sh ---------------------------------------------------------------------- diff --git a/build-scripts/cassandra-artifacts.sh b/build-scripts/cassandra-artifacts.sh new file mode 100755 index 0000000..dd480e7 --- /dev/null +++ b/build-scripts/cassandra-artifacts.sh @@ -0,0 +1,39 @@ +#!/bin/bash -xe + +################################ +# +# Prep +# +################################ + +# Sphinx is needed for the gen-doc target +virtualenv venv +source venv/bin/activate +pip install Sphinx sphinx_rtd_theme + +################################ +# +# Main +# +################################ + +# Loop to prevent failure due to maven-ant-tasks not downloading a jar.. +set +e # disable immediate exit from this point +for x in $(seq 1 3); do + ant clean artifacts + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + break + fi +done + +################################ +# +# Clean +# +################################ + +# /virtualenv +deactivate + +exit "${RETURN}" http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/1c49e700/build-scripts/cassandra-unittest.sh ---------------------------------------------------------------------- diff --git a/build-scripts/cassandra-unittest.sh b/build-scripts/cassandra-unittest.sh new file mode 100755 index 0000000..0c91c26 --- /dev/null +++ b/build-scripts/cassandra-unittest.sh @@ -0,0 +1,36 @@ +#!/bin/bash -x + +################################ +# +# Prep +# +################################ + +# Pass in target to run, default to `ant test` +TEST_TARGET="${1:-test}" + +################################ +# +# Main +# +################################ + +# Loop to prevent failure due to maven-ant-tasks not downloading a jar.. +for x in $(seq 1 3); do + ant clean jar + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + # Run target and exit cleanly for usable "Unstable" status + ant "${TEST_TARGET}" + exit 0 + fi +done + +################################ +# +# Clean +# +################################ + +# If we failed `ant jar` loop +exit "${RETURN}"