Skip to content
Permalink
0.x
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
sudo: required
env:
# CentOS 6: Not supported yet.
#- distribution: centos
# version: 6
# init: /sbin/init
# run_opts: ""
# Ubuntu 12.04: Not supported yet.
#- distribution: ubuntu
# version: 12.04
# init: /sbin/init
# run_opts: ""
- test: CentOS 7 Apache
distribution: centos
version: 7
init: /usr/lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
script_opts: "--server-webserver=apache"
- test: CentOS 7 NGINX
distribution: centos
version: 7
init: /usr/lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
script_opts: "--server-webserver=nginx"
- test: Ubuntu 14.04 Apache
distribution: ubuntu
version: 14.04
init: /sbin/init
run_opts: ""
script_opts: "--server-webserver=apache"
- test: Ubuntu 14.04 Nginx
distribution: ubuntu
version: 14.04
init: /sbin/init
run_opts: ""
script_opts: "--server-webserver=nginx"
addons:
hosts:
- devshop.travis
- dev.projectname.devshop.travis
- live.projectname.devshop.travis
services:
- docker
before_install:
# Pull container
- 'sudo docker pull ${distribution}:${version}'
# Customize container
- 'sudo docker build --rm=true --file=tests/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests'
script:
- container_id=$(mktemp)
# Run container in detached state
- 'sudo docker run --detach --name devshop_container --volume="${PWD}":/usr/share/devshop:rw ${run_opts} -h devshop.travis --add-host "dev.projectname.devshop.travis live.projectname.devshop.travis":127.0.0.1 ${distribution}-${version}:ansible "${init}" > "${container_id}"'
# Ansible syntax check.
- 'sudo docker exec --tty devshop_container env TERM=xterm ansible-playbook /usr/share/devshop/playbook.yml --syntax-check'
# Install script.
- 'sudo docker exec --tty devshop_container env TRAVIS=true TERM=xterm /usr/share/devshop/install.sh ${script_opts} --hostname=devshop.travis'
# Hostmaster Status
- 'sudo docker exec devshop_container env TERM=xterm sudo su - aegir -c "drush @hostmaster status"'
# Turn off hosting queued, and the hosting task queue.
- 'sudo docker exec devshop_container env sudo su - aegir -c "drush @hostmaster dis hosting_queued -y -v"'
- 'sudo docker exec devshop_container env sudo su - aegir -c "drush @hostmaster vset hosting_queue_tasks_enabled 0 -y"'
# Build and Run Tests
- 'sudo docker exec devshop_container env TERM=xterm sudo su - -c "cd /usr/share/devshop/tests && composer update"'
- 'sudo docker exec devshop_container env TERM=xterm sudo su - aegir -c "devshop devmaster:test"'
# Stop container.
- 'sudo docker stop devshop_container'