108 Commits

Author SHA1 Message Date
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
Jeffrey Zhang
2392d7e38c Add file validator for *.json.j2 file
All json file in Kolla are json.j2 file, it shold be render as jinja
template, then validate by using json.

Change-Id: Ibabbe435116fd255d68347e00407156db76fedfe
Closes-Bug: #1634447
2016-11-05 01:16:12 +08:00
Andreas Jaeger
e7d4a1ecf6 Move bandit to pep8 as generic linting target
bandit is a security linter and can be made voting now. Instead of
starting another virtual machine, run it as part of the generic linting
target which is pep8.

Change-Id: I6a8f7aa2b60bd96d55b37b6cc2a371069d6d5e6a
2016-10-19 20:40:33 +02:00
Jeffrey Zhang
3e89f987c0 Add validate no new line at end of file
TrivialFix

Change-Id: I817aa52caf56b7d54b266e553db6db1ceb38b773
Signed-off-by: Jeffrey Zhang <zhang.lei.fly@gmail.com>
2016-10-19 17:17:06 +00:00
Jenkins
76ff764522 Merge "Add support to use pdb with tox" 2016-09-22 07:08:58 +00:00
MD NADEEM
3bf571da06 Add support to use pdb with tox
TrivialFix

Change-Id: I6f32ce7033fe5a8b8f628a8f52dde67b9540083d
2016-09-21 03:25:42 +00:00
MD NADEEM
92c828b99c Remove all bytcode & objectcode before running tox
Currently __pycache__ directory, which also holds
python bytecode is not deleted when running tox.
TrivialFix

Change-Id: I0fdcf9a3f9b01cee813eefdbfe29d208dd67f826
2016-09-20 12:09:30 +05:30
Paul Bourke
fc30d583f9 Fix bandit gate jobs
* Inspected each error and fixed / added nosec where appropriate.
* build-swift-ring.py which was throwing sec errors is no longer used so
  removed it.
* Removed the dev/ directory from being checked.

Closes-Bug: #1617713
Change-Id: I25664cabca4137e5c9f499c1af3f5ce78b86fb56
2016-08-28 08:52:44 +00:00
Christian Berendt
c3d8262ec5 Add doc8 test and improve rst syntax
This will test all rst files inside the doc directory for style issues with
doc8 (an opinionated style checker for rst styles of documentation).

This will fix all syntax issues identified by doc8 and will improve
the syntax.

Change-Id: Id1b9563e07e77e306aef5a0767c98c27f87c5c0e
2016-08-04 15:09:10 +02:00
Yatin Kumbhare
bcebc7cb47 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: Ia7b1fb88ac108e1e8fd6ed963967e731ae3ca5a4
Closes-Bug: #1603006
2016-07-14 15:59:37 +05:30
Swapnil Kulkarni (coolsvap)
eb1bfc2c2e Add support to lint the install commands in Dockerfiles
Change-Id: Icb47ba8b13b13889e28bb285321f11344400edc2
Closes-Bug:#1582618
2016-05-26 17:41:42 +05:30
Jeffrey Zhang
7ab705cd4d Add Ubuntu binary build and deploy gate
The Ubuntu Mitaka repo is release, and we have add it.
So it is time to add the Ubuntu binary gate.

Closes-Bug: #1560386
Change-Id: I29d01147595c4ebebfa00798d01d5fd7398123a6
2016-04-02 16:02:58 +00:00
Steven Dake
a789346727 Fix gate to use world writeable docker socket
A recent change related to sudo securepath broke how sudo -E
works.  Now the PATH is reset by sudo as set by tox.  As a result
we can no longer rely on sudo -E anywhere in our gating system
relating to path inheritence from the parent shell.

This patch uses a shell operation in the setup_nodes.yml code
to chmod the docker socket to 666 so docker containers can build
properly.  Now docker operations don't return a permission denied
and we no longer require the sudo -E operation in any of our tox
scripts.  This isn't a security vulnerability because our gate
scripts are only meant to be run in OpenStack infrastructure.
To make this more clear I recommend moving these shell scripts to
tests/gate.

Change-Id: I5b3d6e280e3c12a25defedb14b5589ba642043fa
Closes-Bug: #1562383
2016-03-26 22:23:35 -07:00
Steven Dake
801ef2e843 Add reno support
For proper release note generation on the releases.openstack.org
website, this change will need to be backported into mitaka and
liberty as well.  Then a special one-file reno file will have to
be added for mitaka describing the features and the same story
for liberty.

See log of the discussion here:
http://eavesdrop.openstack.org/irclogs/%23openstack-release/%23openstack-release.2016-03-23.log.html#t2016-03-23T18:00:05

Change-Id: I3c298ae08ec4645f384ea5829cb0851fe82f4557
Partially-Implements: blueprint add-reno
2016-03-23 11:59:35 -07:00
Dave McCowan
39b8150f66 Add tox job for the bandit python security linter
Bandit is a job that parses and analyzes python code to detect
common insecure programming practices.

TrivialFix

Change-Id: Iea23a9bd23b25827043f02aa1a62fb0724f1d0ee
2016-03-08 16:33:59 -05:00
Jenkins
f3048ff8ab Merge "Introduce the hacking module to kolla" 2016-03-03 21:48:44 +00:00
Jeffrey Zhang
4e154f0018 Introduce the hacking module to kolla
Implements: blueprint add-hacking

Change-Id: Ia24a263555b9c1eb11e61b9d3fe89612a89daed6
2016-03-03 04:40:16 +00:00
Paul Bourke
80f0890c81 Add new gates for oraclelinux
Change-Id: Ic5c0e266639c8ed76d0af473d076d9ae6749102a
Implements: bp oraclelinux-gate
2016-03-01 15:34:34 +00:00
Jeffrey Zhang
d95fd11b2d Remove the tox linters env
TrivialFix

Change-Id: Icd69a4d6de8ef222b219e758fa38d58f2c98f505
2016-02-26 19:26:26 +08:00
Andreas Jaeger
8ad0b11065 Make pep8 *the* linting interface
According to the PTI (=Python Test Interface,
http://governance.openstack.org/reference/cti/python_cti.html), pep8
is the interface for codestyle checks. Move all tests from linters to
pep8.

This change will be followed by a change to project-config to use pep8
for testing in the gate.

Change-Id: I1a48f4b1e0b0950640192bcfc55121619a844b50
2016-02-11 09:55:28 +00:00