Add windmill-tox-ubuntu-xenial
This refactors the existing windmill-tox-deploy job. We are basically removing a lot of the logic from tox -edeploy and just using the venv environment from tox. It is very much possible we may remove the dependency on tox in the future. Change-Id: I29a1b06c4e02e3c5f588135042f77ccc4a031a7d Signed-off-by: Paul Belanger <pabelanger@redhat.com>changes/49/559849/13
parent
0c6650d157
commit
0a1b5f5834
|
@ -1,7 +1,7 @@
|
|||
- job:
|
||||
name: windmill-tox-deploy
|
||||
parent: tox
|
||||
run: tests/playbooks/tox/run.yaml
|
||||
name: windmill-tox-ubuntu-xenial
|
||||
pre-run: tests/playbooks/pre.yaml
|
||||
run: tests/playbooks/run.yaml
|
||||
nodeset: ubuntu-xenial
|
||||
required-projects:
|
||||
- openstack/ansible-role-diskimage-builder
|
||||
|
@ -15,6 +15,3 @@
|
|||
- openstack/ansible-role-virtualenv
|
||||
- openstack/ansible-role-zookeeper
|
||||
- openstack/ansible-role-zuul
|
||||
vars:
|
||||
tox_envlist: deploy
|
||||
tox_extra_args: '-vv -- --extra-vars "@tests/extra-vars.yaml"'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- windmill-jobs-xenial
|
||||
check:
|
||||
jobs:
|
||||
- windmill-tox-deploy
|
||||
- windmill-tox-ubuntu-xenial
|
||||
gate:
|
||||
jobs:
|
||||
- windmill-tox-deploy
|
||||
- windmill-tox-ubuntu-xenial
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
- hosts: all
|
||||
tasks:
|
||||
- name: Bootstrap tox environment
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
command: tox -evenv --notest
|
||||
|
||||
- name: Install bindep dependendies
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
executable: /bin/bash
|
||||
shell: source .tox/venv/bin/activate; ./tools/install_bindep.sh
|
||||
|
||||
- name: Install ansible roles via galaxy
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
executable: /bin/bash
|
||||
shell: source .tox/venv/bin/activate; ./tools/install_roles.sh
|
|
@ -0,0 +1,11 @@
|
|||
- hosts: all
|
||||
tasks:
|
||||
- name: Bootstrap bastion node using ansible
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
shell: tox -evenv -- ansible-playbook -i inventory/single-node playbooks/bastion.yaml
|
||||
|
||||
- name: Run ansible-playbook
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
shell: tox -evenv -- ansible-playbook -i inventory/single-node playbooks/site.yaml --extra-vars "@tests/extra-vars.yaml"
|
|
@ -1,3 +0,0 @@
|
|||
- hosts: all
|
||||
roles:
|
||||
- tox
|
23
tox.ini
23
tox.ini
|
@ -15,22 +15,6 @@ deps = -r{toxinidir}/requirements.txt
|
|||
deps = bindep
|
||||
commands = bindep test
|
||||
|
||||
[testenv:deploy]
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
commands =
|
||||
{toxinidir}/tools/install_bindep.sh
|
||||
{toxinidir}/tools/install_roles.sh
|
||||
# NOTE(pabelanger): Because ansible default ansible_user to null now, we need to pass it via CLI.
|
||||
ansible-playbook -i inventory/single-node playbooks/bastion.yaml {posargs}
|
||||
ansible-playbook -i inventory/single-node playbooks/site.yaml {posargs}
|
||||
passenv =
|
||||
HOME
|
||||
SSH_AUTH_SOCK
|
||||
USER
|
||||
setenv =
|
||||
ANSIBLE_CONFIG = {toxinidir}/playbooks/ansible.cfg
|
||||
PYTHONUNBUFFERED = 1
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
|
@ -43,6 +27,13 @@ commands =
|
|||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
passenv =
|
||||
HOME
|
||||
SSH_AUTH_SOCK
|
||||
USER
|
||||
setenv =
|
||||
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
|
||||
PYTHONUNBUFFERED = 1
|
||||
|
||||
[flake8]
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
|
Loading…
Reference in New Issue