Permalink
Browse files

Add tox ansible-lint, docs and jjb gate jobs

Change-Id: I6212e327367e468f0b7bc7fc84983b519a9588df
  • Loading branch information...
dmsimard committed Dec 6, 2015
1 parent 3f2cce7 commit 839b8a2e022b6a6f675dc9dcd40b6cf334a60741
Showing with 73 additions and 7 deletions.
  1. +22 −1 jenkins/jobs/builders.yaml
  2. +11 −2 jenkins/jobs/main.yaml
  3. +35 −3 jenkins/jobs/templates.yaml
  4. +2 −1 test-requirements.txt
  5. +3 −0 tox.ini
View
@@ -1,5 +1,5 @@
- builder:
name: 'weirdo-gate-builder'
name: 'weirdo-gate-ansible'
builders:
- shining-panda:
build-environment: 'virtualenv'
@@ -26,6 +26,27 @@
exit $result
- builder:
name: 'weirdo-gate-tox'
builders:
- shining-panda:
build-environment: 'virtualenv'
python-version: 'system-CPython-2.7'
nature: 'shell'
clear: true
use-distribute: false
system-site-packages: false
ignore-exit-code: false
command: |
# Ensure tox is installed
pip install tox
# Run {test} from provided jenkins scm gerrit commit ref
pushd weirdo
tox -e {test}
result=$?
exit $result
- builder:
name: 'weirdo-periodic-builder'
builders:
View
@@ -1,12 +1,21 @@
- project:
name: 'weirdo-gate-jobs'
name: 'weirdo-gate-ansible-jobs'
playbook:
- 'puppet-openstack-scenario001'
- 'puppet-openstack-scenario002'
- 'kolla-build-centos-binary'
- 'kolla-deploy-centos-binary'
jobs:
- weirdo-gate-{playbook}
- weirdo-gate-ansible-{playbook}
- project:
name: 'weirdo-gate-tox-jobs'
test:
- 'ansible-lint'
- 'docs'
- 'jjb'
jobs:
- weirdo-gate-tox-{test}
- project:
name: 'weirdo-periodic-jobs'
@@ -1,5 +1,5 @@
- job-template:
name: 'weirdo-gate-{playbook}'
name: 'weirdo-gate-ansible-{playbook}'
defaults: 'weirdo-defaults'
description: |
<p>Managed by Jenkins Job Builder. Do not edit via web.</p>
@@ -18,7 +18,7 @@
pip install -e git+https://github.com/ansible/ansible.git@v2.0.0-0.6.rc1#egg=ansible
# Setup ansible config and run the playbook
pushd $VIRTUALN_ENV/usr/local/share/weirdo
pushd $VIRTUAL_ENV/usr/local/share/weirdo
mv ansible.cfg.example ansible.cfg
ansible-playbook -vv playbooks/{playbook}.yml
result=$?
@@ -31,14 +31,46 @@
scm:
- weirdo-gate-repository
builders:
- weirdo-gate-builder:
- weirdo-gate-ansible:
playbook: '{playbook}'
properties:
- ownership:
owner: dms@redhat.com
publishers:
- email-cores
- job-template:
name: 'weirdo-gate-tox-{test}'
defaults: 'weirdo-defaults'
description: |
<p>Managed by Jenkins Job Builder. Do not edit via web.</p>
<br>
<p>This job gates against commits done to <a href="https://github.com/redhat-openstack/weirdo" target="_blank">WeIRDO</a>.</p>
<p>It leverages tox for testing.</p>
<br>
This is what this job runs:
<pre>
# Run {test} from provided jenkins scm gerrit commit ref
pushd weirdo
tox -e {test}
result=$?
exit $result
</pre>
triggers:
- weirdo-gate-trigger
scm:
- weirdo-gate-repository
builders:
- weirdo-gate-tox:
test: '{test}'
properties:
- ownership:
owner: dms@redhat.com
publishers:
- email-cores
- job-template:
name: 'weirdo-periodic-{playbook}'
defaults: 'weirdo-defaults'
View
@@ -2,4 +2,5 @@ sphinx
sphinx-rtd-theme
ansible
ansible-lint
graphviz
graphviz
jenkins-job-builder
View
@@ -15,3 +15,6 @@ commands = python setup.py build_sphinx
[testenv:ansible-lint]
whitelist_externals = bash
commands = bash -c "for file in $(ls {toxinidir}/playbooks/*.yml); do ansible-lint $file; done"
[testenv:jjb]
commands = jenkins-jobs test {toxinidir}/jenkins/jobs

0 comments on commit 839b8a2

Please sign in to comment.