Merge "Test gitea project creation playbook"

This commit is contained in:
Zuul 2019-03-06 21:17:35 +00:00 committed by Gerrit Code Review
commit c5611561ea
4 changed files with 37 additions and 1 deletions

View File

@ -521,6 +521,8 @@
label: ubuntu-bionic
- name: gitea01.opendev.org
label: ubuntu-bionic
vars:
run_base_test_playbook: playbooks/zuul/test-gitea.yaml
host-vars:
gitea01.opendev.org:
host_copy_output:

View File

@ -69,6 +69,9 @@
command: ansible localhost -m debug -a 'var=groups'
- name: Run base.yaml
command: ansible-playbook -v /home/zuul/src/git.openstack.org/openstack-infra/system-config/playbooks/base.yaml
- name: Run test playbook
when: run_base_test_playbook is defined
shell: "ANSIBLE_ROLES_PATH=/home/zuul/src/git.openstack.org/openstack-infra/system-config/playbooks/roles ansible-playbook -v /home/zuul/src/git.openstack.org/openstack-infra/system-config/{{ run_base_test_playbook }}"
- name: Run testinfra to validate configuration
include_role:
name: tox

View File

@ -0,0 +1,30 @@
- hosts: "localhost"
name: "Setup test project data"
vars:
projects:
- project: opendev/base-jobs
description: Zuul configuration common to all OpenDev tenants
tasks:
- name: Create test project-config directory
file:
path: "/opt/project-config/gerrit/"
state: directory
- name: Write test project configuration
copy:
dest: "/opt/project-config/gerrit/projects.yaml"
content: "{{ projects }}"
- hosts: "gitea"
name: "Create repos on gitea servers"
strategy: free
max_fail_percentage: 1
roles:
- role: gitea-git-repos
- hosts: "gitea"
tasks:
- name: Test project was created in gitea
uri:
url: "https://localhost:3000/opendev/base-jobs"
validate_certs: false
status_code: 200

View File

@ -24,7 +24,8 @@ commands =
# We often deploy latest pip packages
bash -c "find roles playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
ansible-lint -x ANSIBLE0004 -x ANSIBLE0006 -x ANSIBLE0007 -x ANSIBLE0010 \
-x ANSIBLE0011 -x ANSIBLE0012 -x ANSIBLE0013 -x ANSIBLE0015"
-x ANSIBLE0011 -x ANSIBLE0012 -x ANSIBLE0013 -x ANSIBLE0015 \
-x 304"
[testenv:venv]
commands = {posargs}