49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
version: 2
|
|
jobs:
|
|
build:
|
|
working_directory: ~/rookeries_ci
|
|
docker:
|
|
- image: buildpack-deps:trusty
|
|
- image: postgres:9.6
|
|
|
|
steps:
|
|
- checkout
|
|
- setup_docker_engine
|
|
|
|
- run:
|
|
name: Build Docker images
|
|
command: make build
|
|
|
|
- run:
|
|
name: Start SauceLabs tunnel
|
|
command: scripts/launch_sc.sh
|
|
background: true
|
|
|
|
- run:
|
|
name: Wait until SauceLabs tunnel is available
|
|
command: scripts/wait_until_sc_ready.sh
|
|
|
|
- run:
|
|
name: Test API
|
|
command: make test-api
|
|
|
|
- run:
|
|
name: Test Webapp
|
|
command: make test-webapp
|
|
|
|
- run:
|
|
name: Test Functional Webapp
|
|
command: make test-functional-webapp
|
|
|
|
- run:
|
|
name: Shutdown tunnel
|
|
command: killall --wait --quiet sc || true
|
|
|
|
- deploy:
|
|
command: |
|
|
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
|
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
|
make publish
|
|
docker logout
|
|
fi
|