---
language: python
python: "2.7"

sudo: required
services:
  - docker

matrix:
  fast_finish: true

env:
  - TEST_RUN="ansible-playbook -i herp, bastion.yml install-ci.yml provision.yml tests/validate-ci.yml --syntax-check"
  - TEST_RUN="ansible-playbook -i inventory/allinone bastion.yml install-ci.yml tests/validate-ci.yml -c docker -vv -e @secrets.yml.example -e ansible_become=no --skip-tags ddapi"

before_install:
- docker pull ubuntu:xenial
- docker run -d --name allinone --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro ubuntu:xenial systemd
- docker exec -i allinone apt-get update
- docker exec -i allinone apt-get install -y python-apt ca-certificates apt-transport-https sudo

install:
  - pip install ansible

script: "$TEST_RUN"

---
language: python
python: "2.7"

sudo: required
services:
  - docker

matrix:
  fast_finish: true

env:
  - TEST_RUN="ansible-playbook -i herp, bastion.yml install-ci.yml provision.yml tests/validate-ci.yml --syntax-check"
  - TEST_RUN="ansible-playbook -i inventory/allinone bastion.yml install-ci.yml tests/validate-ci.yml -c docker -vv -e @secrets.yml.example -e ansible_become=no --skip-tags ddapi"
  - TEST_RUN="ansible-playbook -i inventory/allinone install-ci.yml tests/validate-ci.yml -c docker -vv -e @secrets.yml.example -e ansible_become=no --skip-tags ddapi"

before_install:
- docker pull ubuntu:xenial
- docker run -d --name allinone --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro ubuntu:xenial systemd
- docker exec -i allinone apt-get update
- docker exec -i allinone apt-get install -y python-apt ca-certificates apt-transport-https sudo

install:
  - pip install ansible

script: "$TEST_RUN"

Add a test that just does ci all in one
Add a test that just does ci all in one

We were mixing bastion and ci in the same allinone host, which was
masking errors in the ci plays. This splits out the ci into it's own
stand alone test.

Later PRs will split things further making individual containers for
zuul and nodepool for more segregated testing.
