1567 Commits

Author SHA1 Message Date
Andreas Jaeger
2654d0338c Revert "tox: update lint regex to not require column"
This reverts commit 53f2444dbba473c22554af1689dfc444f3441018.

Revert to avoid regression:
https://review.opendev.org/710208 just gave a lot of new linting warnings that look new "py38: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()"

Change-Id: I26c862255cce6b6c99a69d9e3f5f4354db90f953
2020-05-18 12:23:56 +00:00
Albin Vass
53f2444dbb tox: update lint regex to not require column
This is needed to be able to parse output from ansible-lint.

Removes a testcase with a faulty assumption that if the column is
not present the output must be a warning and should not be returned.

It is probably better to allow the user to configure their linting
output themselves.

Also we don't need a separate matcher for sphinx.

Change-Id: I6d06dce921348d3c6fb5a56cdc1e4df675d685c2
2020-05-14 20:30:29 +02:00
Zuul
0fdaf8d36b Merge "Only run tests for ensure-bazel when it is updated" 2020-05-02 05:48:53 +00:00
Zuul
41b0dfa022 Merge "Use zj_sphinx_pdf instead of item" 2020-05-01 23:05:32 +00:00
Albin Vass
85ea882974 Only run tests for ensure-bazel when it is updated
Change-Id: I922a16a9c41a215c84d193360d45c0cfe9001639
2020-05-01 23:15:18 +02:00
Albin Vass
0c7673054a Use zj_sphinx_pdf instead of item
Change-Id: I8ed9c0e1ebb8cf43335ee49f11a320ddabb29eb5
2020-05-01 23:06:14 +02:00
Zuul
5c44bb56dc Merge "Distinguish zj_source and zj_result and item" 2020-05-01 20:52:48 +00:00
Albin Vass
61c4eeaffd Distinguish zj_source and zj_result and item
The inner item needs to be zj_source. Call the outer zj_result
for clarity.

Change-Id: Ic5a7b18e1dba71d8dffa171246b52c81e30c6d8f
2020-05-01 15:39:21 -05:00
Clark Boylan
1075767b18 Fix some item usage where var is zj_* now
In the fetch-sphinx-tarball role our handling of pdfs didn't fully
migrate the loop control var 'item' renaming. Update to replace now
incorrect 'item' with correct 'zj_' prefixed var names.

Change-Id: Ia5cb68ccbc410d88349e9dd6e3fc2551d5eff5e2
2020-05-01 12:08:49 -07:00
Zuul
10cd19fdae Merge "ensure-yarn: run ensure-nodejs before" 2020-05-01 17:24:27 +00:00
Zuul
8d31612e2a Merge "ensure-sphinx: use failed_when: false instead of ignore_errors: true" 2020-05-01 17:01:37 +00:00
Zuul
2a030d2c74 Merge "tox: Use 'block: ... always: ...' instead of ignore_errors" 2020-05-01 17:01:36 +00:00
Zuul
096b1218c3 Merge "haskell-stack-test: add haskell tool stack test" 2020-05-01 16:09:58 +00:00
Zuul
f38704dd6c Merge "fetch-sphinx-tarbal: allow to follow symlinks" 2020-05-01 16:08:58 +00:00
Zuul
9d2015d31a Merge "Check for loop_control in with_ type loops" 2020-05-01 16:06:16 +00:00
Zuul
f337f4bfbe Merge "Do not keep owner when pulling zuul-output" 2020-05-01 15:39:42 +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
Sorin Sbarnea
27f9df6a8b fetch-sphinx-tarbal: allow to follow symlinks
Fix bug which prevented find from finding builds when the
folder was a symlink. This can happen if a project using a different
build layout tries to expose the docs at the expected location.

Change-Id: Ib7782b60cef42d2e9fd3077791f06b0f918d7c45
2020-05-01 16:13:00 +01: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
Albin Vass
7e1d6a8780 Do not keep owner when pulling zuul-output
Log synchronization fails when trying to preserve uid and guid
for a user and or group that doesn't exist on the executor.

This makes it so the owner and group is not preserved from the remote.

Simplify operations, use a single task with a loop instead of three
separate tasks.

Change-Id: I8ae937ba07e240ee4394374405aa841ad882022a
2020-05-01 16:50:54 +02:00
Mohammed Naser
1c95063442 cleanup: move tests to use ensure-package-repositories
In order to keep things clean, let's re-use the role we have
for setting up repos.

Change-Id: I989c4d45e28f94767ff9d63937d273d0542312f5
2020-05-01 15:49:30 +02:00
Mohammed Naser
f2976b1274 install-yarn: always install
The role previously conditionally installed YARN only if there was
a yarn.lock.  The role shouldn't conditionally decide to install
if there is a yarn.lock file as that's not expected behaviour.

Change-Id: Ia6940df036fd27d55d60fa959b794de952040745
2020-05-01 15:49:30 +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
7cb1c6b16b ensure-yarn: refactor to use ensure-package-repositories
This patch refactors ensure-yarn to use the new generic role
to allow it to be cross-platform in the future.

Change-Id: I32bb40f5afb26d0d906f332c1c8440859367d97a
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
Mohammed Naser
e4345c217e ensure-package-repositories: Add role
This role allows users to supply a common variable and it will
contain all the logic to configure the correct repository based
on their operating system.

Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: I4a3ab5f099c2e4671b78c751d8f0e8ccf2304afa
2020-05-01 15:49:21 +02:00
Albin Vass
9062289151 Check for loop_control in with_ type loops
Change-Id: I191265df7709a6262b44a428d78fe28ffaeb4b75
2020-05-01 13:45:34 +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
James E. Blair
0f08d893b6 Fix another incorrect variable name for promote-docker-image
We missed this in an earlier rename.

Change-Id: Ia1c068136fbd51e5ed9f4d9960ee4ff73ecbf303
2020-04-30 08:02:37 -07:00
Mohammed Naser
5b37cabf41 Fix incorrect variable name for promote-docker-image
The variable was changed inside the role from image to zj_image but the
included task file did not use the new variable name.  This patch fixes
this.

Change-Id: Ibe3acbd0881da24ec9c2f636d777885a309bdf98
2020-04-29 20:04:09 -04:00
Albin Vass
d0e2016592 Add loop var policy to ansible-lint
This adds a custom ansible-lint rule at .rules/ZuulJobsNamespaceLoopVar.py
that enforces the loop var policy described at:
https://zuul-ci.org/docs/zuul-jobs/policy.html#ansible-loops-in-roles

It also updates existing roles to follow the policy.

Change-Id: I92b2ff56a1c2702542fc07b316f1809087a4c92f
2020-04-29 17:20:59 +02:00
Zuul
d775467078 Merge "Add ensure-virtualenv" 2020-04-28 20:51:51 +00:00
Zuul
fa48a66db3 Merge "Revert "Do not set buildset_fact if it's not present in results.json"" 2020-04-28 19:09:29 +00:00
Albin Vass
b5e87e62f1 Revert "Do not set buildset_fact if it's not present in results.json"
This reverts commit bc0ca442a11fee5c610a71b50d8d0073d5293d2b.

Change-Id: If0885877a1c976ed430d6e3a7a462e06042874fb
2020-04-28 18:35:10 +00:00
Zuul
6fb73060ec Merge "Do not set buildset_fact if it's not present in results.json" 2020-04-28 16:22:28 +00:00
Albin Vass
b1b2dca456 ensure-sphinx: use failed_when: false instead of ignore_errors: true
Change-Id: I597bed7ea062b584b4613533b477f5c69404996a
2020-04-28 16:20:20 +02:00
Albin Vass
3487b54baf tox: Use 'block: ... always: ...' instead of ignore_errors
Change-Id: Ifc9f420687538a0ed666b41fa707810b184b0c66
2020-04-28 16:20:20 +02: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
Zuul
64b347fa63 Merge "container-logs: use failed_when: instead of ignore_errors:" 2020-04-28 03:57:55 +00:00
Zuul
8dda3edfc1 Merge "k8-logs: use failed_when: instead of ignore_errors:" 2020-04-28 03:56:49 +00:00
Zuul
d337736a94 Merge "tox: allow running default envlist in tox" 2020-04-27 19:56:46 +00:00
Zuul
fd91b63c64 Merge "fetch-sphinx-tarball: Do not keep owner of archived files" 2020-04-27 19:20:04 +00:00
Zuul
aac9dc0289 Merge "fetch-sphinx-tarball: use remote_src true" 2020-04-27 19:09:20 +00:00
Albin Vass
a7da59703f container-logs: use failed_when: instead of ignore_errors:
Change-Id: I3b59c126b8d1dff38eef40003e3c63846dec959a
2020-04-27 20:53:45 +02:00
Albin Vass
605fb74921 k8-logs: use failed_when: instead of ignore_errors:
Change-Id: Ifd4652cdb198ac6cc40edb2254967d08104baa30
2020-04-27 20:51:41 +02:00
Albin Vass
bc0ca442a1 Do not set buildset_fact if it's not present in results.json
Change-Id: I9a8790e6f3628924f796b4f3eff052b5e36eff03
2020-04-27 19:53:47 +02:00
Zuul
e863680df7 Merge "hlint: add haskell source code suggestions job" 2020-04-27 15:24:45 +00:00