Initial import of feature/zuulv3 ansible roles

We have been using the following ansible roles for testing
feature/zuulv3 of zuul.  This commit copies the roles from zuul
and imports them here.

Change-Id: Ic03634dd02d2eb1fa5aa8a38f4beb5f0ec5582c6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-05-03 14:20:46 -04:00
parent c297d3abcc
commit bc8ca2abfc
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
16 changed files with 111 additions and 0 deletions

View File

@ -0,0 +1,13 @@
---
- name: Check if projects tools/test-setup.sh exists.
stat:
path: "{{ zuul_workspace_root }}/src/{{ zuul.project.canonical_name }}/tools/test-setup.sh"
register: p
- name: Run tools/test-setup.sh.
shell: tools/test-setup.sh
args:
chdir: "{{ zuul_workspace_root }}/src/{{ zuul.project.canonical_name }}"
when:
- p.stat.exists
- p.stat.executable

View File

@ -0,0 +1,22 @@
- name: Ensure console.log does not exist.
file:
path: /tmp/console.log
state: absent
- name: Start zuul_console daemon.
zuul_console:
path: /tmp/console.log
port: 19885
- name: Create workspace directory.
file:
path: "{{ zuul_workspace_root }}"
owner: zuul
group: zuul
state: directory
- name: Synchronize src repos to workspace directory.
synchronize:
dest: "{{ zuul_workspace_root }}"
src: "{{ zuul.executor.src_root }}"
no_log: true

View File

@ -0,0 +1,8 @@
- name: Remove sudo access for zuul user.
become: yes
file:
path: /etc/sudoers.d/zuul-sudo
state: absent
- name: Prove that general sudo access is actually revoked.
shell: ! sudo -n true

View File

@ -0,0 +1,5 @@
---
- name: Run install-distro-packages.sh
shell: /usr/local/jenkins/slave_scripts/install-distro-packages.sh
args:
chdir: "{{ zuul_workspace_root }}/src/{{ zuul.project.canonical_name }}"

View File

@ -0,0 +1,2 @@
---
run_cover_envlist: cover

View File

@ -0,0 +1,4 @@
- name: Execute run-cover.sh.
shell: "/usr/local/jenkins/slave_scripts/run-cover.sh {{ run_cover_envlist }}"
args:
chdir: "{{ zuul_workspace_root }}/src/{{ zuul.project.canonical_name }}"

View File

@ -0,0 +1,2 @@
---
run_docs_envlist: venv

View File

@ -0,0 +1,4 @@
- name: Execute run-docs.sh.
shell: "/usr/local/jenkins/slave_scripts/run-docs.sh {{ run_docs_envlist }}"
args:
chdir: "{{ zuul_workspace_root }}/src/{{ zuul.project.canonical_name }}"

View File

@ -0,0 +1,2 @@
---
run_tarball_envlist: venv

View File

@ -0,0 +1,4 @@
- name: Execute run-tarball.sh.
shell: "/usr/local/jenkins/slave_scripts/run-tarball.sh {{ run_tarball_envlist }}"
args:
chdir: "{{ zuul_workspace_root }}/src/{{ zuul.project.canonical_name }}"

View File

@ -0,0 +1,2 @@
---
run_tox_envlist:

View File

@ -0,0 +1,4 @@
- name: Run tox
shell: "/usr/local/jenkins/slave_scripts/run-tox.sh {{ run_tox_envlist }}"
args:
chdir: "{{ zuul_workspace_root }}/src/{{ zuul.project.canonical_name }}"

View File

@ -0,0 +1,2 @@
---
run_wheel_envlist: venv

View File

@ -0,0 +1,4 @@
- name: Execute run-wheel.sh.
shell: "/usr/local/jenkins/slave_scripts/run-wheel.sh {{ run_wheel_envlist }}"
args:
chdir: "{{ zuul_workspace_root }}/src/{{ zuul.project.canonical_name }}"

2
test-requirements.txt Normal file
View File

@ -0,0 +1,2 @@
hacking>=0.10,<0.11
bashate>=0.2

31
tox.ini Normal file
View File

@ -0,0 +1,31 @@
[tox]
minversion = 1.6
skipsdist = True
envlist = pep8, py27
[testenv]
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
commands =
python setup.py testr --slowest --testr-args='{posargs}'
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test
[testenv:pep8]
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[flake8]
# These are ignored intentionally in openstack-infra projects;
# please don't submit patches that solely correct them or enable them.
ignore = E125,E129,H
show-source = True
exclude = .venv,.tox,dist,doc,build,*.egg