Speed up CircleCI builds

To achieve faster feedback cycles for our feature PRs this change
reduces the average buildtime from 35 to ~6min by utilising their new
2.0 offering based on docker and nomad. We make use of parallel build
steps wherever possible so that the duration is determined by the
slowest test suite (p2p).

This is an intermediate step until we move our CI/CD completely
on-premise for more control and added security.
This commit is contained in:
Alexander Simmerl
2018-03-06 17:36:44 +01:00
parent 8d81a259c7
commit b7ce89e568
11 changed files with 279 additions and 48 deletions
+2 -1
View File
@@ -1,5 +1,5 @@
#! /bin/bash
set -e
set -ex
#- kvstore over socket, curl
#- counter over socket, curl
@@ -8,6 +8,7 @@ set -e
# TODO: install everything
export PATH="$GOBIN:$PATH"
export TMHOME=$HOME/.tendermint_app
function kvstore_over_socket(){
+35
View File
@@ -0,0 +1,35 @@
#! /bin/bash
set -eux
# Get the directory of where this script is.
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
LOGS_DIR="$DIR/../logs"
echo
echo "* [$(date +"%T")] cleaning up $LOGS_DIR"
rm -rf "$LOGS_DIR"
mkdir -p "$LOGS_DIR"
set +e
echo
echo "* [$(date +"%T")] removing run_test container"
docker rm -vf run_test
set -e
echo
echo "* [$(date +"%T")] starting rsyslog container"
docker rm -f rsyslog || true
docker run -d -v "$LOGS_DIR:/var/log/" -p 127.0.0.1:5514:514/udp --name rsyslog voxxit/rsyslog
set +u
if [[ "$SKIP_BUILD" == "" ]]; then
echo
echo "* [$(date +"%T")] building docker image"
bash "$DIR/../docker/build.sh"
fi
echo
echo "* [$(date +"%T")] running p2p tests on a local docker network"
bash "$DIR/../p2p/test.sh" tester
+1
View File
@@ -10,6 +10,7 @@ RUN apt-get update && \
# Setup tendermint repo
ENV REPO $GOPATH/src/github.com/tendermint/tendermint
ENV GOBIN $GOPATH/bin
WORKDIR $REPO
# Install the vendored dependencies before copying code
+1
View File
@@ -1,5 +1,6 @@
#! /bin/bash
export PATH="$GOBIN:$PATH"
export TMHOME=$HOME/.tendermint_persist
rm -rf "$TMHOME"
+4 -1
View File
@@ -1,5 +1,7 @@
#! /bin/bash
set -e
set -ex
export PATH="$GOBIN:$PATH"
# Get the parent directory of where this script is.
SOURCE="${BASH_SOURCE[0]}"
@@ -18,6 +20,7 @@ for lib in "${LIBS[@]}"; do
echo "Testing $lib ..."
cd "$GOPATH/src/github.com/tendermint/$lib"
make get_tools
make get_vendor_deps
make test
if [[ "$?" != 0 ]]; then