Commit Graph

27 Commits

Author SHA1 Message Date
Clark Boylan 50fd134646 Add nox role and some simple jobs
This is an alternative to tox.

Change-Id: Ib4920acec09c2c980af909e8f9d1eabd1c6d253a
2022-12-19 18:41:12 -08:00
Fabien Boucher 27beae943b Add the tox_install_bindep option to the tox job
If no binary deps are required by a tox run then
give the ability to not run the bindep role.

default is: true

Change-Id: Iacdf54e74126305199c17a932c001bc12c484759
2019-02-11 11:38:29 +01:00
Zuul c299ca8ef6 Merge "Revert "Revert "Add consolidated role for processing subunit""" 2018-01-16 20:10:06 +00:00
Monty Taylor 3d0550a96c
Revert "Revert "Add consolidated role for processing subunit""
This reverts commit 9f4efe98e1.

Compress testr results.html before fetching it

The synchronize command has testr_results.html.gz in the file list, but
we don't ever gzip it so it fails on fetch.

Make the "Check for testr directory" task actually check for
.testrepository and not for .stestr a second time.

The compression bug broke only for people using stestr. For people
using testr, the path bug meant they don't get html reports.

Change-Id: I0cdfc66ee8b046affeb0b071fef38c21cb7a4948
2018-01-16 11:58:18 -06:00
Zuul 62931b6390 Merge "Revert "Add consolidated role for processing subunit"" 2018-01-16 01:55:28 +00:00
Monty Taylor 9f4efe98e1 Revert "Add consolidated role for processing subunit"
This reverts commit ebdcf57fb0.

Change-Id: Icfa811571ec7c26617e0f8e9db086001fc0bc81f
2018-01-16 01:10:56 +00:00
Zuul 3675adae04 Merge "Add consolidated role for processing subunit" 2018-01-15 21:33:54 +00:00
Monty Taylor 6d8d1a4408
Move revoke-sudo from unittest pre to job run
Having revoke-sudo in the pre playbook of unittest has made us not able
to re-use unittest for javascript, and also means we can't use
nodejs-npm for nodejs-npm-run-test, which is a bit odd.

Instead, add the role to the run playbook for tox and npm, which allows
us to stack and combine things a bit better.

Change-Id: I0c7c508996ad2647db706d4ebf156c5dd96bf9b5
2017-12-21 11:54:54 -06:00
Monty Taylor ebdcf57fb0
Add consolidated role for processing subunit
We don't need two roles for testr and stestr. The roles have logic to
check to see if .testrepository or .stestr dirs exist, and the logic
after the subunit extraction is the same. Combine them into a single
role which should do the right thing.

Also, document it.

Change-Id: I833320cf9a932d8e119645eb798ce0c93d854321
2017-12-20 08:33:42 -06:00
Paul Belanger a1373c48c6
Remove bindep_profile from unittests/pre.yaml
It is possible a job wants to use another profile the 'test'. As such,
we can actually stop hardcoding this value and fall back to the
defaults that ship in the bindep role.

Change-Id: I6beb7b07a7dbc345e63e758ebbc86400e0ee16d3
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-11-28 13:52:29 -05:00
Monty Taylor 19f5dd08b1
Actually use fetch-stestr-output in unittests base job
We need to fetch stestr output if it's there at the end of the unittests
base job.

Change-Id: I1cd47056ed6b2b1e5fee0b54a8ea1494d86ddb13
2017-09-06 16:02:41 -05:00
Monty Taylor 51c97aae90
Remove bindep_command and bindep_fallback references
With the settings in site-variables now, we don't need them here. Which
is good, because this job should be reusable by non-infra people.

Change-Id: I2988816dfbca7299c4a29b8a1a986dccccf87a9a
Depends-On: I94dfe8e6aab9c2da1283590be5e26f7d8c35dcad
2017-08-29 13:57:09 -05:00
Paul Belanger 4063aa32b4 Remove configure-mirrors from unittests/pre
Right now, the configure-mirrors role is very openstack-centric. At
the moment, I don't believe it is generic enough to be used by zuulv3
users.

Additionally, it is completely possible users don't have mirror
infrastrucuture in place and just want to use upstream directly.

For now, remove this from our default zuulv3 jobs until we can better
make this generic. In the case of openstack-infra, we have added this
role into our base job which we have shadowed.

Change-Id: Ic846d158c5458126468b0de2861d8e56b0d39c3e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-04 12:44:19 -04:00
Paul Belanger e59abec7a3 Rename mirror_host to mirror_fqdn in configure-mirrors
It make more sense to revert to mirror_fqdn, since it is a FQDN.

Change-Id: I4a0749b64a71e551e4fbea5b416b46d2d6433d0b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-03 14:53:57 -04:00
Paul Belanger 05e6980baa Remove mirror_domain from configure-mirror
After talking to clarkb, we decided we can drop this in favor of just
using the mirror_host.

Change-Id: Ie4ce336174aa2a825d125f7e0d9a256de139908b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-03 14:49:24 -04:00
Paul Belanger 09aa19e8a2
Remove validate-host from unittests/pre.yaml
This now exists in the base job, remove to avoid running the role
twice.

Change-Id: I915500b040968bfcdb504d44b58f91ccc36ab843
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-21 11:05:48 -04:00
Paul Belanger 0e3bbaac46
Remove gather_facts: true
Zuulv3 now defaults to gathering: smart in ansible.cfg, along with
fact caching.  We can now remove gather_facts: true as we get it for
free now.

Change-Id: Ife8ffaa4716eb60c59c26b8f4842ad48a17d4ad2
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-21 11:05:46 -04:00
Paul Belanger 8638ac3e2a
Create configure-mirrors role
This will be used to replace our current confgure_mirror.sh script
that we today as a ready-script in nodepool.

This only adds support for ubuntu today. As we move forward and
configuration openstack-infra from JJB to ansible, we'll need to add
more distros.

Attach the role to the unittests base job for now. It should ultimately
be attached to the base job, but adding it to the unittests job lets us
test it more easily.

Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Change-Id: I9bfa28c87390c09bb2c4cd0de6ce4c7890f8d81a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-11 14:56:12 -04:00
Monty Taylor 2dfb08a49e
Actually run the unittests post playbooks
Put the tasks into a role so that we can set zuul_work_dir in
defaults.yaml so that this also works if we're setting a directory in a
variable.

Change-Id: I638f7682d086781178f2dc7517eb0fb09a5f2acd
2017-07-10 16:50:18 -05:00
Jesse Keating 05735e64e7 Fix a playbook typo
This is blocking https://review.openstack.org/482282

Change-Id: I9d4c84d0624b01944ad42a1519c64fa886151a4f
2017-07-10 14:35:54 -07:00
Monty Taylor 7f64bddb1d
Rename debug-ansible to validate-host
It's doing more than just outputting ansible information.

Change-Id: Icfbef10b1bcf36d75f961cd4319bc062a77efe2a
2017-07-09 11:26:50 -05:00
Monty Taylor 8b86f76ffd
Clean up debug-ansible role
Copy in the openstack info, generalize it, and get it to stop
spamming stdout. We'll use a python module to do this so that we can
control what's going on.

Change-Id: Iec3bcec75f28451284c3c7d94593bfca3830bc8b
2017-07-09 11:25:47 -05:00
Monty Taylor 242f0bfff4
Rework bindep role to be more ansible and less shell
There's still a chunk of shell, because it's honestly better than doing
the equiv with package manager modules would be.

Also, make zuul_work_dir a parameter we pass in from the playbook. The
bindep role itself is otherwise totally non-zuul specific.

Change-Id: I95e78dd25a1a54b3ce5f2ddb18228a183d3c06ad
2017-07-09 09:27:09 -05:00
Monty Taylor 3dc03ee0d6
Rename zuul-revoke-sudo to revoke-sudo
Depends-On: If639d35ded59621c38d0ecb16344817fd176c31c
Change-Id: I51454b86b5d8b6c3c26615437a3b7ce386134435
2017-07-06 19:14:53 -05:00
Monty Taylor 4b9fc09a1c
Port in tox jobs from openstack-zuul-jobs
The original idea was that we'd have a "python27" job. But it turns out
that "python27" isn't actually as universal as you might think.
"tox-py27" on the other hand is a thing that can and should always work
for people who want to run tox with the py27 env.

Port in the jobs we had in openstack-zuul-jobs.

Also, copy in the text of the old shell scripts so that we can iterate on
them and make them better piecemeal.

These are named zuul-tox not tox because we already have tox jobs
defined elsewhere. We'll need to do the naming dance while we work on
them.

Change-Id: I813f3f2ae138c07918556bc81655518023527131
2017-07-06 11:18:47 -05:00
Monty Taylor 10a959d5e6
Add run-bindep role and add it to unittests pre
Before we revoke sudo, we need to run bindep in the project. Add
the run-bindep role.

Copy the content of the jenkins script for now. This way we can iterate
on the content in smaller chunks.

Change-Id: Ib893b06d05039af078e6eea22e882f6f1efae226
2017-06-27 15:32:36 -05:00
James E. Blair 0ba6b45125 Add python unit test jobs
These don't do much yet except prep.

Change-Id: I350355dda687edf8cc839f949993c1d7ab8baf96
2017-06-08 16:39:06 -07:00