Merge "Add generic tox job (multiple playbooks)" into feature/zuulv3
This commit is contained in:
commit
df8b742356
32
.zuul.yaml
32
.zuul.yaml
@ -1,15 +1,37 @@
|
|||||||
- job:
|
- job:
|
||||||
name: python-linters
|
name: base
|
||||||
pre-run: pre
|
pre-run: base-pre
|
||||||
post-run: post
|
post-run: base-post
|
||||||
success-url: http://zuulv3-dev.openstack.org/logs/{build.uuid}/
|
success-url: http://zuulv3-dev.openstack.org/logs/{build.uuid}/
|
||||||
failure-url: http://zuulv3-dev.openstack.org/logs/{build.uuid}/
|
failure-url: http://zuulv3-dev.openstack.org/logs/{build.uuid}/
|
||||||
|
timeout: 1800
|
||||||
nodes:
|
nodes:
|
||||||
- name: worker
|
- name: ubuntu-xenial
|
||||||
image: 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:
|
- project:
|
||||||
name: openstack-infra/zuul
|
name: openstack-infra/zuul
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- python-linters
|
- tox-cover
|
||||||
|
- tox-linters
|
||||||
|
- tox-py27
|
||||||
|
@ -6,13 +6,7 @@
|
|||||||
mode: pull
|
mode: pull
|
||||||
src: "/tmp/console.log"
|
src: "/tmp/console.log"
|
||||||
|
|
||||||
- name: Collect tox logs.
|
- name: Publish logs.
|
||||||
synchronize:
|
|
||||||
dest: "{{ zuul.launcher.log_root }}/tox"
|
|
||||||
mode: pull
|
|
||||||
src: "/home/zuul/workspace/src/{{ zuul.project }}/.tox/pep8/log/"
|
|
||||||
|
|
||||||
- name: publish tox logs.
|
|
||||||
copy:
|
copy:
|
||||||
dest: "/opt/zuul-logs/{{ zuul.uuid}}"
|
dest: "/opt/zuul-logs/{{ zuul.uuid}}"
|
||||||
src: "{{ zuul.launcher.log_root }}/"
|
src: "{{ zuul.launcher.log_root }}/"
|
@ -1,7 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
tasks:
|
|
||||||
- name: Run a tox -e pep8.
|
|
||||||
include_role:
|
|
||||||
name: run-tox
|
|
||||||
vars:
|
|
||||||
run_tox_eventlist: pep8
|
|
5
playbooks/roles/run-bindep/tasks/main.yaml
Normal file
5
playbooks/roles/run-bindep/tasks/main.yaml
Normal 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 }}"
|
@ -1,3 +1,2 @@
|
|||||||
---
|
---
|
||||||
# tasks/main.yaml
|
run_tox_envlist:
|
||||||
run_tox_eventlist:
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
- name: Run tox
|
- 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:
|
args:
|
||||||
chdir: "/home/zuul/workspace/src/{{ zuul.project }}"
|
chdir: "/home/zuul/workspace/src/{{ zuul.project }}"
|
||||||
|
5
playbooks/tox-cover.yaml
Normal file
5
playbooks/tox-cover.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
- hosts: all
|
||||||
|
vars:
|
||||||
|
run_tox_envlist: cover
|
||||||
|
roles:
|
||||||
|
- run-tox
|
5
playbooks/tox-linters.yaml
Normal file
5
playbooks/tox-linters.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
- hosts: all
|
||||||
|
vars:
|
||||||
|
run_tox_envlist: pep8
|
||||||
|
roles:
|
||||||
|
- run-tox
|
17
playbooks/tox-post.yaml
Normal file
17
playbooks/tox-post.yaml
Normal 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
3
playbooks/tox-pre.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- run-bindep
|
5
playbooks/tox-py27.yaml
Normal file
5
playbooks/tox-py27.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
- hosts: all
|
||||||
|
vars:
|
||||||
|
run_tox_envlist: py27
|
||||||
|
roles:
|
||||||
|
- run-tox
|
Loading…
Reference in New Issue
Block a user