Simplify tests (don't need dotdeb role + force php_version)

freebsd
Emilien Mantel 2016-03-04 07:12:41 +01:00
parent fd3d404c31
commit e257e8bde7
5 changed files with 18 additions and 18 deletions

14
Vagrantfile vendored
View File

@ -6,10 +6,10 @@
Vagrant.configure("2") do |config|
vms = [
[ "jessie-php-5.6", "debian/contrib-jessie64", "192.168.33.88", "php-5.6" ],
[ "jessie-php-7.0", "debian/contrib-jessie64", "192.168.33.89", "php-7.0" ],
[ "stretch-php-5.6", "sharlak/debian_stretch_64", "192.168.33.90", "php-5.6" ],
[ "stretch-php-7.0", "sharlak/debian_stretch_64", "192.168.33.91", "php-7.0" ]
[ "jessie-php-5.6", "debian/contrib-jessie64", "192.168.33.88", "5.6" ],
[ "jessie-php-7.0", "debian/contrib-jessie64", "192.168.33.89", "7.0" ],
[ "stretch-php-5.6", "sharlak/debian_stretch_64", "192.168.33.90", "5.6" ],
[ "stretch-php-7.0", "sharlak/debian_stretch_64", "192.168.33.91", "7.0" ]
]
config.vm.provider "virtualbox" do |v|
@ -24,9 +24,11 @@ Vagrant.configure("2") do |config|
m.vm.provision "ansible" do |ansible|
ansible.playbook = "tests/test.yml"
ansible.groups = { vm[3] => [ vm[0] ] }
ansible.verbose = 'vv'
ansible.sudo = true
ansible.sudo = true
ansible.extra_vars = {
php_version: vm[3]
}
end
end
end

View File

@ -1,5 +1,5 @@
FROM williamyeh/ansible:debian8-onbuild
RUN apt-get update && ansible-galaxy install HanXHX.dotdeb
CMD ["sh", "tests/test.sh", "php-5.6"]
RUN apt-get update
CMD ["sh", "tests/test.sh", "5.6"]

View File

@ -1,5 +1,5 @@
FROM williamyeh/ansible:debian8-onbuild
RUN apt-get update && ansible-galaxy install HanXHX.dotdeb
CMD ["sh", "tests/test.sh", "php-7.0"]
RUN apt-get update
CMD ["sh", "tests/test.sh", "7.0"]

View File

@ -12,7 +12,7 @@ set -ev
# Only for travis
if [ -n "$1" ]
then
ANSIBLE_ARG="--limit $1"
ANSIBLE_ARG="-e 'php_version: $1'"
fi

View File

@ -1,12 +1,5 @@
---
# On Debian Jessie, we need Dotdeb for PHP 7.0
- hosts: php-7.0
roles:
- role: HanXHX.dotdeb
when: >
ansible_distribution_major_version | version_compare(8, 'eq')
- hosts: all
vars:
vhost: 'test.local'
@ -14,6 +7,11 @@
- '{{ php_apt_prefix }}recode'
php_install_xdebug: true
pre_tasks:
- name: APT | Add Dotdeb repository for Jessie + PHP7
apt_repository: repo='deb http://packages.dotdeb.org jessie all' state=present
when: >
ansible_distribution_major_version | version_compare(8, 'eq') and
php_version | version_compare('7.0', 'ge')
- name: APT | Install nginx
apt: pkg=nginx state=present update_cache=yes cache_valid_time=3600
- name: SHELL | Get nginx version