127 Commits

Author SHA1 Message Date
Michal Nasiadka
d8f31e0a5e CI: Add ansible-lint to tox
* Reworked tox pep8 into linters job, that runs:
  - pep8
  - bandit
  - bashate
  - doc8
  - yamllint
  - ansible-lint (validate-all-files.py + ansible-lint)

* Skip E701 - missing galaxy_info in meta and E602 see [1].
* Skip E301 and E503 - followup later in a separate change
* Added ansible-role-jobs to zuul.d/project.yaml which will run
  openstack-tox-linters job in check queue
* Fixed remaining style issue
* Made tox and docs reference the new env for linters
* Dropped pype environment (not supported)

[1]: https://github.com/ansible/ansible-lint/issues/457

Change-Id: I494b4b151804aac8173120e6c6e42bc2fdb00234
2020-05-17 17:02:38 +02:00
gugug
22f7aecbd9 Enable W503 for flake8 check
W503 and W504 are incompatible and we need to choose one of them.
Existing codes follows W503, so we disable W504.

Change-Id: Ic745e956dd332eb0fa49b93c1e6acb12f8a7f26c
2020-05-17 18:21:39 +08:00
Radosław Piliszek
234272eb64 Cleanup py27 support
Removes and/or replaces all mentions of py27.

Cleans up obsolete requirements and their lower-constraints.

Separates test-requirements.

Makes lower-constraints pass outside of CI (MarkupSafe).

Adds FIXMEs about some hacky Mocks that may misbehave.

Change-Id: Ifc090bf3c1db17d8542ee591c91e8225a597bfe2
2020-04-26 12:16:44 +02:00
Andreas Jaeger
454489762c Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Remove hacking and friends from lower-constraints, they are not needed
during installation.

Change-Id: I7ef5ac8a89e94f5da97780198619b6facc86ecfe
2020-04-04 17:00:17 +02:00
Ghanshyam Mann
2dbaaf569f [ussuri][goal] More cleanup for python 2.7 drop
Cleanup requirement and set ignore_basepython_conflict = True
in tox to avoid python version conflict warning which going
to be error in future.

Change-Id: Iae7e0bb9e8af52ec3aafba7508305d8692d3c762
2020-02-29 15:23:28 -06:00
Michal Nasiadka
328993d8b3 CI: Add doc8 linting of release notes
Change-Id: I1439aa923a9129b752abb4acfb88559930b2178a
2020-02-28 12:12:31 +00:00
Radosław Piliszek
2564b391ed CI: Fix deploy guide jobs
This fixes files relevant for them because k-a uses common files
for both docs and deploy guide.
We need this to finally get rid of Rocky mentions despite our
recent fixes to docs.

Change-Id: I46c564f3d3e53c54148186fbadfd7380c4f2fd30
2020-02-10 14:07:53 +00:00
Marcin Juszkiewicz
bf9c8b5af1 Get rid of Python 2 support
2020 is coming, everyone should be using Python 3 now.

As per the official python support timeline set forth by the OpenStack
TC [1], OpenStack Train (in our case, kolla-ansible 9.x) is the last
release that will support python2.7.

[1] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html

Implements: blueprint drop-py2-support

Change-Id: Ibb3b12a779ecfd424053d0b3e98dac2f21d909bc
2019-12-11 16:07:44 +00:00
Radosław Piliszek
a2fc684164 CI: Refactor a lot
Separate upgrade logic to is_upgrade job var and rename
scenarios to match.

Rename "ACTION" to "SCENARIO" (as it is a scenario).

Separate testing of dashboard (aka Horizon) and increase
its timeout to 5 minutes (CentOS 7 slow as always).

Separate initialization of core OpenStack.

Use gate setup script from ./tests/

Remove useless tox setupenv.

Do not deploy Heat when not really necessary.

Change-Id: I4fca319ccc3de7188f8b7b44c9c71321e3899467
2019-11-26 17:30:14 +01:00
jacky06
cde22bdddb tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: I405812a0039274139e055c54ab7b451dc753c842
2019-10-14 18:20:35 +08:00
Mark Goddard
ef3abc455f Build pdf doc
The is one of community goals that each project should produce a
single PDF file. The pdf should be in the output of openstack-tox-docs
job.

TeX packages are required to build PDF locally, following is
recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:
https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
https://etherpad.openstack.org/p/train-pdf-support-goal
https://etherpad.openstack.org/p/pdf-goal-train-common-problems

Change-Id: Ia0f8b73bcbda6295319f5c8de1aa02a40844207b
2019-09-17 14:14:18 +01:00
Corey Bryant
09b5738168 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Ic5f9c5c666e08bc34127d97f9540033536c5b08f
Story: #2005924
Task: #34216
2019-07-05 11:44:23 -04:00
gujin
f41531851f Update the UPPER_CONSTRAINTS_FILE to releases.openstack.org
1. Update the UPPER_CONSTRAINTS_FILE to releases.openstack.org[1]
2. Blacklist sphinx 2.1.0[2]

[1]: http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html
[2]: https://github.com/sphinx-doc/sphinx/issues/6440

Change-Id: Ie5f9ae1bd5c45617c6b7fde0e490d471e172c24e
2019-07-03 15:30:44 +00:00
Doug Szumski
9a402018fc Include cron_generator script in coverage report
Change-Id: Ic011c25c491d7d2e1d1d656d8d1653e14bb2d1f1
2019-06-07 15:01:03 +00:00
Zuul
9ceb058d20 Merge "Update the min version of tox" 2019-04-24 16:02:47 +00:00
ZhongShengping
41f3a817ac Move to opendev
1.Use opendev.org instead of git.openstack.org.
2.Use review.opendev.org instead of review.openstack.org.

You can see the discussion below:
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html

Change-Id: Ice4509204df788a1a44a06fb89fb44cfe6b54b94
2019-04-23 13:28:39 +08:00
confi-surya
11c18f83e8 Update the min version of tox
In Train, we will use python3.6 and 3.7 for which
the minimum tox version required is 2.5[1]

[1]https://tox.readthedocs.io/en/latest/changelog.html#v2-6-0-2017-02-04

Change-Id: I9b3dec141bd9e62739be00b69d033807cc2a2bd7
2019-04-22 16:11:07 +05:30
confi-surya
db052b7d18 Drop py35 jobs
Python 3.5 was the target runtime for the Rocky release. The current
target py3 runtime for Stein is Python 3.6, so there is no reason to
keep testing against the older version.

https://governance.openstack.org/tc/reference/runtimes/stein.html#python-runtime-for-stein

Change-Id: I0db6c9cbf2af9ed9c701755a26f721aeac97d4cd
2019-02-27 08:57:24 +00:00
Michal Nasiadka
189af13ba6 Fix py35/py36 and k-a-ubuntu-source gate jobs
- py35/py36 jobs are failing
python 3.6 pycache also includes links - so those also
need to be removed by tox testenv

- kolla-ansible-ubuntu-source job is failing
Without basedir set in galera.cnf - mysql_install_db looks for resolveip
in /usr/sbin, instead of /usr/bin, thus complains about cannot resolving
neither $HOSTNAME, nor localhost.

Change-Id: I40514c0a7c43ae01c7680aac81123942be1cdef9
2019-02-14 09:11:54 +01:00
Zuul
0ad1b64c6d Merge "Update min tox version to 2.0" 2018-11-12 13:43:13 +00:00
Mark Goddard
c9c7f3dc89 Add action plugins and modules to coverage report
Currently, the coverage report only includes the kolla_ansible python
module, which only includes the kolla-genpwd command, and that is not
tested.

Change-Id: I16f0e9e0f47914b7ce24bbb515d59e4750228821
2018-11-07 10:02:44 +00:00
Nguyen Hai Truong
aae1b1d0a0 Add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I51f9d000469a6d92f72cc2c732b8763f35cb0c2c
2018-11-06 01:56:15 -08:00
Nguyen Hai Truong
ac6615543e Update min tox version to 2.0
The commands used by constraints need at least tox 2.0.
Update to reflect reality, which should help with local running of
constraints targets.

Change-Id: I426cebf26d4c386355fb0052ed12bda39d67fc49
2018-11-02 00:00:49 -07:00
Zuul
fed5b71b64 Merge "Ignore doc build path" 2018-10-22 13:28:09 +00:00
Doug Szumski
72c9d2cbfe Ignore doc build path
If you build the docs with `tox -edocs` and then run `tox -epep8`,
it will always fail because it checks the build output from the
docs. This change ignores the build folder.

Trivial-Fix
Change-Id: Ie7c53b517b7cfff1d317cad014371c94c6212eac
2018-10-22 09:55:18 +01:00
Nguyen Van Trung
218cbc228f Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: Id7eb248942aff41902dc1e8875530cba49fdf1ee
2018-10-09 10:11:40 +07:00
Zuul
3c1616ffbc Merge "Switch to stestr" 2018-09-24 11:07:48 +00:00
Eduardo Gonzalez
f5e83cedb4 Temporary ignore B303 in bandit tests
Revert this change once the insecure usages are fixed.

Change-Id: Id7e8c9fe72db1b6f123eca540e09f77ddee2f242
2018-08-17 15:04:18 +00:00
Vu Cong Tuan
47d88430ce Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I63079f352ff36dda4f3f64a8681431a319791f0e
2018-07-24 14:18:20 +07:00
Zuul
6b4e370c1f Merge "fix tox python3 overrides" 2018-07-15 12:07:12 +00:00
Liping Mao (limao)
3566daec76 Enable yamllint strict mode
To make sure we can find the yaml warning before code merge[1].
We can enable strict mode to treat warning as error[2].

[1] https://review.openstack.org/#/c/573482/1
[2] http://yamllint.readthedocs.io/en/stable/configuration.html#errors-and-warnings

Change-Id: I0b54bc2bd384f092f2fcd1b0396e133a0d95befe
2018-06-24 16:40:12 +08:00
qingszhao
9bc12e6669 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ie0eca8c8627ab67c7c4aeccdc8607e36a259f13c
2018-06-12 07:40:26 +00:00
confi-surya
dbf754655f Following the new PTI for document build
For compliance with the Project Testing Interface [1]
as described in [2]

[1]
https://governance.openstack.org/tc/reference/project-testing-interface.html
[2]
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

doc8 command is dropped from docs tox envs.
So this affect nothing and run in PEP8.

Related-Bug: #1765348

Depends-On: Icc7fe3a8f9716281de88825e9d5b2fd84de3d00a
Change-Id: Idf9a16111479ccc64004eac9508da575822a3df5
2018-05-21 10:51:59 +01:00
Zuul
e02aef59b9 Merge "add lower-constraints job" 2018-03-29 04:06:43 +00:00
Eduardo Gonzalez
ea1a1dee0d Verify YAML syntax in gates
This patchset implements yamllint test to all *.yml
files.

Also fixes syntax errors to make jobs to pass.

Change-Id: I3186adf9835b4d0cada272d156b17d1bc9c2b799
2018-03-26 17:56:22 +02:00
Doug Hellmann
6e9d77d86e add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I4279572d8eff5434c997717e5cb973afdce97de8
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 14:22:43 -04:00
Jenkins
6fe15ecb17 Merge "Remove doc build errors" 2017-07-19 03:24:45 +00:00
Eduardo Gonzalez
66b91d8bd0 Remove doc build errors
Gates only build deploy-guide docs, not every doc.
This change clean doc errors, only Line to long.

Also, removes doc/build folder in tox doc environment.
doc/build is folder where previus executions are stored
causing next execution to fail due rendered versions does
not follow doc style checks.

Change-Id: I623a7ee245729a06509f3a7039d5d5ed3813d977
2017-07-13 16:11:33 +01:00
Eduardo Gonzalez
eeb932c700 Fix bandit tests directory
- Bandit tests are executed in kolla directory,
  in kolla ansible this directory is kolla_ansible.

- Error is silently ignored:
  Files skipped (1):
  	kolla (No such file or directory)

- Also, in ansible/ there is python code in more places
  than only ansible/library, remove library to pass test
  over the whole ansible directory

- Debug tests fails due cannot import tests.
  ImportError: Start directory is not importable: './kolla-ansible/tests'

Change-Id: I0716034c382209b385105bb3a6e0bb7334076e45
2017-07-10 14:01:46 +00:00
Cao Xuan Hoang
9738f00ebf Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: I7762918aa4d78028d1ceb2cc727c3c7dedd05a00
2017-02-08 10:06:08 +07:00
RobiJoe
566ef56167 Build deploy guide files and tox environment
* This patch moves the tox environment and deployment
guide placeholder files introduced in https://review.openstack.org/#/c/422931
from the kolla/ repository to the kolla-ansible/repository
* Remove or add content as needed

Change-Id: I10cf4b5baaf7f7fed7df800194a0c326372a22fb
2017-01-28 09:33:19 +10:00
Surya Prakash Singh
7b36b042dd Cover environment for kolla-ansible
Enabled the cover environment for kolla-ansible in tox

Change-Id: Ic9f0dbc14ff9f4ef3d82bd06eb58fc145cb121d9
Closes-bug: #1655948
2017-01-16 11:02:20 +00:00
Jenkins
1ce9f82b92 Merge "Removing unused directory "etc/oslo-config-generator" from kolla-ansible" 2017-01-04 11:55:38 +00:00
Surya Prakash Singh
828c9389a6 Removing unused directory "etc/oslo-config-generator" from kolla-ansible
"etc/oslo-config-generator" is being use in kolla repo
too.
Closes-Bug: #1652650

Change-Id: I012830ac3212ebfe954483f076f84541f609bb44
2017-01-04 03:17:21 +00:00
Tony Breeds
84a493c667 Add Constraints support
To be co-installable with other OpenStack projects and have consistent
testing it's a good idea (tm) to use constraints when creating tox
environments.

Change-Id: I83d684d90309ad6109e7f6c21a9c2cad4a5371e2
2016-12-21 11:29:12 +11:00
Jeffrey Zhang
92ff63f3e0 clean up kolla related files
* rename package name from kolla to kolla-ansible
* remove docker for data_files
* remove kolla docker
* remove kolla-build console_scripts

Change-Id: I53abbf79dffb54eb785a39ba04d375bc4e4f27b0
2016-11-30 11:17:35 +08:00
Jenkins
06c001e405 Merge "fix ci gate" 2016-11-22 11:43:36 +00:00
Jeffrey Zhang
db5954e0b3 fix ci gate
* Build kolla image by using kolla project's code
* bump openstack_release to 4.0.0
* Remove tox deploy related env, it is useless now.

Depends-On: I132ee005bce993cbadf411697817c2e95548dc81
Change-Id: Id899eb39d476b95130fbeb43adf4fd49ef32be32
2016-11-21 19:26:44 +08:00
Steven Dake
6db0621bdc Remove docker reference related to bandit from tox.ini
Change-Id: If3cfda8a1bcb0ec0af39c0f7a067ead1f68cb4ff
2016-11-18 08:52:37 -05:00
Jeffrey Zhang
370f8406ad Remove build related env in tox.ini
Build related jobs are removed in project-config, remove the related tox
env.

Change-Id: If1112b688fed185ba93a2d28a1ba3e77037d392c
2016-11-18 11:30:55 +08:00