Merge "Add generic tox job (multiple playbooks)" into feature/zuulv3

This commit is contained in:
Jenkins 2017-03-13 23:02:20 +00:00 committed by Gerrit Code Review
commit df8b742356
12 changed files with 70 additions and 22 deletions

View File

@ -1,15 +1,37 @@
- job:
name: python-linters
pre-run: pre
post-run: post
name: base
pre-run: base-pre
post-run: base-post
success-url: http://zuulv3-dev.openstack.org/logs/{build.uuid}/
failure-url: http://zuulv3-dev.openstack.org/logs/{build.uuid}/
timeout: 1800
nodes:
- name: worker
- name: ubuntu-xenial
image: ubuntu-xenial
- job:
name: tox
parent: base
pre-run: tox-pre
post-run: tox-post
- job:
name: tox-cover
parent: tox
voting: false
- job:
name: tox-linters
parent: tox
- job:
name: tox-py27
parent: tox
- project:
name: openstack-infra/zuul
check:
jobs:
- python-linters
- tox-cover
- tox-linters
- tox-py27

View File

@ -6,13 +6,7 @@
mode: pull
src: "/tmp/console.log"
- name: Collect tox logs.
synchronize:
dest: "{{ zuul.launcher.log_root }}/tox"
mode: pull
src: "/home/zuul/workspace/src/{{ zuul.project }}/.tox/pep8/log/"
- name: publish tox logs.
- name: Publish logs.
copy:
dest: "/opt/zuul-logs/{{ zuul.uuid}}"
src: "{{ zuul.launcher.log_root }}/"

View File

@ -1,7 +0,0 @@
- hosts: all
tasks:
- name: Run a tox -e pep8.
include_role:
name: run-tox
vars:
run_tox_eventlist: pep8

View File

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

View File

@ -1,3 +1,2 @@
---
# tasks/main.yaml
run_tox_eventlist:
run_tox_envlist:

View File

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

5
playbooks/tox-cover.yaml Normal file
View File

@ -0,0 +1,5 @@
- hosts: all
vars:
run_tox_envlist: cover
roles:
- run-tox

View File

@ -0,0 +1,5 @@
- hosts: all
vars:
run_tox_envlist: pep8
roles:
- run-tox

17
playbooks/tox-post.yaml Normal file
View File

@ -0,0 +1,17 @@
- hosts: all
tasks:
- name: Find tox directories to synchrionize.
find:
file_type: directory
paths: "/home/zuul/workspace/src/{{ zuul.project }}/.tox"
# NOTE(pabelanger): The .tox/log folder is empty, ignore it.
patterns: ^(?!log).*$
use_regex: yes
register: result
- name: Collect tox logs.
synchronize:
dest: "{{ zuul.launcher.log_root }}/tox"
mode: pull
src: "{{ item.path }}/log/"
with_items: "{{ result.files }}"

3
playbooks/tox-pre.yaml Normal file
View File

@ -0,0 +1,3 @@
- hosts: all
roles:
- run-bindep

5
playbooks/tox-py27.yaml Normal file
View File

@ -0,0 +1,5 @@
- hosts: all
vars:
run_tox_envlist: py27
roles:
- run-tox