Create python-linters job

Here we are creating out first in-repo job configuration for zuulv3.
One of the more simpler jobs we can define is the tox -epep8 job.

Change-Id: I4ecacf1b9ca664a98f06f5b998f19410fa7ea11d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-02-22 13:41:55 -05:00
parent e1e92d677f
commit b52fd51ecd
7 changed files with 53 additions and 0 deletions

12
.zuul.yaml Normal file
View File

@ -0,0 +1,12 @@
- job:
name: python-linters
pre-run: pre
nodes:
- name: worker
image: ubuntu-xenial
- project:
name: openstack-infra/zuul
check:
jobs:
- python-linters

3
playbooks/pre.yaml Normal file
View File

@ -0,0 +1,3 @@
- hosts: all
roles:
- prepare-workspace

View File

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

View File

@ -0,0 +1,3 @@
---
# tasks/main.yaml
prepare_workspace_root: /home/zuul/workspace

View File

@ -0,0 +1,21 @@
- 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: "{{ prepare_workspace_root }}"
owner: zuul
group: zuul
state: directory
- name: Synchronize src repos to workspace directory.
synchronize:
dest: "{{ prepare_workspace_root }}"
src: "{{ zuul.launcher.src_root }}"

View File

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

View File

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