Fix pylint and py27 failures in zuul

pylint running in python2.7 will complain that interperter
can not be found.

Rather than running the pylint job run in python2.7, bump
the job to python3.6, and set the node to run on ubuntu-bionic.

py2.7 jobs was failing randomly because pbr was being setup in the
sdist step. It is unclear if the reason is that something is
source packaged during tox which conflicts with another zuul job
of a different interperter, so simply disable to the source
dist generation.

Most openstack projects are configured like this as well.

Copyright was updated so that the gate will pick up this change.
Closes-Bug: 1932186
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: Ia677057690d3ffe87c23471d958dbff670db9b53
This commit is contained in:
Charles Short 2021-06-16 13:23:23 -04:00
parent 53982cdf03
commit 8253ea8ed0
3 changed files with 5 additions and 9 deletions

View File

@ -67,6 +67,7 @@
- job:
name: k8sapp-cert-mgr-tox-pylint
nodeset: ubuntu-bionic
parent: tox
description: |
Run pylint test for k8sapp-cert-manager

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Wind River Systems, Inc.
# Copyright (c) 2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#

View File

@ -1,8 +1,7 @@
[tox]
envlist = flake8,py27,py36,pylint,bandit
minversion = 1.6
# skipsdist = True
#,pip-missing-reqs
skipsdist = True
# tox does not work if the path to the workdir is too long, so move it to /tmp
toxworkdir = /tmp/{env:USER}_k8scertmanagertox
@ -10,11 +9,7 @@ stxdir = {toxinidir}/../../..
distshare={toxworkdir}/.tox/distshare
[testenv]
# usedevelop = True
# enabling usedevelop results in py27 develop-inst:
# Exception: Versioning for this project requires either an sdist tarball,
# or access to an upstream git repository.
# Note. site-packages is true and rpm-python must be yum installed on your dev machine.
usedevelop = True
sitepackages = True
# tox is silly... these need to be separated by a newline....
@ -97,7 +92,7 @@ deps = -r{toxinidir}/test-requirements.txt
commands = bandit --ini tox.ini -n 5 -r k8sapp_cert_manager
[testenv:pylint]
basepython = python2.7
basepython = python3.6
sitepackages = False
deps = {[testenv]deps}