187 Commits

Author SHA1 Message Date
Zuul
d35a1cf07b Merge "Add ensure-uv role" 2025-02-06 23:43:13 +00:00
Aurelio Jargas
506e7a9025 Add ensure-uv role
Uv (https://docs.astral.sh/uv/) is not declared as a dependency for a
Python project, it must be available somehow in the system. This role
installs it if missing.

- Latest version is installed, unless `ensure_uv_version` is
  informed.

- The installed executable path is set as the `uv_executable` fact.

- The `/usr/local/bin/uv` symlink can also be created if
  `ensure_uv_global_symlink: true`.

This new role is a verbatim copy of the `ensure-poetry` role, just doing
a `s/poetry/uv/g`. Even this commit is a replay of the commit adding
that role: 524b7e7b95dcd6adc311e74dd7f0e6da8a3cce58.

Change-Id: I55bc5e1d273045d0978b09f719bf79a875336e30
2025-01-27 21:42:14 +01:00
Jeremy Stanley
087406800d Add ensure-pyproject-build role
pyproject-build (https://build.pypa.io/) is used as a pyproject (PEP
517) build frontend. This role installs it if missing.

This new role is basically a copy of the `ensure-poetry` role, in
turn copied from other roles in this repository.

Change-Id: If6e3970d995256beea170cad039d7dba9538d191
2025-01-27 19:56:21 +00:00
Zuul
e452fa28cd Merge "Add mirror-container-images role and job" 2024-12-10 23:00:44 +00:00
James E. Blair
4077fb8e8f Add mirror-container-images role and job
This adds a role (and job) to mirror container images from one
registry to another.

Also, disable the name[template] ansible-lint check because it
greatly reduces the utility of including templates in task names.

Change-Id: Id01295c51b67ffb7e98637c6cdcc4e7a14c92b22
2024-12-02 09:47:12 -08:00
Jeremy Stanley
0fef0d461e Switch logo color in docs pages to dark blue
The trademark for the logo, as filed, is specified as dark blue.
That logo needs to be displayed in a user guide or manual or
alongside a direct download of the software in order to demonstrate
continued use of the mark, and the foundation's trademark lawyers
have expressed concern that a white version is insufficient (but
they seem to be okay with the current background color as long as
the lines of the logo are colored similar to the version on file).

This is a copy of the equivalent change from the zuul repository.

Co-Authored-By: James E. Blair <jim@acmegating.com>
Depends-On: https://review.opendev.org/934443
Change-Id: I2de26048c3a4cb8cb6b67bf786b526963c6ec04b
2024-11-12 19:02:54 +00:00
Clark Boylan
cb0b00ed87 Replace blockdiag/seqdiag with graphviz
The blockdiag/seqdiag set of tools and their sphinx extensions are no
longer maintained. This hasn't been a huge issue until we started
running jobs on Python3.12 as we need to run an older version of Pillow
to support these tools and that needs special libs to build wheels on
python3.12.

Rather than continue to try and make old unmaintained tools work we
switch to graphviz which is maintained and has support built into
sphinx. This does require us to install graphviz as a system dep but
that seems like a reasonable tradeoff for using supported tooling.

The resulting graph specifications are also slightly more verbose.

Co-Authored-By: James E. Blair <jim@acmegating.com>
Change-Id: I2d1e4c3d648723402aae2d87fb3233f4418d5003
2024-09-25 11:18:04 -07:00
Zuul
5209c8add4 Merge "Add a role to convert diskimages between formats" 2024-08-27 17:00:39 +00:00
Zuul
81942240d0 Merge "Add a diskimage-builder job" 2024-08-27 16:57:46 +00:00
Zuul
1e734ead42 Merge "Add build-diskimage role" 2024-08-27 16:57:42 +00:00
Zuul
adbb174801 Merge "Add ensure-dib role" 2024-08-27 16:40:36 +00:00
Simon Westphahl
5c10b708f0 Add a role to convert diskimages between formats
This adds a role convert-diskimage which uses the qemu-img tool to
convert diskimages from one format to another. Currently supported image
formats are raw and qcow2.

Change-Id: I4770af04c37f39e0cce23d5dd59ead744bed7d74
2024-08-27 08:59:53 -07:00
James E. Blair
6dab604706
Add a diskimage-builder job
This uses the new roles.

Change-Id: I047f0ab0eb784b1d3dd9384a4e96e2119d5b2580
2024-08-23 13:37:38 +02:00
Simon Westphahl
dded8d0853
Add build-diskimage role
Role in order to build a diskimage in a Zuul job.

Change-Id: I18756445d41d51b05b3dbb334e43a94637253321
2024-08-23 13:31:27 +02:00
Simon Westphahl
e749223328
Add ensure-dib role
Role installs the diskimage-builder in a virtualenv.

Change-Id: I0801daa6d5b8039bfbdefb7357942b1c5a58732f
2024-08-19 09:13:07 +02:00
Aurelio Jargas
524b7e7b95 Add ensure-poetry role
Poetry (https://python-poetry.org) is not declared as a dependency for a
Python project, it must be available somehow in the system. This role
installs it if missing.

- Latest version is installed, unless `ensure_poetry_version` is
  informed.

- The installed executable path is set as the `poetry_executable` fact.

- The `/usr/local/bin/poetry` symlink can also be created if
  `ensure_poetry_global_symlink: true`.

This new role is basically a copy of the `ensure-nox` role with the
symlink creation snippet taken from the `ensure-tox` role.

The commit adding `ensure-nox` (77b1b24) has been taken as an example of
the necessary changes when adding a new role.

Change-Id: I5592d38d415a9d74055348406653b69f110541ae
2024-07-02 08:00:55 -07:00
Zuul
5663544e8d Merge "Add a job for publishing a site to netlify" 2024-06-11 13:45:21 +00:00
Clark Boylan
1d71eb349e Add nox and tox py312 jobs
Python 3.12 is a thing now and is present in a stable Linux distro
release (Ubuntu Noble). It seems reasonable for people to want to run
nox and tox against py312 targets. Let's make it easy for them and add
jobs to do that for them.

Change-Id: I9d644cfbe65b92207a5fe2ad6dd950093bda87dd
2024-06-07 10:40:53 +00:00
Monty Taylor
9858cb5848 Add a job for publishing a site to netlify
Netlify has support for publishing built sites via a CLI tool. Add
support for using that.

Change-Id: Ib47ac48a386e5e93f93455ef1202fc2af970b1c9
2024-06-03 11:58:34 -07:00
Zuul
df5756f765 Merge "Add zuul-tenant-conf-check role/job" 2024-02-13 16:09:34 +00:00
James E. Blair
73bdf1f2df Add zuul-tenant-conf-check role/job
This performs static validation of Zuul tenant config files.

Change-Id: I5d439d6cfb963e55d07b2a0058de76f030fe47b3
2024-02-01 15:56:29 -08:00
Tristan Cacqueray
26db5b3b24 Introduce LogJuicer roles
This change adds new roles to run logjuicer in zuul jobs:
  https://github.com/logjuicer/logjuicer

Change-Id: I02824a18285a16c8f0be6bb96b5404aa0d601c16
2024-01-08 16:09:17 +00:00
Zuul
3b3495e255 Merge "Deprecate mirror-workspace-git-repos" 2023-09-26 23:24:36 +00:00
Lukas Kranz
ce2bea51d4 Deprecate mirror-workspace-git-repos
This change is preparation for https://review.opendev.org/c/zuul/zuul-jobs/+/887917

In the beginning, there was only prepare-workspace[0] which rsynced repos.

Then we added mirror-workspace-git[1] to make it more efficient by using git operation, but it required some openstack-specific code in project-config to work.

Then we added prepare-workspace-git[2] which completed the git-based sync solution by locating everything requried in zuul-jobs.  It used mirror-workspace-git by reference and added this TODO:

  # TODO(tobiash): we might want to deprecate the role mirror-workspace-git-repos
  # and move it here.

This change completes that TODO by moving the mirror-workspace-git-repos code into prepare-workspace-git and places the repo in a sensible and maintainable state with two simple and good options:

 * prepare-workspace (rsync)
 * prepare-workspace-git (git)

In the unlikely event anyone is still using mirror-workspace-git-repos standalone (OpenStack/OpenDev is not, and that solution was haphazard as described above) they would be well served by a notification that there is a better alternative which is what most of the community actually uses now.

[0] cfffd4431b8efc2f4df1999ecb89384a29c59238
[1] 348598e96aac742954fa326a15a4ef8fd7f71b8b
[2] 7cee7156bcde8bc396ac4b6581bf2cae02eea0e9

Change-Id: Ib80e0447d49363182fd0d4c4d4e269841bc3aa95
2023-09-25 14:51:26 -07:00
Clark Boylan
378e039dba Remove the nox-py27 job
We added nox somewhat recently and set it up to mimic existing tox jobs.
This meant adding py27 jobs. Since then (in OpenDev at least) only a
single project has used the py27 job: Bindep. Bindep is dropping support
for python2.7 as the need for it has come to an end. Additionally, nox
doesn't work with python2.7 out of the box due to a virtualenv
dependency that ends up being too new for python2.7 venv creation.
Rather than hack around that let's drop python2.7 job support.

Change-Id: I52c07b01ad173304c19b13a10927fdadf9d84170
2023-08-22 14:28:36 -07:00
James E. Blair
78b2911f17 Mark nim jobs unmaintained
The nim test jobs do not work across the board and no one has
stepped up to fix them.

Change-Id: I1bdd9ca95cd4b45c25d2a2645810c19a90e3cc55
2023-08-11 09:12:13 -07:00
Clark Boylan
18b32703ed Add ensure-quay-repo role
This adds a new role that can be used to ensure a quay repo exists
before publishing to it. This is particularly useful for creating public
repos in quay as simply pushing to a repo with quay will create a
private repo by default.

Change-Id: I979f1b9b64f901bb8d54b8991bb9142b18b6330f
2023-04-21 15:09:42 -07:00
Ian Wienand
fec27296c8
remove-registry-tag: role to delete tags from registry
This is a role to abstract removal of tags from registries, which is
an operation that practically has to be done via the registry API.

This implements removing tags from the quay and docker API's.

For the common case of working with a repository like
"quay.io/org/project" there is minimal configuration.  However, if you
run a private repository, this is flexible with a few extra variables
to tell the role to use the quay API but your own URL.

By default it clears out old tags from the Zuul promote pipeline.
However if you set registry_tag_remove_tag it will only remove that
one tag.

This is inspired by the current work done in promote-docker-image
role.

Change-Id: I7f2d9d00024e34451e2d20b2c2f8171ecd151943
2023-04-04 09:53:18 +10:00
James E. Blair
466aa92635 Add container build jobs
These jobs use the container build roles.

Change-Id: I13d1987980bc3d0b1c717878a4bc47edc6dcfe1c
2023-03-23 09:47:49 -07:00
okozachenko
0c3b87f20e Add promote-container-image role
This role uses skopeo to perform image operations.

Also update the container roles docs to add missing documentation
for the already existing upload-container-image role.  Clarify
some ambiguity about the registry and repository attributes of
the container images data structure.

Change-Id: Ib66c85daf0edacf0dd797ab34b0d629f99c7111b
Co-Authored-By: James E. Blair <jim@acmegating.com>
2023-03-21 10:17:49 -07:00
Ade Lee
99711abf23 Add ubuntu to enable-fips role
The enable-fips role has been refactored to support both centos/rhel and
Ubuntu.

In addition, for the Ubuntu tasks, a small role is added to enable a
Ubuntu Advantage subscription.  This is required because Ubuntu requires
a subscription to enable FIPS.  This role takes a subscription key as a
parameter (ubuntu_ua_token.token).

In Openstack, this is provided by the openstack-fips job in
openstack/project-config, which will be the base job for OpenStack jobs.
This job will provide the ubuntu_ua_token.token.

Change-Id: I47a31f680172b47584510adb672b68498a85bd32
2023-02-09 19:02:00 +00:00
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
James E. Blair
77b1b24911 Add ensure-nox role
This is an alternative to tox.

Change-Id: I394774836e303584473f0e7d64d496baa393037a
2022-12-15 13:22:49 -08:00
Michael Kelly
b0cc01ceac
helm: Add job for linting helm charts
This job runs 'helm lint' on the user specified charts.

Change-Id: Ie6f39bab366b683e773add181de516c3ac913866
2022-11-16 15:09:07 -08:00
Clark Boylan
866ae1c52b Pin py38 jobs to focal
The default base job nodeset is moving from focal to jammy. Jammy
doesn't have python3.8 to run these jobs. Address that by explicitly
forcing these jobs to run on focal.

Change-Id: I57433092ea2afbec4546659ea20f31161cc41a6e
2022-10-25 10:05:49 -07:00
Zuul
21faa1a9d8 Merge "Add the post-reboot-tasks role" 2022-06-17 15:46:53 +00:00
Ade Lee
25caf7ef5e Add the post-reboot-tasks role
This role will do basic checks to confirm that the node is
sufficiently up to continue afer a reboot.

Change-Id: Iebf474c9351e4246d7ab2072b48a50e93dbf0b94
2022-06-06 04:56:14 -07:00
James E. Blair
0c980bbcb7 Make test-prepare-workspace-git role
This is a copy of prepare-workspace-git except that it imports
test-mirror-workspace-git-repos.  This is for base job testing.

Change-Id: I4ef3e4376c9e958761c165836c4fb546157e237a
2022-05-19 11:40:44 -07:00
Zuul
775729a4c0 Merge "Add per-build WinRM cert generation" 2022-04-26 21:52:35 +00:00
James E. Blair
59d7af0e67 Add per-build WinRM cert generation
This adds roles that, similar to add-build-sshkey, create a per-build
WinRM certificate, install it on remote windows nodes, and then switch
to using the certificate in Ansible for authentication.  A second role
is included which can clean up the cert which is useful for static
nodes.

Since winrm certificates must be acessible within the bubblewrap
container, these roles can be used to restrict the system-wide winrm
cert to trusted playbooks while untrusted playbooks will only have access
to the per-build cert (with appropriate configuration of the executor).

Change-Id: I4efe25594c2f543886a000aa02fb0a38683a43cb
2022-04-13 15:04:51 -07:00
Zuul
9761561e5a Merge "Add upload-logs-ibm role" 2022-04-11 22:30:23 +00:00
James E. Blair
a8b4bc6ff3 Add upload-logs-ibm role
This role uploads logs to IBM Cloud object storage.

Change-Id: Ibe1131f863a64051b427fcb03b126b1577c4843a
2022-04-11 14:20:49 -07:00
Zuul
70c30231cd Merge "Add tox-py310 job" 2022-04-04 13:51:04 +00:00
Sorin Sbarnea
f5dbe71c49 Add tox-py310 job
Change-Id: Ib6a06893c0b4c7e5c988acf7315b17367b330d9e
2022-03-24 13:25:04 +01:00
Ian Wienand
ad7093c17b encrypt-file : role to encrypt a file
This is a role that takes some ASCII gpg keys, and encrypts a file
with them.

Change-Id: If2fe7921ff051a1c5d0589f5e32fba26d30ae96c
2022-02-19 08:05:40 +11:00
James E. Blair
90c427d630 Switch docs theme to RTD
To match change I2870450ffd02f55509fcc1297d050b09deafbfb9 in Zuul.

This does not use the versioning feature due to the nature of this repo.

This also corrects a reference which is now an error.

Change-Id: Ia1d31df932b447f11bc588925de9974d4f6dfc7d
2021-12-16 06:48:49 -08:00
Andre Aranha
cac1875575 Add fips version of jobs needed for OpenStack
FIPS needs to be enabled before test-setup is run, as enabling
FIPS requires the node to be rebooted, test-setup needs to run and
setup the environment after the reboot.

Change-Id: I6fecb9c6e917d1a36b2b82c1b02098eed4323ac7
2021-11-05 14:17:26 +00:00
Douglas Viroel
9107f3ee7d Add FIPS enable multinode job definition
This patch adds a new multinode job definition that enables
FIPS mode prior to multinode configuration.
In order to enable FIPS mode, the OS boot procedure need to be
changed to enable the appropriate kernel flag. This modification
has effect only after system reboot.
The default behavior of this job is to always enable FIPS mode.

Change-Id: I6f1365837d9ed2ba82c391a20f9094c9ef0e6c4e
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-10-20 11:20:52 -03:00
Jeremy Stanley
483838ceca Deprecate EOL Python releases and OS versions
Update the deprecation policy to indicate that zuul-jobs is no
longer tested with EOL platforms. Also explicitly switch the minimum
Python 3 documented to 3.6, and add a note to the tox-py34 and
tox-py35 jobs mentioning that they're no longer directly tested.
Move those jobs to the deprecated jobs list as well, to help
reinforce the point that their continued use is not recommended.

Change-Id: I2edbf8ea010caf7a7641e0d88f360965fc0b96ab
2021-09-23 17:35:32 +00:00
Ade Lee
be0415e556 Add role to enable FIPS on a node
Adds role to be used to enable FIPS on test nodes, so that projects
can create jobs that would test when FIPS is enabled.

This is pretty much copied from the same role in ansible zuul jobs, where
it works well. Thanks to Paul Belanger for pointing it out.
https://github.com/ansible/ansible-zuul-jobs/blob/master/roles/enable-fips-mode/tasks/main.yaml

An example showing how this is can be used is in:
https://review.opendev.org/c/openstack/barbican/+/760665

Change-Id: If07b8ddb77368d591659f3a111e3f5306daf6f06
2021-06-11 14:30:39 -04:00