Merge pull request #868 from expa/mh-circle-ci

use circleci for automated testing
This commit is contained in:
Jose Diaz-Gonzalez
2015-01-06 23:44:15 -05:00
6 changed files with 33 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
# Dokku [![Build Status](https://app.wercker.com/status/029900380b7e5f31bbf4392725067769/s/master "Build Status")](https://app.wercker.com/project/bykey/029900380b7e5f31bbf4392725067769)
# Dokku [![Build Status](https://circleci.com/gh/progrium/dokku/tree/master.svg?style=svg&circle-token=eec5b442dda53a4d229911dd97d4214853acc262 "Build Status")](https://circleci.com/gh/progrium/dokku/tree/master)
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. Sponsored by our friends at [Deis](http://deis.io/).

28
circle.yml Normal file
View File

@@ -0,0 +1,28 @@
machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker"
override:
# need to add the dokku user to the docker group
- sudo -E CI=true make -e sshcommand
- sudo usermod -G docker dokku
- sudo -E CI=true DOCKER_VERSION=1.4.1 make -e install: { timeout: 300 }
- make -e ci-dependencies
#### 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
test:
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
- sudo -E make -e deploy-tests: { timeout: 1800 }

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -1,39 +0,0 @@
box: wercker-labs/docker
no-response-timeout: 20
build:
steps:
- script:
name: install os requirements
code: |-
sudo apt-get update
sudo apt-get install -y make software-properties-common git wget man-db
- script:
name: ci dependencies
code: make -e ci-dependencies
- script:
name: install dokku
code: sudo -E CI=true DOCKER_VERSION=1.4.0 make -e install
- script:
name: setup deploy tests
code: sudo -E make -e setup-deploy-tests
- script:
name: lint
code: sudo -E make -e lint
- script:
name: unit tests
code: sudo -E make -e unit-tests
- script:
name: deploy tests (against buildstep release)
code: sudo -E make -e deploy-tests
- script:
name: deploy tests (against buildstep master)
code: |-
sudo docker rmi -f progrium/buildstep
sudo -E BUILD_STACK=true make -e stack
sudo -E make -e deploy-tests
after-steps:
- wouter/irc-notify:
server: irc.freenode.net
port: 6667
nickname: dokku-wercker
channel: dokku