23 Commits

Author SHA1 Message Date
James E. Blair
4f39642446 Update zuul ansible location
With multi-ansible support, the location of the zuul plugins/modules
has moved.

Change-Id: I8e2cf1f2276bca5a912fed52062628b3b9d0d6d9
2019-03-18 10:13:06 -07:00
Paul Belanger
3a34c2b0ab Set ANSIBLE_ACTION_PLUGINS for linters
The zuul_return plugin was recently converted to an action plugin, make
sure we also export that path for ansible-lint.

Change-Id: I775e902f3c9f72c655b94b71293565e3e044d15c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-18 17:47:13 -05:00
Monty Taylor
d07d6d65ef
Add zuul to test-requirements for linting
The linters env is picking up zuul-jobs content too, so we need to add
zuul to get the zuul_ modules ... otherwise ansible-lint has a sad.

Add zuul to test-requirements like is done in zuul-jobs. Then point the
library path to zuul/ansible/library in the site-packages dir from tox
so that we pick up the right files.

Change-Id: I7a4f0159290d67354e0a73365091a0d1718762fd
2018-10-18 10:40:00 -05:00
Vu Cong Tuan
64d242747f Remove testr
We're not using testr or stestr anywhere in this project,
this environment is unused.
Therefore, we should remove testr completely.

Change-Id: I50cf179487f3bea69e57d3a0ab2be4eb6b65423d
2018-07-11 08:08:59 +07:00
Colleen Murphy
665704e3dc Fix ansible-lint job
The ansible-linter was only running on playbooks, not on roles. This
patch corrects the tox environment to ensure that roles are linted.

Since roles weren't being linted, some errors had sneaked through. This
patch also corrects an unnamed task and disables linting of a task that
deliberately uses the shell module.

Also fix a comment in the tox file that was referencing a non-existent
zuul job.

Change-Id: I5b1ca3947e80588ab0cc8d3632f1292fc707aac1
2018-03-28 23:24:07 +02:00
Paul Belanger
f769c9d0f4 Create openstack-zuul-jobs-linters jobs
This will be a cross repo linter jobs for openstack-zuul-jobs,
project-config and zuul-jobs.

Each repo will be able to run this job, which sets up all our projects
roles in the correct locations.

Depends-On: I59e5d41a9539671ee5aab9b9036379eb9101d021
Change-Id: I16186c929e7d0e6e34b35271559e555255a52b00
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-10-24 06:37:20 +00:00
Monty Taylor
33b820a035
Remove spurious change to tox.ini
This snuck in while debugging something else.

Change-Id: I2cdb619f420583fbdb75ae9b356f7badc7d22099
2017-09-29 15:24:51 -05:00
Monty Taylor
2c2f0e11cc
Update ubuntu-xenial-2-node to match centos-7-2-node
In the other places subnodes is a group and there is a node called
secondary put in to it. It shouldn't matter, but as centos-7-2-node and
ubuntu-xenial-2-node are defined differently it could cause someone to
be confused or think there is a reason for the divergence.

Change-Id: Icd28da7c1c20b605841cd27f4f656e4b8f812fee
2017-09-29 11:43:34 -05:00
Monty Taylor
bf16abfd7c
Stop running ansible-lint on playbooks
It can't handle the following form:

  shell:
    cmd: |
      something

Which is both valid and required.

Change-Id: I14896450b16f8e65128804b44a643da63580812d
2017-09-28 14:38:29 -05:00
Jesse Keating
a85b54e08d Remove gratuitous use of xargs
Find can do the thing we want it to do without involving xargs. The
-exec {} + construct will put all the found files into one long set of
arguments (up to the limit, at which point additional commands will be
constructed). Failures of exec will result in nonzero return of find.

Change-Id: I4427a259df29c3f31581c7452cd0cf5e1bc78416
Signed-off-by: Jesse Keating <omgjlk@us.ibm.com>
2017-09-27 11:32:00 -07:00
James E. Blair
94833e22d2 Run ansible-list on all playbooks simultaneously
Change-Id: I009f8bf0b66d49e78cd60f95decccf089ef46784
2017-09-26 14:25:20 -07:00
James E. Blair
1f1ef0aba8 Check all playbooks simultaneously
Change-Id: I04aa1e843cbd08a97abeb03dc55add7219358ab3
2017-09-26 14:25:18 -07:00
Monty Taylor
a3139c4bb5 Migrate jobs from zuulv2 to zuulv3
This is the result of having run the zuul migration tool.

Depends-On: I72687a56285a3d733a9adeaf3dc037a1ac95efd3
Change-Id: Ib511da75908e152e72fdf0d7b496f4fa98f9c223
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-26 15:02:59 -04:00
Paul Belanger
f67d09d315 Create publish-openstack-python(-branch)-tarball jobs
These 2 jobs will be used to copy release / branch tarballs to
tarballs.o.o.

Branch tarballs will only copy *.tar.gz, while release jobs will copy
both *.tar.gz and *.whl files.

Change-Id: Ic879302a2006b737ee4364cea067a00ebe198951
Depends-On: Ia79802dd386dbf1287af16a59985ce99a7dd4899
Depends-On: Ic7fc31a372de29a3a97ef84539faf3b0a1d6e181
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-10 13:19:08 -04:00
Paul Belanger
0d5c11029a Setup ANSIBLE_ROLES_PATH in tox.ini
It is possible we are going to depend on roles in other repos (like
the next patch). Move this to using an environmental variable to make
it easier to depend on external roles.

Change-Id: Ia90ac5674188d38a6a749c92de957430d5a5403c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-07 16:15:11 -04:00
Paul Belanger
dc767038eb Set basepython to python3
We are running zuulv3 under python3, so it make sense to ensure
ansible dependencies are also testing with python3.

Change-Id: I2d011d62c1d5192c0f309e37c2d30c8598cce359
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-07 16:13:30 -04:00
Paul Belanger
1d265e48f6
Rename pep8 to linters for tox
Using linters makes more sense, for playbooks / roles. Make the
switch.

Change-Id: Ib5a4f7409276aa832783f1d217530b5249313611
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-17 13:18:21 -04:00
Paul Belanger
ea35d7ffc9
Include ansible-playbook syntax-check for tox pep8
Syntax check our playbooks / roles when we run pep8. This way we can
quickly tests if our playbooks are valid.

Change-Id: I2f4e3f617922c8578adb53e2c4a418488fcf230b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-17 13:18:19 -04:00
Paul Belanger
c0c9653ab5
Ensure we load roles for linting
Did didn't have ansible-lint setup properly, as a results our roles
weren't actually linted properly.

Switch run-docs to command task, since we are not using any shell
variables.

Ignore ANSIBLE0012 for now.

Change-Id: Id184f7eb5dd67117e7dde9c8eb38a3a8af9dd892
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-17 13:18:17 -04:00
Paul Belanger
c913d42c39
Run ansible-lint under pep8 envlist
Start linting our ansible playbooks, this is helpful to find basic
syntax / formatting errors.

Change-Id: I147a303841ac70ee59177c56d24758e73c04205b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-22 16:50:20 -04:00
Paul Belanger
2fe384f6cb
Remove tox -epy27 envlist
We currently don't have python things to test.

Change-Id: Ie4490ce222d4212bf941c123766aacfc5b1b9281
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-22 16:44:48 -04:00
Paul Belanger
5ca3b67305
Initial commit for docs
Start creating the structure needed to run tox-docs on our project.

Change-Id: Ia9431073189be91fbfdd36fa0781e4bd504adedb
Depends-On: I5999b95cd1e8140118ed65cd35ff87931da79d52
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-19 17:03:53 -04:00
Paul Belanger
c5e55d75b3
Import playbooks from feature/zuulv3 development
We have been using the following ansible playbooks for testing
feature/zuulv3 of zuul.  This commit copies the playbooks from zuul
and imports them here.

Change-Id: Ib776cdce10b1f05501c46f6cf359723960f1bc71
Depends-On: I11da723df8823091f25e2a630e80ee4270d99a9b
Depends-On: Ic03634dd02d2eb1fa5aa8a38f4beb5f0ec5582c6
Co-Authored-By: Andreas Jaeger <aj@suse.com>
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-04 15:56:32 -04:00