From 9d81dda524b859f02073fb2e85c287447335b196 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Sat, 3 Jan 2015 10:55:40 -0800 Subject: [PATCH] try circle again --- circle.yml | 32 +++++++++++++++++++++++++++++++ plugins/apps/pre-delete | 2 +- plugins/nginx-vhosts/dependencies | 3 ++- tests/test_deploy | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 circle.yml diff --git a/circle.yml b/circle.yml new file mode 100644 index 000000000..7548e592e --- /dev/null +++ b/circle.yml @@ -0,0 +1,32 @@ +machine: + services: + - docker +dependencies: + cache_directories: + - "~/docker" + override: + - make -e ci-dependencies + - sudo -E CI=true make -e sshcommand pluginhook + # - sudo apt-get install -f + # - sudo apt-get autoremove + - sudo usermod -G docker dokku + - sudo -E CI=true make -e stack: { timeout: 300 } + - sudo -E CI=true make -e copyfiles plugin-dependencies version + - sudo dokku plugins-install +test: + pre: + #### circle does some weird *expletive* with regards to root and gh auth (needed for gitsubmodules test) + - sudo rsync -a ~ubuntu/.ssh/ ~root/.ssh/ + - sudo chown -R root:root ~root/.ssh/ + - sudo sed -e 's:/home/ubuntu:/root:g' ~root/.ssh/config + #### + - sudo -E make -e setup-deploy-tests + override: + - sudo -E make -e lint + - sudo -E make -e unit-tests + ### deploy tests (against buildstep release) #### + - sudo -E make -e deploy-tests: { timeout: 1800 } + ### deploy tests (against buildstep master) #### + - sudo docker rmi -f progrium/buildstep + - sudo -E BUILD_STACK=true make -e stack: { timeout: 1800 } + - sudo -E make -e deploy-tests: { timeout: 1800 } diff --git a/plugins/apps/pre-delete b/plugins/apps/pre-delete index 424213c37..55ca79e73 100755 --- a/plugins/apps/pre-delete +++ b/plugins/apps/pre-delete @@ -3,5 +3,5 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x APP="$1"; IMAGE="dokku/$APP"; CACHE_DIR="$DOKKU_ROOT/$APP/cache" if [[ -d $CACHE_DIR ]]; then - docker run --rm -v "$CACHE_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; + docker run --rm -v "$CACHE_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true fi diff --git a/plugins/nginx-vhosts/dependencies b/plugins/nginx-vhosts/dependencies index dbb5a7325..db5a54b6a 100755 --- a/plugins/nginx-vhosts/dependencies +++ b/plugins/nginx-vhosts/dependencies @@ -3,7 +3,8 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x case "$DOKKU_DISTRO" in ubuntu) - apt-get install -qq -y software-properties-common python-software-properties + [[ -z "$CIRCLECI" ]] && apt-get install -qq -y software-properties-common python-software-properties + [[ -n "$CIRCLECI" ]] && aptitude install -q -y software-properties-common python-software-properties add-apt-repository -y ppa:nginx/stable apt-get update apt-get install -qq -y nginx dnsutils diff --git a/tests/test_deploy b/tests/test_deploy index 271d30e7c..5ec2d6eb7 100755 --- a/tests/test_deploy +++ b/tests/test_deploy @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eo pipefail +set -xeo pipefail SELF=$(which $0); APP="$1"; TARGET="$2"; FORWARDED_PORT="$3" REMOTE="dokku@$TARGET"