[RELENG-27] Create template for {project}-verify-python-{stream} Created: 24/Feb/16  Updated: 28/Feb/18  Resolved: 11/Apr/16

Status: Open
Project: releng
Component/s: Jenkins Job Builder
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Vratko Polak Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 5424

 Description   

Currently there are few projects with customized verify-python jobs, I recall integration(/test) and Bgpcep. More projects may follow (currently integration/distribution), so it would be good to have a common template for easier maintainance.

Few possible caveats:

integration/test is two-level project name, care should be taken to distinguish project short and full names.

Bgpcep python code is frozen, but pep8 checker changes versions and adds checks, so bgpcep has fixed pep8 to a specific version.
Currently this is handled by tox.ini files in projects (integration/test sets higher pep8 version), but I had to synchronize other things in the two tox.ini files manually.
It would be good if pep8 version string was given as a template parameter

{pep8}

, and otherwise tox.ini contents would be common and stored in releng/builder.



 Comments   
Comment by Thanh Ha (zxiiro) [ 24/Feb/16 ]

tox.ini should be project specific. It's because you can run multiple things with tox.ini and there's no way to know ahead of time what kind of testing configuration the project wants.

For example in spectrometer we use tox to launch a pytest suite to run unit tests against our code.

[testenv]
deps = -r

{toxinidir}

/test-requirements.txt
commands = python setup.py test

Another use I've seen with tox is to test against multiple Python versions.

As an example of a complex tox.ini configuration. Here's the one used by jenkins-job-builder.

https://github.com/openstack-infra/jenkins-job-builder/blob/master/tox.ini

Comment by Vratko Polak [ 25/Feb/16 ]

Alright, tox.ini should remain project specific.
The

{directory}

to cd into before running tox should be configurable instead.

Comment by Thanh Ha (zxiiro) [ 07/Mar/16 ]

Proposed patch: https://git.opendaylight.org/gerrit/35896/

Comment by Thanh Ha (zxiiro) [ 10/Mar/16 ]

Patch was merged.

Comment by Vratko Polak [ 11/Apr/16 ]

The template work correctly for integration/distribution: https://jenkins.opendaylight.org/releng/job/integration-distribution-verify-python-boron/16/

Generated at Wed Feb 07 20:37:18 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.