65 Commits

Author SHA1 Message Date
Monty Taylor
a08002fd44
Install yarn if needed in javascript jobs
Some javascript projects use yarn for dependencies instead of raw npm.
If a yarn.lock file is detected in the zuul_work_dir, install yarn and
use yarn to install dependencies.

Needed-By: I5864e1b2f9952fbc35b08ebdef348c4917564c37
Change-Id: I9ae7dd3b33b2b607c1c5a17632e2aeb12e339d15
2017-12-14 10:08:22 -06:00
Monty Taylor
b125b917d9
Update javascript jobs to take npm_command variable
Similar to tox, the only difference in these is the command passed to
npm. Update the base job to do that, and the child jobs to use the
variable.

Change-Id: I5f9d420f1618e9a196b4218bca7055f377349351
2017-12-14 09:42:11 -06:00
Andreas Jaeger
ebb165eb69 releasenotes: Remove package install
The vast majority of changes to enable running releasenotes without
installating of the package itself are merged. Remove the package
install now. Note that install-if-python is the proper role for this,
the previous setting was a noop.

The remaining few changes can merge at any time, projects had enough
time.

See also
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124815.html

Needed-By: I225d73a2f9321329b34a282e08aea6773622df5b
Change-Id: I6d461a69537d3f7dd44e9b9877f652df656eedd8
2017-12-11 14:16:08 +01:00
Zuul
ab60637718 Merge "Fix npm-run-test" 2017-12-07 16:33:27 +00:00
Monty Taylor
d7cba9d7d5
Combine tox-siblings and tox roles
There is a bunch of duplicate logic between tox and tox-siblings, the
tox-siblings logic is already protected with a flag - and having them be
split already led to not doing the right thing with constraints files in
siblings when we did it right in tox itself.

Combine them into one role.

This means the siblings code will run as part of run instead of as part
of pre- but that's how things have worked for years anyway until
siblings was introduced - and is also the behavior is the siblings flag
is false -so it's more consistent overall.

Leave a no-op tox-siblings role so that we can gracefully remove the use of
tox-siblings from castellan, python-openstacksdk, shade and tacker.

Change-Id: Id61ae52d48b28cfc2221cb556a1c1f7c6dfd60dd
2017-11-29 15:34:08 -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
Zuul
05372d9f3b Merge "Add general sphinx and reno jobs and role" 2017-11-21 20:29:43 +00:00
Monty Taylor
b493ca62dd
Add general sphinx and reno jobs and role
Sphinx jobs and reno jobs need basically the same thing for
dependencies. So make a new role, ensure-sphinx, which is
parameterizable enough that it can be used by both reno and sphinx jobs.

Make build jobs for both releasenotes and sphinx docs, as both of these
things are perfectly valid things to do in both OpenStack and
non-OpenStack contexts. We'll add an openstack specific job in
openstack-zuul-jobs that uses these as parents but adds the requirements
repo and constraints file settings.

Some of the pip commands here can be improved once
https://github.com/ansible/ansible/pull/33098 lands and is released,
which would allow specifying --user and -c as parameters to the pip
module.

Change-Id: Idd7caf7d88b56d61872906027b4ce7d743572ded
Needed-By: I57de14580f39b9e1c11a587b51b44b61b02c84da
2017-11-20 17:59:28 -06:00
Monty Taylor
04c7247604
Make build-python-release job
python-sdist isn't an accurate name since this also builds wheels. Make
a new job named build-python-release.

Also, use zuul_work_dir as the working dir variable.

This role was written rather early and isn't used yet. Change it to use
zuul_work_dir so that it matches other things.

Change-Id: Icfad9ad6ba5c7a0c62a8d5ce243952b81f28a47f
Depends-On: I8dfe5a41710392d6ca8453ce365f674a9d5e4f6e
2017-11-20 09:09:40 -06:00
Andreas Jaeger
e2138467d6 Fix npm-run-test
The legacy test installed chromium and xvfb as well and started it,
add these back in for the run-test job.

Closes-Bug: #1731421
Change-Id: I40b7d019551c227e4b8a0e11366b1ce448d5bbed
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
2017-11-14 13:19:08 +00:00
Andreas Jaeger
560a907b06 Add npm-docs job
Add a job for building javascript documentation using Node.

Change-Id: I4517b9fb5d9b17b099e2a5ab138688caaa976be9
2017-11-09 21:31:50 +01:00
Andreas Jaeger
5e4797bda7 Add nodejs-npm jobs
Add native nodejs jobs for lint and test.

Needed-By: Ib38294ab48ef158a248637de79970ef60bc44f7f
Change-Id: I45294049d9228020b70f6b18265e21fa9385f782
2017-11-05 07:41:32 +01:00
Zuul
e617405939 Merge "Follow redirects when triggering readthedocs build" 2017-10-24 18:02:28 +00:00
Jens Harbott
cc402a0b26 Follow redirects when triggering readthedocs build
The URL we post to returns a redirect to
https://readthedocs.org/projects/$short_name/builds/ so we have to
follow that.

Change-Id: I26c907df0ab4ec6eb40bce74f590cfab6eec38c7
2017-10-24 08:58:30 +00:00
Tom Barron
74a40ec89e Collect output from coverage job
Add a post-run playbook to tox-cover job to collect the coverage
report detail and copy it to the log root of the executor.

Change-Id: Ibad091f7630832eb993133b0f43a60931b3dfd75
2017-10-17 21:58:36 -04:00
David Moreau-Simard
d9199fd008
Remove integration test playbooks from zuul-jobs
Integration tests were moved to openstack-zuul-jobs in
Ic04c48d7a0e15459632b91bce81e777d12622222, these have just been
forgotten here so let's delete them.

Change-Id: I2ecccf66595920f6830c538212060be3c644ded5
2017-10-10 08:53:09 -04:00
Monty Taylor
ad1ce4fc2f
Add base job and roles for javascript
This is in service of getting javascript tarball jobs going.

Change-Id: I20b4b4ce0bdf03c5585ca73471611178c94e2599
2017-10-09 08:32:45 -05:00
David Moreau-Simard
645a3935ee
Multi-node: Set up connectivity with default OVS bridge
This sets up a default 'br-infra' bridge between nodes in a multi-node
job. Two groups are expected in order for this to be set up:
- switch
- peers

The 'switch' group, with only one expected member, will be set up as
the switch node while the 'peers' group will be connected to the switch
node with virtual ports.

The default settings such as the bridge name, the IP range used, the MTU
and so on can be overridden at the job level by setting vars.

Change-Id: If5a3f512837e5b235bd2f6dbfdbb454435aa983e
2017-09-26 15:32:02 -04:00
David Moreau-Simard
a5da23b827
Multi-node: Set up firewalls
This adds nodes in a multi-node job to each other's firewalls so that
they can communicate with each other without restrictions.

Change-Id: Ic9eda6b951c5ecf5997fe9da3338980f2a8121b0
2017-09-22 16:25:51 -04:00
David Moreau-Simard
974b5d7dac
Multi-node: Set up hosts file
This allows nodes in a multi-node job to resolve each other through
their inventory hostname.

Change-Id: I19cc7690d6fea99461bc67a46a09a8037f9c3292
2017-09-22 16:25:51 -04:00
Monty Taylor
56f6938968
Override tox requirments with zuul git repos
It's a common desire to be able to have a job that runs unittests
against the git checkout of another repository, but getting the tox
environment into that shape is a bunch of extra work.

Now that we have a defined place where repos go and they're always on
the build node, we can look in the source dir for git repos that contain
python packages and ask setup.py for the name of the python package they
provide.

We can then see what packages tox decided to install for this
environment, see if we have any matching ones in the source code repos
we've put on disk and if so we can re-install those depends from the
source location.

That way we can cause a tox job to use a second repo for cross-repo
unittesting simply by adding that project to required_projects.

Add a flag to disable the behavior ... although the easiest way to
disable the behavior is to just not list other projects in
required_projects.

Change-Id: Ia5250c11b1d73baaa70ea1cef7ea1ba4d5bab821
Story: 2001136
Task: 4852
2017-09-11 12:55:26 -06:00
David Moreau-Simard
d55de6e54b Add integration test jobs for the configure-mirror role
Change-Id: I8a64a7158e2b98e76b25cb9352b98694d5b924b1
2017-09-07 14:38:36 -04: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
Monty Taylor
ead78fed13
Add trigger-readthedocs job
It's really easy to trigger a build on readthedocs. It doesn't even need
a node, since it's just a single POST.

Change-Id: I8c576c7a26ab123bd70f7a025d8a49a5cb3e2432
2017-08-28 20:17:44 -05:00
Monty Taylor
3c9d1c4f48
Remove base playbooks
They're not actually used and are confusing.

Change-Id: I27114189d97c4f998337b6632a5daf53c70f0b9c
2017-08-23 18:03:49 -04:00
Monty Taylor
3107bd674f
Add multinode base job
Right now just does the known hosts thing

Change-Id: I3435eee42c9fc77fd3e9926477a3a261aa387eb4
2017-08-23 18:03:49 -04:00
Zuul
4685741928 Merge "Add known_hosts generation for multiple nodes" 2017-08-23 12:00:47 +00:00
Clint Byrum
cc2ed9fa5f Add known_hosts generation for multiple nodes
Things will need to be done a bit differently for localhost-ssh, so this
is just for the case of multiple nodes needing to be able to SSH to
eachother.

Change-Id: I941cf3de7691ee1b5277ca50c7bb9daa5b9a0732
2017-08-22 13:56:16 -07:00
Zuul
14e2a22299 Merge "Split ensuring tox is installed into a role" 2017-08-22 20:47:21 +00:00
Monty Taylor
80ec023985
Remove tox-tarball job
This isn't really a general thing. We'll add a different thing in
openstack-zuul-jobs.

Change-Id: I7343977bd678c50a2ad1221692d56cafae3111f0
2017-08-22 16:09:03 -04:00
Monty Taylor
47b2a7c869
Add non-OpenStack PyPI upload job
If people are using normal tarball jobs to build sdist tarballs, they
can also use a normal job to upload them.

This job will require being passed a dict variable with username and
password, which really should be stored in a secret.

Change-Id: I5747856e54d07a98571db38f1827b3e3cfefe768
2017-08-22 16:09:03 -04:00
Monty Taylor
2a957c7f1c
Add non-OpenStack python tarball creation job
OpenStack python tarball building is weird and not done in a manner
consistent with how other folks do it. Make a job that just runs python
setup.py sdist bdist_wheel.

Change-Id: I0df77cdd00b9820bad3b9cde75be9e150057a584
2017-08-22 16:09:02 -04:00
Monty Taylor
c36d95b4ba
Rename tox/tarball-post to python/tarball-post
The actions of the playbook don't really have anything to do with tox.
Tarballs go into dist/ whether tox is used or not.

Change-Id: I49d9efaf34644c47df0a1acb6ca108fe4ec99fa4
2017-08-22 16:09:02 -04:00
Monty Taylor
dafe1bfcb4
Split ensuring tox is installed into a role
We do this in a few places, make it reusable.

Change-Id: Ied118508dc4b8e4cbfca88b5636730664dbe10b4
2017-08-22 15:19:33 -04:00
Jenkins
5046ad8447 Merge "Create fetch-tox-output role" 2017-08-08 20:59:49 +00:00
Jenkins
c235149627 Merge "Log file stats for tox tarball / wheels" 2017-08-07 19:46:28 +00: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
4420bbd2c9 Create fetch-tox-output role
We can move the content from tox/post.yaml into an ansible role. This
allows other projects to use it.

Change-Id: Ic7fc31a372de29a3a97ef84539faf3b0a1d6e181
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-03 16:37:00 -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
1b5c55d875 Log file stats for tox tarball / wheels
Add some additional information about tarballs / wheels we are
copying. For example, md5 and sha1 info.

Change-Id: I96d6903f8bc5ced196b1b57f93277fa87bdf31c1
Depends-On: I86ff459d283eaf348821c2f11c1f8575598f088d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-02 16:57:33 -04:00
Paul Belanger
64785f464b
Update tox-tarball to use tox role
We no longer need to depend on our run-tarball / run-wheel roles. I
also plan to add back our sha1sum / md5sum files back in a follow
patch.

Change-Id: If4814a21192112d841fdb24cfdd1fd1a8bd427e6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-02 10:35:29 -04:00
Jenkins
5425d95640 Merge "Support multi node jobs for tox logs" 2017-07-25 16:00:44 +00:00
Paul Belanger
851ba9ea4d
Support multi node jobs for tox logs
It is possible somebody may want to run tox jobs over multiple nodes.
Check to see if more then one node is in our inventory, if so then add
the inventory_hostname to the log path.

Change-Id: Icd0532cb415fdae42eae6d2269d5a0be5fcdf98a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-21 17:36:43 -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
Jenkins
c3dbcdc35b Merge "Create tox-pep8 jobs" 2017-07-19 22:54:43 +00:00
Jenkins
a67e0679b4 Merge "Add sample base job" 2017-07-18 22:37:03 +00:00
Paul Belanger
1280a99434
Create tox-pep8 jobs
Because we want to use tox role variables (tox_envlist) across
multiple plays. We need to setup the variable in zuul.yaml.  However,
this now means we need to create tox-pep8 job now since we are using
the tox/run playbook.

Change-Id: I6c15c076a510375dfacc66a0e07bc3f1228adf06
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-18 17:35:56 -04:00