Reorganize travis-ci file to use Docker container for tests
This commit is contained in:
Родитель
0c7d650060
Коммит
3d77ab24f8
17
.travis.yml
17
.travis.yml
|
@ -7,21 +7,24 @@ dist: trusty
|
|||
|
||||
env:
|
||||
- ANSIBLE_VERSION=2.2.0.0
|
||||
|
||||
- ANSIBLE_VERSION=2.1.3.0
|
||||
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
## Create Docker with Ansible modules and all dependancies
|
||||
- docker build --build-arg ver_ansible=$ANSIBLE_VERSION -t juniper/pyez-ansible:travis .
|
||||
## Install Ansible locally for Ravello and install Roles
|
||||
- pip install -q ansible==$ANSIBLE_VERSION
|
||||
- cd tests
|
||||
- ansible-galaxy install Juniper.junos -p ./roles
|
||||
- pip install ansible junos-eznc lxml jxmlease markupsafe requests httplib2
|
||||
- mkdir library
|
||||
- git clone https://github.com/Juniper/ravello-ansible.git library/ravello-ansible
|
||||
- pip install -r library/ravello-ansible/requirements.txt
|
||||
- mv .travis_ansible_python.yaml group_vars/all/travis_ansible_python.yaml
|
||||
|
||||
script:
|
||||
## Start Virtual topology on Ravello with 2 VQFX and collect IP addresses
|
||||
- ansible-playbook -i ravello.ini pb.rav.token.create-deploy.yaml
|
||||
- ansible-playbook -i ravello.ini pb.rav.token.fqdn_get.yaml
|
||||
## Execute Tests
|
||||
- ansible-playbook -i ravello.ini pb.junos_ping.yaml
|
||||
- ansible-playbook -i ravello.ini pb.junos_jsnapy.yaml
|
||||
|
||||
## Execute Tests with Docker
|
||||
- docker run -t -i -v $(pwd):/project juniper/pyez-ansible:travis ansible-playbook -i local.ini pb.junos_ping.yaml
|
||||
- docker run -t -i -v $(pwd):/project juniper/pyez-ansible:travis ansible-playbook -i local.ini pb.junos_jsnapy.yaml
|
||||
|
|
Загрузка…
Ссылка в новой задаче