This job that tests the zuul-jobs tox role runs various tox targets
including the docs target. This means we need to install dependencies
for doc building. On Ubuntu Noble this include libjpeg-dev for Pillow
wheel building and we fail without this profile installed.
We keep the default profiles of compile and test because we also run
other targets that likely depend on these profiles.
Change-Id: Ifa3495488f35b1fbe4fc665c4d0ac5ed8adb33aa
This is no longer present in Ansible 9.
Removing these upsets ansible-lint, so those errors are ignored.
The base roles job has bitrotted on centos-7 and bionic due to
a bad voluptuous release used in an stestr test. That is fixed in
this change as well.
Change-Id: I67886d5ad82ab590979f82bd102d6f974b9d4421
This adds names to blocks and includes for consistency. We've done
this before (e.g. Ia7e490aaba99da9694a6f3fdb1bca9838221b30a) but I
guess 6.12.0 is finding more...
Change-Id: Ib451f6d3c5a18047873e63aa0a1aa2b425846fec
Some projects are converting from tox to nox for driving tests. This
means there isn't a tox env to find testr/stestr in. Update
fetch-subunit-output to look for nox envs as well.
Change-Id: I051c4b27d22921f1f0c3a44dc4eaccdbb50afa29
The previous change added a bunch of tox v4 compatiblity, now we switch
to as our default. This should only happen after people have had
sufficient time to add tox v4 compatibility or manually pin back to <4
in their projects.
Change-Id: I16742fb933dba2162a73d532e1a9613af69021aa
The test-tox job exercises the "requires" setting in tox.ini, and
to do so it uses a small package, tox-bindep. This was originally
added in I521580da978903cd116c872447b1c028c470e63d.
This package is not compatible with tox v4, so to retain this test
we update the test tox.ini file to use another small package,
requestsexceptions, which does not interact with tox and so does
not suffer from this problem.
Change-Id: I6c4737c138bf138afbb4b15d64ac11437c725d4a
Tox appears to be very good at always installing the latest version of
itself when you use environment requirements. This was fine until latest
tox stopped accepting the %s environment (but only when you don't
specify the environment explicitly). This %s environment was added to
check that tox siblings behavior didn't interpolate strings, but we use
RawConfigParser now to prevent that and that shouldn't change any time
soon. Testing this otherwise seems painful.
Instead of simply deleting this test we modify it to use a new
acceptable name in order to test the running of a target with a non
default config file path.
Change-Id: Ie92f2a2536ea03ac2058659a083fb23151303ed0
Tox 4 released today and is a complete rewrite with many backward
incompatible changes. We need to update a number of things to support
that in the zuul-jobs tox role and elsewhere. A possibly incomplete
list of what was changed in this commit to make this work:
* Don't run tox --showconfig with {{ tox_extra_args }} as -vv is
in tox_extra_args by default and results in interleaved debug
output in the ini output making it invalid ini content.
* Update the tox siblings tox config parser to look for renamed
environment dir locations.
* Stop using whitelist_externals and use allowlist_exteranls
because whitelist_externals is removed and external commands that
are not explicitly allowed produce errors.
* Make the tox version configurable in ensure-tox as some users
may not be able to easily upgrade to tox v4.
* Escape literal # chars in tox.ini as they are treated as comments
when in the command strings now.
https://github.com/tox-dev/tox/issues/2617
Change-Id: I38e13b4f13bb1b2d6fb7e5c70b708e9bb016a455
New tox>=4 does not prefix the filenames with the env name. THis means
we'll squash together log files if more than one env is run. Address
this while on tox v3 to avoid regressions.
Change-Id: I2601cc7faa1f7a5d7f2d950d637dfa84c50717ae
Some of our jobs have started failing with
error: Multiple top-level packages discovered in a flat-layout:
['roles', 'playbooks'].
... <and so on> ...
which seems to be a combination of jobs that don't run often and some
recent-ish version of setuptools/pip. From what I can tell, what we
want to do here is disable autodetection as what we have isn't really
a python distributable package.
Also fix the two places this is monkey-patched in over the existing
file.
Change-Id: I2a0dfbbedbb9bddd34b6af691118cf7c422a82b0
When we added this test I used ensure-pip in the ensure-twine role to
pull in the pip dependency. But we soon realised that ensure-twine
ran in a rootless context so couldn't install packages, and reverted
it with I2cf4224228860b8a2cddd360636bb8633967b07e.
However, this testing wasn't fixed up. Use ensure-pip in the test
playbook before we run the test, and add a note to ensure-twine that
it runs without privileges.
Change-Id: I6aef14b188dce8c4de774b09ddad718fec8fbf6c
Simplify the update procedure by tagging the checkout with the current
unix timestamp, so we should always having an increasing version
number. This means we can do the test upload unconditionally in the
check gate. Given this runs very infrequently, this shouldn't be a
burden.
Change-Id: I12c222802297d760296d35651db8d22fedb6dab4
This does a full upload of the sandbox project to the test.pypi.org
service.
It uses the inline token with the caveats noted in the comment. Since
you can't upload the same version twice, always running this in the
check job will mean it will work the first time, but then fail (unless
something has been committed to the sandbox to update the version
number). As noted, the idea is that we develop the change and then do
one run that does a full test, and reviewers can check that before
committing. There's no real way to use a secret here because we
actually want this to run at check time, not in any post pipeline
where it would already be in production. We don't want to do
something like require committing something to sandbox every time you
run this in the check queue, etc. Given how much this is actually
updated (most of it hasn't been touched since 2019) I think this is a
reasonable compromise.
Change-Id: Ida4ad07c82a6301107c938565656988aba3bf250
Very basic testing to include the ensure-twine and upload-pypi role.
This really just does a syntax and sanity check.
Change-Id: Ie40ec32b3b2ffc4646301c6e145c527fe6a3bae2
Update the alternate tox.ini files in test-playbooks/python to
trigger configuration we saw expose a bug in the siblings lib's
showconfig parser when a tox.requires value resulted in pip
activity. Update its minversion to the earliest tox which provides
the tox.requires configuration option, for clarity.
While we're there, switch to using tox_config_file instead of
overriding zuul_work_dir since that's now an option for this role
and was previously not exercised in the test job.
Change-Id: I521580da978903cd116c872447b1c028c470e63d
In change Iafeb88eaf9a596603ad4d2134a4574345d5189ab we fixed a bug
with handling of `tox --showconfig -vv` in the siblings tasks for
the tox role. This arose because of the desire to add tox_extra_args
to all tox invocations in Ibfe77f67e43135ae5af7588d6859b8b3dbd4c3ca
because we currently set a default of '-vv' for the tox_extra_args
rolevar. This fix could easily regress in the future if we were to
ever change the default value, so explicitly test with it in the
zuul-jobs-test-tox job by adding it to the python/tox test playbook.
Change-Id: Ib6ddf7d188904193a5ecd520acac1d676e5d78ae
- bumps ansible-lint to 5.0
- updates our custom rules to make them compatible with 5.0
- replace custom module mocking with native ansible-lint ones
- remove custom call of ansible-playbook --syntax-check as now this
is done by ansible-lint
- assured molecule vars are hosted under a vars/ folder in order to
avoid confusing linter detection.
- replaced custom rule for loop var names in role as now this this an
optional core feature of the linter (see config)
- replaced custom rule no-same-owner with opt-in one (see config)
Change-Id: I233fae8c9036d295968a97ee80e07fde8846c633
The merge-output-to-logs role is not doing anything in this test. As
described inline, this merges files in
zuul.executor.work_root/<docs,artifacts> into the
zuul.executor.log_root directory so they are available in change
results.
Since this job doesn't publish anything there, this role is unused.
merge-output-to-logs currently can't run because it tries to run shell
scripts on the executor. Thus we can remove this unused role and
restore the job.
Change-Id: I1afc905aa8d9c420bed316e99760ad7ad1d838ce
Setting tox_envlist to venv by default is unintuitive for
many users. Remove this behaviour and let default tox
behaviour be the same as running tox on the commandline.
Change-Id: I1b6d59ee4ebb7f6b3adcf4bd35d7148e83389008
Avoids runtime warnings from use of Ansible shell/command module when
executed commands also have ansible modules.
Change-Id: I4e415cbd34f0f4cb15857051bf95458e0316de86
Since tox_envlist has a default value it cannot be undefined
so the fail task will never run. Instead handle the case when
tox_envlist is an empty string by getting the default configured
envlist from tox. Also handle the casewhen tox_envlist is 'ALL'.
This also updates tox_install_sibling_packages to correctly
handle multiple testenvs and uses configuration supplied by
'tox --showconfig -e <envlist>' instead of guessing where the
envdir and logdir are located.
We also cannot run tox inside python because it gets complicated
to know which tox_executable we should call during the python test
cases so run these commands in ansible and pass the output to
tox_install_sibling_packages.
Since role params have higher precedence than set_fact we set an
internal _tox_envlist fact that is a comma separated list of testenvs
that should be run.
Change-Id: I9e5a1b041f653cbcff7b8ed62e4a95a0a040fdd7
This change enables using fetch-sphinx-tarball role along with
the fetch-output role. By default the role still synchronizes
artifacts back to the executor.
Change-Id: I7452f34bccdca49e256053f9630f77953b27f99c
This change enables using fetch-sphinx-output role along with
the fetch-output role. By default the role still synchronizes
artifacts back to the executor.
Change-Id: I81c8a2faf566be694dbf1c59cbbd157dc4df5146
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
This change enables using fetch-subunit-output role along with
the fetch-output role. By default the role still synchronizes
artifacts back to the executor.
Change-Id: I50a50856b96a9112c1b4be82ca04b612fd29d939
This change enables using fetch-tox role along with
the fetch-output role. By default the role still synchronizes
artifacts back to the executor.
Change-Id: Iffe5ffc52ee4c765b2e23ab8b3235b6bc7c510d8