Merge "Add tox deploy job to validate bootstrap process"
This commit is contained in:
commit
82ffd81e5e
|
@ -0,0 +1,19 @@
|
|||
- job:
|
||||
name: windmill-tox-deploy
|
||||
parent: tox
|
||||
run: tests/playbooks/tox/run.yaml
|
||||
nodeset: ubuntu-xenial
|
||||
required-projects:
|
||||
- openstack/ansible-role-diskimage-builder
|
||||
- openstack/ansible-role-gearman
|
||||
- openstack/ansible-role-logrotate
|
||||
- openstack/ansible-role-nodepool
|
||||
- openstack/ansible-role-shade
|
||||
- openstack/ansible-role-ssh
|
||||
- openstack/ansible-role-sudoers
|
||||
- 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"'
|
|
@ -4,3 +4,9 @@
|
|||
- windmill-jobs-fedora-27
|
||||
- windmill-jobs-bionic
|
||||
- windmill-jobs-xenial
|
||||
check:
|
||||
jobs:
|
||||
- windmill-tox-deploy
|
||||
gate:
|
||||
jobs:
|
||||
- windmill-tox-deploy
|
||||
|
|
|
@ -3,3 +3,4 @@ paramiko<2.0.0
|
|||
|
||||
ansible>=2.0.0,<2.4.0
|
||||
bindep
|
||||
netaddr
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# NOTE(pabelanger): In the gate, we want to create a zuul-test user /
|
||||
# group as zuul already exists on our images.
|
||||
zuul_user_name: zuul-test
|
||||
zuul_user_group: zuul-test
|
||||
zuul_user_home: /var/lib/zuul
|
|
@ -0,0 +1,3 @@
|
|||
- hosts: all
|
||||
roles:
|
||||
- tox
|
|
@ -15,4 +15,10 @@
|
|||
|
||||
TOOLSDIR=$(dirname $0)
|
||||
|
||||
# NOTE(pabelanger): Check if we are running in the gate, if so use cached repos
|
||||
# to avoid hitting the network.
|
||||
if [ -f /etc/ci/mirror_info.sh ]; then
|
||||
sed -e "s|https://|file://${HOME}/src/|g" -i $TOOLSDIR/requirements.yaml
|
||||
fi
|
||||
|
||||
ansible-galaxy install -v -r $TOOLSDIR/requirements.yaml -p playbooks/roles
|
||||
|
|
34
tox.ini
34
tox.ini
|
@ -15,28 +15,14 @@ deps = -r{toxinidir}/requirements.txt
|
|||
deps = bindep
|
||||
commands = bindep test
|
||||
|
||||
[testenv:buildimages]
|
||||
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 playbooks/inventory playbooks/build-images.yaml -e ansible_user={env:USER} {posargs}
|
||||
passenv =
|
||||
HOME
|
||||
SSH_AUTH_SOCK
|
||||
USER
|
||||
setenv =
|
||||
ANSIBLE_CONFIG = {toxinidir}/playbooks/ansible.cfg
|
||||
PYTHONUNBUFFERED = 1
|
||||
|
||||
[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/site.yaml -e ansible_user={env:USER} {posargs}
|
||||
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
|
||||
|
@ -45,22 +31,6 @@ setenv =
|
|||
ANSIBLE_CONFIG = {toxinidir}/playbooks/ansible.cfg
|
||||
PYTHONUNBUFFERED = 1
|
||||
|
||||
[testenv:publish-images]
|
||||
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 playbooks/inventory playbooks/build-images.yaml -e ansible_user={env:USER} {posargs}
|
||||
passenv =
|
||||
HOME
|
||||
SSH_AUTH_SOCK
|
||||
USER
|
||||
WORKSPACE
|
||||
setenv =
|
||||
ANSIBLE_CONFIG = {toxinidir}/playbooks/ansible.cfg
|
||||
PYTHONUNBUFFERED = 1
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
|
|
Loading…
Reference in New Issue