Several things have bit rotted in here that we need to take care of.
First is that we updated the default nodeset to Noble which breaks our
ability to install Pillow<10 for blockdiag. To fix this we need to
install libjpeg-dev so that we can build a Pillow wheel locally during
testing.
Next old ansible-lint doesn't run on Noble's python3.12. We bump up
Ansible lint to a modern version that matches Zuul's current default
Ansible. We also stop installing zuul to get zuul_console and
zuul_return and instead simply mock them in the linter. To make this
work we have to drop the ansible-playbook syntax check run which is fine
because ansible-lint runs this too, but when done via ansible-lint the
mocked modules are respected [0].
Finally we have to clean up/ignore some of the new linter
warnings/errors.
[0] https://ansible.readthedocs.io/projects/lint/rules/syntax-check/
Change-Id: Ia0e936fefc9e2b0f2fa614c93a2f168e14b2825b
This updates the promote and publish secrets and jobs to no longer
rely on jinja templates in secrets since Zuul removed support for
that.
Instead, we use python string formatting, and pass in only known
safe static variables (ie, the "zuul" hierarchy).
Change-Id: Icf267c0313b451d20f28075717a0380c570fe30d
Change I49afb49dd8301abec44c2aacddb8c62e73e0eb02 modified this to use
the upload-afs-synchronize role instead of a plain synchronize:. This
role makes sure the flags are set correctly for copying to AFS.
However, it left behind the "delegate_to" which isn't valid with an
include_role; the job [1] is failing with
ERROR! 'delegate_to' is not a valid attribute for a IncludeRole
Remove this.
[1] https://zuul.opendev.org/t/zuul/builds?job_name=opendev-promote-javascript-deployment
Change-Id: I5d817d61657a840f39359f24f6a9cd13e2238936
Ansible changed, then unchanged their behavior around file modes, but
being explicit is likely a good idea to handle any new future changes
from ansible.
We set modes generously (to 755 for dirs and 644 for files) to avoid
unexpected access problems. Note that depending on the perms in AFS this
may cause a perms ot update on existing dirs but that should be fine as
long as we aren't making them more restrictive.
Finally we skip two cases where modes are required by the linting rule
because they are tarball extraction steps and applying a single mode to
all dirs and files in a tarball doens't make a ton of sense.
Includes bumping linter configuration.
Change-Id: Iacf41549928ba7f05f0f71a79ddef1b6e1154e2a
Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
This is required in order to avoid this error:
ModuleNotFoundError: No module named 'setuptools'
The version of ansible-lint we were using has a bug which causes a
false positive on ensure-pip, so we update the ansible-lint version
to match that in zuul-jobs and update the skips accordingly. This
also flags lack of spaces in {{braces}} so those instances are
fixed.
Change-Id: I9d122631126ab65507f0a5616ff6741066a7acf8
The prior change Ie8fcf62706cd69f20e29bc1f2f29c5d266ff443f updated
some incorrect rsync copy flags to work around AFS permissions. This
was something already figured out by the upload-afs-synchronize role
which was intended to be a generic way to upload things to AFS with
the synchronize module (used by tarball and other artifact
publishing). Use it instead to standardise the way we copy.
Change-Id: I49afb49dd8301abec44c2aacddb8c62e73e0eb02
The new javascript jobs need a new promote job for the tarballs,
but also need a new promote job for publishing the content
inside those tarballs.
Change-Id: I437795ae30384bb8d759e19907d5a91426ab3e46
In Zuul, we're publishing both the sdist and the js-content tarball,
but because of the strict naming rules encoded in the promote job,
they are both renamed to "zuul-master.tar.gz". Instead, let the
js content job specify that it should have a slightly different
name.
Change-Id: I57e6173e3ee058665e908aba786f8966a8d812f4