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:
parent
e1e92d677f
commit
b52fd51ecd
12
.zuul.yaml
Normal file
12
.zuul.yaml
Normal 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
3
playbooks/pre.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- prepare-workspace
|
7
playbooks/python-linters.yaml
Normal file
7
playbooks/python-linters.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Run a tox -e pep8.
|
||||
include_role:
|
||||
name: run-tox
|
||||
vars:
|
||||
run_tox_eventlist: pep8
|
3
playbooks/roles/prepare-workspace/defaults/main.yaml
Normal file
3
playbooks/roles/prepare-workspace/defaults/main.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
# tasks/main.yaml
|
||||
prepare_workspace_root: /home/zuul/workspace
|
21
playbooks/roles/prepare-workspace/tasks/main.yaml
Normal file
21
playbooks/roles/prepare-workspace/tasks/main.yaml
Normal 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 }}"
|
3
playbooks/roles/run-tox/defaults/main.yaml
Normal file
3
playbooks/roles/run-tox/defaults/main.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
# tasks/main.yaml
|
||||
run_tox_eventlist:
|
4
playbooks/roles/run-tox/tasks/main.yaml
Normal file
4
playbooks/roles/run-tox/tasks/main.yaml
Normal 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 }}"
|
Loading…
Reference in New Issue
Block a user