forked from opendevshop/devshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
133 lines (112 loc) · 4.34 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
language: php
sudo: required
# Only run tests when committing to our primary branch and pull requests.
branches:
only:
- 1.x
#
#env:
# matrix:
# - test="Upgrade"
# distribution="ubuntu"
# version="14.04"
# init="/sbin/init"
# run_opts=""
# install_command="bash /usr/share/devshop/tests/test-upgrade.sh 1.0.0-beta10"
# test_command="devshop devmaster:test"
# - test="CentOS 7 Apache"
# distribution="centos"
# version="7"
# init="/usr/lib/systemd/systemd"
# run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
# install_command="/usr/share/devshop/install.sh --server-webserver=apache --hostname=devshop.travis"
# test_command="devshop devmaster:test"
#
# - test="Ubuntu 14.04 Apache"
# distribution="ubuntu"
# version="14.04"
# init="/sbin/init"
# run_opts=""
# install_command="/usr/share/devshop/install.sh --server-webserver=apache --hostname=devshop.travis"
# test_command="devshop devmaster:test"
# TODO: Get NGINX support to work.
# - test: Ubuntu 14.04 Nginx
# distribution: ubuntu
# version: 14.04
# init: /sbin/init
# run_opts: ""
# script: "--server-webserver=nginx"
# This should match the list of hosts below so that requests resolve to the container.
env:
global:
- DEVSHOP_VERSION=1.x
- SITE_HOSTS='dev.drup.devshop.travis dev.projectname.devshop.travis live.projectname.devshop.travis testenv.drpl8.devshop.travis dev.rootproject.devshop.local.computer'
matrix:
- test="Upgrade"
COMMAND="robo up --test-upgrade"
UPGRADE_FROM_VERSION="1.0.0-beta10"
- test="Install with Docker"
COMMAND="robo up --test"
- test="Install with Ansible on Ubuntu 14.04 with Apache"
COMMAND="robo up --mode=install.sh --test"
# - test="Install with Ansible on Ubuntu 14.04 with NGINX"
# COMMAND="robo up --mode=install.sh --test --install-sh-options='--server-webserver=nginx'"
- test="Install with Ansible on CentOS 7"
COMMAND="robo up --mode=install.sh --install-sh-image=geerlingguy/docker-centos7-ansible --test"
# - test="Install with Ansible on Fedora 25"
# COMMAND="robo up --mode=install.sh --install-sh-image=centos:7 --test"
addons:
hosts:
- devshop.travis
- dev.projectname.devshop.travis
- live.projectname.devshop.travis
- dev.drpl8.devshop.travis
- testenv.drpl8.devshop.travis
- dev.rootproject.devshop.local.computer
services:
- docker
before_install:
- env
- id -u
- docker --version
- docker-compose --version
# Install Robo
- wget https://github.com/consolidation/Robo/releases/download/1.0.5/robo.phar
- sudo mv robo.phar /usr/local/bin/robo
- sudo chmod +x /usr/local/bin/robo
# Install Drush
- wget https://github.com/drush-ops/drush/releases/download/8.1.9/drush.phar
- sudo mv drush.phar /usr/local/bin/drush
- sudo chmod +x /usr/local/bin/drush
# Prepare devshop CLI.
- composer install
script:
# Launch devshop including preparing the source code.
- echo "Running ${COMMAND} -n ..."
- ${COMMAND} -n
#
# # 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 "${SITE_HOSTS}":127.0.0.1 ${distribution}-${version}:ansible "${init}" > "${container_id}"'
#
# # Install script.
# - 'sudo docker exec devshop_container env TRAVIS=true TERM=xterm TRAVIS_BRANCH=$TRAVIS_BRANCH TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG TRAVIS_PULL_REQUEST_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH ${install_command}'
#
# # 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"'
#
# - echo "Running ${test_command}"
# - sudo docker exec devshop_container env TERM=xterm sudo su - aegir -c "${test_command}"
#
# # Stop container.
# - 'sudo docker stop devshop_container'