.travis.yml 2.33 KB
Newer Older
1 2 3 4 5 6
language: php
php:
  - '5.5'  # Ubuntu Trusty default
  - '5.6'  # MacOS default
  - '7.0'
  - '7.1'
7 8 9

sudo: required

10
services:
11
  - docker
12

13 14 15
# Only run test when committing to master branch.
branches:
  only:
Jon Pugh's avatar
Jon Pugh committed
16
    - 7.x-3.x
17
    - 4.x
18 19 20

env:
  global:
21 22
#    - AEGIR_HOSTING_VERSION=7.x-3.x
#    - AEGIR_TESTS_VERSION=master
23 24 25

addons:
  hosts:
26
    - provision.local.computer
27

28 29
#services:
#  - docker
30

31 32 33
before_install:
  - docker run --name provision_db -e MYSQL_ROOT_PASSWORD=root -d -p 3307:3306 mariadb

34 35 36
install:
  - composer install
  - sudo ln -s $PWD/bin/provision /usr/local/bin/provision
37
  - mkdir /home/travis/config
38
  - ls -la
39 40 41

script:

42
  - provision
43
  - provision status -n
44 45

  # Add server context.
46 47 48
  - provision save server_master -n
    --context_type=server
    --remote_host=provision.local.computer
49 50
    --aegir_root=/var/aegir
    --script_user=aegir
51 52
    --master_url=provision.local.computer

Jon Pugh's avatar
Jon Pugh committed
53 54
  # Add services to server_master context.
  - provision services server_master add http -n
55
    --service_type=apacheDocker
Jon Pugh's avatar
Jon Pugh committed
56 57 58 59
    --http_port=80
    --web_group=www-data
    --web_disable_url=http://localhost/disabled
    --web_maintenance_url=http://localhost/maintenance
Jon Pugh's avatar
Jon Pugh committed
60
    --restart_command="sudo apache2ctl graceful"
Jon Pugh's avatar
Jon Pugh committed
61 62 63

  - provision services server_master add db -n
    --service_type=mysql
64
    --master_db="mysql://root:root@0.0.0.0:3307"
Jon Pugh's avatar
Jon Pugh committed
65 66 67 68
    --db_grant_all_hosts=0

  - provision services server_master

69 70 71 72
  # Add platform context
  - provision save platform_hostmaster -n
    --context_type=platform
    --root=/home/travis/hostmaster
73
    --server_http=server_master
74
    --makefile=https://raw.githubusercontent.com/aegir-project/provision/4.x/aegir.make
75 76
    --make_working_copy=1

77 78 79
  # Add site context
  - provision save hostmaster -n
    --context_type=site
80
    --platform=platform_hostmaster
Jon Pugh's avatar
Jon Pugh committed
81
    --server_db=server_master
82 83 84
    --uri=provision.local.computer
    --language=en
    --profile=hostmaster
85 86 87
    --db_name=drupal
    --db_user=drupal
    --db_password=drupal
88

89
  - provision status -n
90 91 92
  - provision status server_master
  - provision status platform_hostmaster
  - provision status hostmaster
93 94 95


  - provision verify server_master -v
96 97
  - provision verify platform_hostmaster -v
  - provision verify hostmaster -v
98 99
  
  - provision verify server_master
100 101

  - docker ps
102
  - docker logs provision_http_server_master
103
  - docker exec provision_http_server_master sudo apache2ctl -S