2014-09-25 15:56:46 +00:00
|
|
|
[tox]
|
|
|
|
minversion = 1.6
|
2017-09-25 14:56:08 +00:00
|
|
|
envlist = linters,gerrit,grafyaml
|
2014-09-25 15:56:46 +00:00
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
2022-12-25 02:51:03 +00:00
|
|
|
passenv =
|
|
|
|
http_proxy
|
|
|
|
HTTP_PROXY
|
|
|
|
https_proxy
|
|
|
|
HTTPS_PROXY
|
|
|
|
no_proxy
|
|
|
|
NO_PROXY
|
2019-03-18 16:13:11 +00:00
|
|
|
basepython = python3
|
2014-09-25 15:56:46 +00:00
|
|
|
|
2015-12-21 19:45:31 +00:00
|
|
|
[testenv:linters]
|
2022-12-12 17:26:48 +00:00
|
|
|
allowlist_externals =
|
|
|
|
bash
|
|
|
|
{toxinidir}/tools/ansible-lint-roles-cache.sh
|
|
|
|
{toxinidir}/tools/run-bashate.sh
|
|
|
|
{toxinidir}/tools/zuul-projects-checks.py
|
2017-10-27 15:25:10 +00:00
|
|
|
setenv =
|
2022-07-28 00:41:25 +00:00
|
|
|
# NOTE(ianw) : In the gate job openstack-zuul-jobs-linters this is
|
|
|
|
# overridden to the Zuul checkouts of the projects. Locally,
|
|
|
|
# tools/ansible-lint-roles-cache.sh will populate these for the
|
|
|
|
# linter.
|
|
|
|
ANSIBLE_ROLES_PATH={env:ANSIBLE_ROLES_PATH:{toxinidir}/.cache/ansible-lint/opendev/base-jobs/roles:{toxinidir}/.cache/ansible-lint/opendev/system-config/roles:{toxinidir}/.cache/ansible-lint/zuul/zuul-jobs/roles:{toxinidir}/.cache/ansible-lint/openstack/openstack-zuul-jobs/roles}
|
2018-08-10 04:27:56 +00:00
|
|
|
|
2017-11-01 19:41:24 +00:00
|
|
|
# Add dependencies here since other jobs use python2 and zuul requires
|
|
|
|
# python3.
|
|
|
|
deps =
|
2020-11-04 23:15:00 +00:00
|
|
|
# ansible-lint brings in the latest version of ansible, but we
|
|
|
|
# keep this in sync with what Zuul uses so we don't allow though
|
|
|
|
# things from a later ansible that would actually fail in
|
|
|
|
# production.
|
2022-07-28 00:41:25 +00:00
|
|
|
ansible>=5,<6
|
2023-05-16 20:05:54 +00:00
|
|
|
# pin these two until someone has time to update all our skips to >=6.16
|
2022-08-29 23:22:03 +00:00
|
|
|
ansible-lint>=6.0.0,<6.5.0
|
2023-05-16 20:05:54 +00:00
|
|
|
ansible-compat<4
|
2022-01-10 19:28:54 +00:00
|
|
|
hacking>=4.0.0,<5.0.0
|
2017-11-01 19:41:24 +00:00
|
|
|
bashate>=0.2
|
2017-10-27 06:02:33 +00:00
|
|
|
commands =
|
2022-07-28 00:41:25 +00:00
|
|
|
{toxinidir}/tools/ansible-lint-roles-cache.sh
|
2017-11-01 19:41:24 +00:00
|
|
|
{toxinidir}/tools/run-bashate.sh
|
|
|
|
flake8
|
2017-11-02 11:04:45 +00:00
|
|
|
# Run some policy checks on zuul.d/projects.yaml
|
|
|
|
{toxinidir}/tools/zuul-projects-checks.py
|
2017-10-27 06:02:33 +00:00
|
|
|
# Ansible lint
|
2017-10-28 14:51:21 +00:00
|
|
|
bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \
|
2022-07-28 00:41:25 +00:00
|
|
|
xargs -t -0 ansible-lint"
|
|
|
|
bash -c "find roles -maxdepth 1 -mindepth 1 -type d -printf '%p/\n' | \
|
|
|
|
xargs -t ansible-lint"
|
2018-07-27 15:46:39 +00:00
|
|
|
# Make sure site-variables at least parses
|
2021-10-18 11:05:07 +00:00
|
|
|
python -c 'import yaml ; yaml.safe_load(open("zuul/site-variables.yaml", "r"))'
|
2017-10-27 06:02:33 +00:00
|
|
|
|
2014-12-09 20:10:41 +00:00
|
|
|
[testenv:gerrit]
|
2022-12-25 02:51:03 +00:00
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/tools/check_valid_gerrit_projects.py
|
|
|
|
{toxinidir}/tools/check_projects_yaml_alphabetized.sh
|
|
|
|
{toxinidir}/tools/check_valid_gerrit_config.sh
|
2019-04-09 17:35:05 +00:00
|
|
|
deps =
|
|
|
|
PyYAML
|
|
|
|
ruamel.yaml
|
|
|
|
GitPython
|
2014-12-09 20:10:41 +00:00
|
|
|
commands =
|
2019-05-17 07:13:41 +00:00
|
|
|
{toxinidir}/tools/check_valid_gerrit_projects.py gerrit/projects.yaml gerrit/acls zuul/main.yaml
|
2016-06-22 06:15:12 +00:00
|
|
|
{toxinidir}/tools/check_projects_yaml_alphabetized.sh gerrit/projects.yaml
|
2019-05-31 18:14:47 +00:00
|
|
|
{toxinidir}/tools/check_valid_gerrit_config.sh
|
2014-12-09 20:10:41 +00:00
|
|
|
|
2014-09-25 15:56:46 +00:00
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:irc]
|
2022-12-25 02:51:03 +00:00
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/tools/check_irc_access.py
|
|
|
|
{toxinidir}/tools/irc_tests.py
|
|
|
|
{toxinidir}/tools/check-channels-yaml.sh
|
2019-04-09 17:35:05 +00:00
|
|
|
deps =
|
|
|
|
PyYAML
|
|
|
|
ruamel.yaml
|
|
|
|
irc
|
2015-03-06 09:39:45 +00:00
|
|
|
commands =
|
2021-05-24 18:51:42 +00:00
|
|
|
{toxinidir}/tools/check_irc_access.py -l accessbot/channels.yaml opendevaccess
|
2015-03-06 09:39:45 +00:00
|
|
|
{toxinidir}/tools/irc_tests.py
|
2015-09-28 21:05:37 +00:00
|
|
|
{toxinidir}/tools/check-channels-yaml.sh
|
2014-09-25 15:56:46 +00:00
|
|
|
|
|
|
|
[flake8]
|
|
|
|
show-source = True
|
2022-08-26 19:51:57 +00:00
|
|
|
exclude = .tox,.test,.cache
|
2017-10-21 17:01:02 +00:00
|
|
|
# These are ignored intentionally in openstack-infra projects;
|
|
|
|
# please don't submit patches that solely correct them or enable them.
|
|
|
|
ignore = E125,E129,E402,H,W503
|
2014-09-25 15:56:46 +00:00
|
|
|
|
2015-09-17 17:19:17 +00:00
|
|
|
[testenv:grafyaml]
|
2018-06-05 03:21:04 +00:00
|
|
|
deps =
|
2019-04-21 13:35:55 +00:00
|
|
|
{env:GRAFYAML_SRC:git+https://opendev.org/opendev/grafyaml#egg=grafyaml}
|
2018-06-05 03:21:04 +00:00
|
|
|
commands = grafana-dashboard validate grafana
|
2015-09-17 17:19:17 +00:00
|
|
|
|
2016-05-29 00:39:04 +00:00
|
|
|
[testenv:bindep]
|
|
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
|
|
# separately, outside of the requirements files.
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|
|
|
|
|
2015-04-16 17:05:04 +00:00
|
|
|
[testenv:infra-docs]
|
2022-12-25 02:51:03 +00:00
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/docs-site/generate_infra_index.py
|
2015-04-16 17:05:04 +00:00
|
|
|
deps =
|
|
|
|
Jinja2
|
|
|
|
PyYAML
|
|
|
|
commands = {toxinidir}/docs-site/generate_infra_index.py {toxinidir}/docs-site/infra-documents.yaml
|
2015-03-15 16:50:12 +00:00
|
|
|
|
2014-12-11 21:22:48 +00:00
|
|
|
[testenv:specs]
|
2022-12-25 02:51:03 +00:00
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/specs/generate_specs_site.py
|
2014-12-11 21:22:48 +00:00
|
|
|
deps =
|
|
|
|
Jinja2
|
|
|
|
PyYAML
|
|
|
|
commands = {toxinidir}/specs/generate_specs_site.py {toxinidir}/specs/specs.yaml
|
2015-10-01 05:12:51 +00:00
|
|
|
|
|
|
|
[testenv:dib]
|
2022-12-25 02:51:03 +00:00
|
|
|
allowlist_externals =
|
|
|
|
env
|
2015-10-01 05:12:51 +00:00
|
|
|
deps =
|
|
|
|
diskimage-builder
|
2020-05-27 15:00:54 +00:00
|
|
|
yamllint
|
2015-10-01 05:12:51 +00:00
|
|
|
changedir = {toxinidir}/nodepool
|
2017-03-25 18:42:16 +00:00
|
|
|
commands = env ELEMENTS_DIR=elements dib-lint
|
Add script to facilitate project renaming in project-config repo
This takes a list of projects from stdin in the format of
aeromancer
anvil
blazar
and renames stackforge/aeromancer, stackforge/anvil, and stackforge/blazar
to openstack/aeromancer, openstack/anvil, and openstack/blazar respectively
in gerrit/projects.yaml, gerritbot/channels.yaml, zuul/layout.html,
and every file in jenkins/jobs/ , as well as renaming acl files.
A side effect of this process is that comments will be stripped from
gerritbot/channels.yaml ; if you are committing the results of a run of
this script, please re-add the comments manually unless we come up with
a more elegant solution.
This script also has test coverage for verification and documentation.
Also included is a WIP list of renames in data/stackforge-renames, as
per
http://eavesdrop.openstack.org/irclogs/%23openstack-infra/%23openstack-infra.2015-10-13.log.html#t2015-10-13T20:10:17
and a WIP list of retirements in data/stackforge-retirements, which
is not used by the script in this change.
Co-Authored-By: Augustina Ragwitz <aragwitz+lp@pobox.com>
Change-Id: Iaf2a13d8b9b9a840d9fde07ec1ef65d1c9e90e8e
2015-09-25 18:56:57 +00:00
|
|
|
|
2015-10-29 08:32:57 +00:00
|
|
|
[testenv:nodepool]
|
2022-12-25 02:51:03 +00:00
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/tools/nodepool-validate.sh
|
2018-10-18 14:36:38 +00:00
|
|
|
deps = nodepool
|
2018-01-19 07:44:57 +00:00
|
|
|
commands =
|
2018-01-19 18:32:05 +00:00
|
|
|
{toxinidir}/tools/nodepool-validate.sh
|
2017-09-23 16:36:37 +00:00
|
|
|
|
|
|
|
[testenv:add-projects-to-main]
|
2022-12-12 17:26:48 +00:00
|
|
|
allowlist_externals =
|
2017-10-05 19:33:58 +00:00
|
|
|
git
|
2017-09-23 16:36:37 +00:00
|
|
|
deps =
|
2017-10-05 19:33:58 +00:00
|
|
|
ruamel.yaml
|
|
|
|
commands =
|
|
|
|
python tools/add-projects-to-main.py
|
|
|
|
git diff-files --quiet
|
2019-04-11 06:56:08 +00:00
|
|
|
|
2023-05-09 19:32:50 +00:00
|
|
|
[testenv:normalize-gerrit-acl]
|
|
|
|
commands =
|
|
|
|
python {toxinidir}/tools/normalize_acl.py {posargs} apply
|
|
|
|
|
2019-04-11 06:56:08 +00:00
|
|
|
[testenv:normalize-projects-yaml]
|
2022-12-25 02:51:03 +00:00
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/tools/normalize_projects_yaml.py
|
2019-04-11 06:56:08 +00:00
|
|
|
deps =
|
|
|
|
ruamel.yaml
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/normalize_projects_yaml.py
|