118 Commits

Author SHA1 Message Date
Albin Vass
85ea882974 Only run tests for ensure-bazel when it is updated
Change-Id: I922a16a9c41a215c84d193360d45c0cfe9001639
2020-05-01 23:15:18 +02:00
Zuul
10cd19fdae Merge "ensure-yarn: run ensure-nodejs before" 2020-05-01 17:24:27 +00:00
Zuul
096b1218c3 Merge "haskell-stack-test: add haskell tool stack test" 2020-05-01 16:09:58 +00:00
Zuul
43ad1fb400 Merge "Add Bazel build and ensure roles" 2020-05-01 15:39:41 +00:00
Tristan Cacqueray
cf64b73f78 haskell-stack-test: add haskell tool stack test
This change adds a new job to test stack based haskell project.

Change-Id: Ie3492097b351eec743d98e9ca8bc693c00c11a78
2020-05-01 15:35:33 +00:00
Mohammed Naser
6920617af5 ensure-yarn: run ensure-nodejs before
YARN needs a modern version of NodeJS and if we don't use the role
to get the latest version, we end up failing on most platforms that
ship an old version of it.

This patch also adds testing to validate that ensure-yarn alone works.

Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: I83ac09bc5751c85c6f1eac550d289a300ca2255e
2020-05-01 17:07:48 +02:00
Mohammed Naser
00cc4aa038 ensure-docker: refactor to use ensure-package-repositories
This patch refactors ensure-docker to use the new ensure-package-repostories
role which cleans up the codebase for it a lot.  It also converges the
Debian and Ubuntu configuration as they were pretty much the same.

Also, it updates the Docker to the proper GPG key as while refactoring,
it was exposed that it was using the wrong key.  Docker uses a different
key for Debian and RHEL based packaging.

Change-Id: Iad430c6a31be0750c1a0f50e12a26df230de9f4e
2020-05-01 15:49:30 +02:00
Mohammed Naser
ff5e5c17f6 ensure-podman: refactor to use ensure--package-repositories
This patch refactors ensure-podman to use the new generic role
to allow it to be cross-platform in the future.

Change-Id: Id9ad0fbaeb9d19d022393ad16a27f11260c45da0
2020-05-01 15:49:30 +02:00
Mohammed Naser
7ea6d11981 ensure-nodejs: refactor to use ensure-package-repositories
This patch refactors ensure-nodejs to use the new generic role
to allow it to be cross-platform in the future.

Change-Id: I859b6b3e33bc22ad4f99828e921ac2ed35a49252
2020-05-01 15:49:30 +02:00
Mohammed Naser
90d9b9b7d9 ensure-kubernetes: refactor to use ensure-package-repositories
This patch refactors ensure-kubernetes to use the new generic role
to allow it to be cross-platform in the future.

Change-Id: Ic90c8973431823814c7e6b122f4ef25a67d64c2f
2020-05-01 15:49:30 +02:00
Paul Albertella
ad7297199d Add Bazel build and ensure roles
* Build role requires build target to be specified via a variable
* Ensure role checks for a specific version of Bazel and downloads
  and installs if missing; defaults to v3.1.0 and downloading from
  bazelbuild Github, but these can be overrriden using variables
* Also installs dependencies for Bazel; only supports Ubuntu/Debian
  at present, but includes scope to extend for other platforms
* Includes test playbook and job

Change-Id: I83f198aaf20c2b3664bea6fc05edd3b4fca13a4f
2020-04-30 18:05:41 +01:00
Zuul
d775467078 Merge "Add ensure-virtualenv" 2020-04-28 20:51:51 +00:00
Ian Wienand
08bbd16c52 Add ensure-virtualenv
This is part of the efforts to remove pip-and-virtualenv from our base
images [1].

There are some users who specifically require the virtualenv command
(perhaps, like dib, they have some code that uses the activate_this.py
mechanisms it provides wich venv does not).

This installs the virtualenv package for the currently running
distribution.

One of the main maintenance issues of pip-and-virtualenv is that tried
to ensure that "virtualenv" created a Python 2 environment always by
default.  Now that we have Python 3 only distributions like current
Fedora, this is not something we can continue to do (even if we wanted
to, which we don't).

What owns virtualenv and what it produces in our heterogeneous
environment is messy, and I think the best we can do is document it as
done here.

[1] https://docs.opendev.org/opendev/infra-specs/latest/specs/cleanup-test-node-python.html

Change-Id: I97d8bfb970ed2b5aaa02a0813899014c94994066
2020-04-28 06:09:54 +00:00
Tristan Cacqueray
2e82d88589 hlint: add haskell source code suggestions job
This change adds a new job to run hlint on haskell source files.

Change-Id: Ibf76c5552acecd68dfc56c4f31d8045ca5b233f1
2020-04-26 12:05:12 +00:00
Zuul
42edd207f9 Merge "cabal-test: add initial haskell job" 2020-04-24 14:34:59 +00:00
Tristan Cacqueray
d92b39cae2 cabal-test: add initial haskell job
This change adds a new job to test cabal based haskell project.

Change-Id: Idb24eb5f8f9bd1409bae07bf4da415f1d05568e4
2020-04-24 13:12:13 +00:00
Zuul
66b4de8b26 Merge "Add testing of fetch-sphinx-tarball role" 2020-04-23 15:00:43 +00:00
Sorin Sbarnea
bb247a7c2f Switch remaining tests to fedora-31
Previous switch to fedora-31 missed to update few jobs.

Change-Id: Id5b30008797457d54b104713a0db04307b1e48af
2020-04-23 14:06:03 +01:00
Sorin Sbarnea
b906d000fe Add testing of fetch-sphinx-tarball role
We discovered that role fails on some platform because of the missing
bzip2 package.  We can avoid this by using gzip which is much more
likely to exist on machines (and exists in the container images for
most operating systems).

Change-Id: Ia33a0f77343df809cd3c591a4a988e8e3712c133
Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
2020-04-23 13:52:48 +01:00
Zuul
9400fa6b65 Merge "Use cached 'tox_executable' in fetch-tox-output" 2020-04-21 19:32:44 +00:00
Albin Vass
0515041465 Use cached 'tox_executable' in fetch-tox-output
Otherwise this role could fail when tox is not installed in PATH.

Also updates the default behaviour to only collect the environments
configured with 'envlist' in tox.ini and collects all environments if
the envlist is set to 'ALL'.

Change-Id: I60bcc25cb853d2db3ee767a719b9ac54e421532e
2020-04-21 12:10:54 +02:00
Ian Wienand
d46c946f9b Make ubuntu-plain jobs voting
We have enough infrastructure in place now to have the
pip-and-virtualenv free node type voting, while we progress towards
making this the default.

Change-Id: Ie2677364d8696d5c4f71eefe2054da1b39e8bb35
2020-04-17 10:44:56 +02:00
Ian Wienand
88124dffb9 Update Fedora to 31
Update the Fedora test platform to 31.  Since we have dropped the
pip-and-virtualenv element with this image, we do not need the
work-around for excluded packages any more.

Story: #2007386
Task: #39310

Change-Id: I713a3cc790039dee3d28d83198f5afff5bebc491
2020-04-17 14:50:51 +10:00
Zuul
21928eab52 Merge "Adds roles to install and run hashicorp packer" 2020-04-15 16:01:18 +00:00
Ian Wienand
5068744eff ensure-pip: Add role
This role is intended to ensure that the `pip:` module, and jobs that
may wish to use `pip` from the shell, have the necessary requirements.

It is intended as a partial replacement for the pip-and-virtualenv
element in diskimage-builder, which currently pre-installs pip on our
infra CI images during image build.

We wish to remain broady compatible with this element, but not
replicate some of the more problematic areas of its implementation.

By default, this installs the system packages for pip and setuptools
(the latter being a requirement of the Ansible pip module, which
imports it directly, despite pip itself not requiring it).

In this role, we ensure the libraries for the currently running
ansible_python_interpreter version are installed.

There is provision to provide a flag to install the packages directly
from upstream via get-pip.py, although this is not recommended.

Story: #2007386
Task: #39309

Change-Id: Iac2d518a66caf1b801273225f75a0a748412903c
2020-04-14 10:20:33 +10:00
vass
32a3ce3f5a Adds roles to install and run hashicorp packer
Change-Id: I82274ef59eda00a735579082bbd37b64c0599c7d
2020-04-13 16:44:32 +02:00
vass
da97adbfb7 Use ensure-* roles
The install-* roles in zuul-jobs have been renamed to ensure-*, follow
the rename.

Change-Id: I32984fcd408cf0cd3751c5c5960608bec6e202a2
2020-04-12 15:26:10 +02:00
Zuul
14a409be73 Merge "Add support for RedHat platforms on ensure-podman" 2020-04-07 16:03:17 +00:00
Ian Wienand
42755b69c8 Add bionic-plain non-voting testing
This is a temporary node type that does not install
"pip-and-virtualenv" so does not have pip or virtualenv pre-installed.
Add this for non-voting testing as we migrate to this node type.

Change-Id: Ia9006873470d76d29cc9229f11650981662b2de9
Story: #2007386
Task: #39306
2020-04-07 10:51:49 +10:00
Sorin Sbarnea
69c53666de Add support for RedHat platforms on ensure-podman
- makes ensure-podman work on additional platforms
- prevents regression on new platforms fedora-30 and centos-8
- enables validation of podman engine

Change-Id: I5842ad22d94522f707ef743622b8950839d96dff
2020-04-06 18:52:07 +01:00
vass
16fe7bbd3f Rename install-pdk-dependencies to ensure-pdk-dependencies for consistency
The old role will be kept and include ensure-pdk-dependencies for backwards-compatability.

Change-Id: Ia269db36655685fe3f4dc54c60ae4bc09a913f52
2020-04-04 15:41:29 -04:00
vass
ac72b44911 Rename install-nodejs to ensure-nodejs for consistency
The old role will be kept and include ensure-nodejs for backwards-compatability.

Change-Id: Ib4cf74d6c1e8774f6fc37d6a30f690eb8f9f3d08
2020-04-04 15:41:29 -04:00
vass
84c06a37c4 Rename install-devstack to ensure-devstack for consistency
The old role will be kept and include ensure-devstack for backwards-compatability.

Change-Id: Ia5fe33649a66a24ce6bb9de3cccbd5ef612dfb2f
2020-04-04 15:41:29 -04:00
vass
2cb9f249a8 Rename install-podman to ensure-podman for consistency
The old role will be kept and include ensure-podman for backwards-compatability.

Change-Id: I21cfdfef4a88f66f51d139abed04f70b3228a22d
2020-04-04 15:41:29 -04:00
vass
276a5e919a Rename install-openshift to ensure-openshift for consistency
The old role will be kept and include ensure-openshift for backwards-compatability.

Change-Id: I6ff81fbd04f25207c87834b36e4d636eb9d44a93
2020-04-04 15:41:29 -04:00
vass
fcf3202ba4 Rename install-kubernetes to ensure-kubernetes for consistency
The old role will be kept and include ensure-kubernetes for backwards compatability.

Change-Id: Ic0c18a833f4a07e123f8313673bd9c864d7d2919
2020-04-04 15:41:29 -04:00
vass
c80b593fb6 Rename install-docker to ensure-docker for consistency
The old role will be kept and include ensure-docker for backwards compatability.

Change-Id: Icb76a954b04631c405b09eb54343fd852a511b83
2020-04-04 15:41:29 -04:00
Zuul
f73e60b2e5 Merge "go-jobs: improve testing" 2020-04-02 10:24:15 +00:00
Mohammed Naser
53c787fd47 go-jobs: improve testing
The jobs currently are not running tests if we make changes to the
"go" role due to a typo in the files.  Also, the file name should
really be go-jobs.yaml because we're testing the jobs, not any specific
role.

This patch also adds support for verifying that it works across all
of the platforms.

Change-Id: Ie6c64936d01e368f8af789f6576f8425cfd9350c
2020-04-01 12:56:39 -04:00
Ian Wienand
ca2ee69e60 local-log-download : role with script to download all log files
This is an alternative to I98c80f657f38c5e1ed5f28e5d36988a3429ad1f8
which does not modify the upload script, but rather queries the API
and manifest for what to download.

The script is a hybrid of python and bash to not implement json API
parsing badly in bash, but not replicate curl badly in python either.
The script sanity checks for dependencies, which are considered pretty
standard for any developer who would be interested in downloading logs
like this.

The role writes out the script with the correct build values coded
into it, so a potential user just has to run it without any arguments
or modification.

Change-Id: Ic33732adbfd3210191bf4976c3ee316cfc50568e
2020-04-01 07:41:26 +11:00
Monty Taylor
e71d0d2607 Add support for installing python with pyenv
In order to install particular python versions on distros that
don't otherwise have them, add an option for installing via
pyenv.

The packages to be installed to allow for Python to be built were
tested on the official Docker containers so they should provide
a fair amount of coverage from a minimal environment.

Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
Change-Id: Ic3312458b499a4b743895fa5829bb25155f77654
2020-03-17 17:32:49 -04:00
Sorin Sbarnea
de04f76d57 Tests bindep role on all-platforms
Change-Id: I2f26a936b842eef034f4f519bb0e1202c71e4871
2020-03-09 20:26:08 +01:00
James E. Blair
6f491cba6c Run ensure-tox on all platforms
Change-Id: Id25bd4a4dc1d29e9ac0dd6a6931b06ce94467f69
2020-03-03 10:28:25 -08:00
Sorin Sbarnea
299a654806 Fix install-docker on centos-8
Implements workaround for the missing --nobest option in Ansible
package module in order to succeed installing docker-ce.

Change-Id: I96e133dc5c59b9c811ff69df7651adadfcdf3a97
2020-02-25 10:56:37 +00:00
Monty Taylor
d36ba50765 Fix unittests for python2 and fedora
We need to pin enum34 on python2 because upstream broke it.

Also, we should not install zuul in python2, because it's not targetted
at python2. It's only here so that linters can deal with zuul_return
and other things from its library, so it should be fine to not install
it for python2 unittests.

GitPython was in here as a pin to the versions that support python3
for zuul. Since we're constraining zuul to only python3, we don't need
to mention GitPython at all.

Update the siblings unit test to use requests as the package we expect
to be already installed since we're no longer installing zuul for
python2.

Fedora 29 got archived upstream:

  http://mirror.sjc1.vexxhost.openstack.org/fedora/releases/29/README

So we need to switch to fedora 30.

Change-Id: I69e0b03f624ba45889916f89c0912df667aaf096
2020-02-24 10:50:13 -06:00
Sorin Sbarnea
22b0ed2c4d Enable testing of install-docker on multiple platforms
Change-Id: I6b9d4a51ed9966b8f39917783c8649fa3b4bd096
2020-02-21 18:55:10 +00:00
Zuul
2aa8ef9f41 Merge "Add ensure-java role" 2020-02-21 15:49:30 +00:00
Zuul
f4703021a4 Merge "Add ensure-bazelisk role" 2020-02-21 15:31:53 +00:00
James E. Blair
bfb3507c5b Add ensure-java role
Change-Id: Ibaf45bd09a47d55ce21af34763563c20f9396cd2
2020-02-21 06:55:47 -06:00
James E. Blair
d0591ad98f Add ensure-bazelisk role
This adds a role which installs bazelisk if it is not already
present.  It also adds a test job which exercises the role; the
job will be run on any changes to the new role.

Change-Id: I69b28b58338b46ec3fea696f9d97be4271ed6ae4
2020-02-21 06:55:44 -06:00