Revert "check-plugins job: convert the job to tox"
This reverts commit 1aed3ce715
.
Change-Id: Id983fddcf07a5a43da62b7529d531c2444404b22
This commit is contained in:
parent
a110206709
commit
8a73ffa2bb
|
@ -1,10 +1,9 @@
|
||||||
# from o-z-j/zuul.d/zuul-legacy-jobs.yaml
|
# from o-z-j/zuul.d/zuul-legacy-jobs.yaml
|
||||||
- job:
|
- job:
|
||||||
name: openstackclient-check-plugins
|
name: openstackclient-check-plugins
|
||||||
parent: openstack-tox
|
parent: unittests
|
||||||
|
run: playbooks/openstackclient-check-plugins/run.yaml
|
||||||
timeout: 1800
|
timeout: 1800
|
||||||
vars:
|
|
||||||
tox_envlist: osc_plugins
|
|
||||||
required-projects:
|
required-projects:
|
||||||
- openstack/openstackclient
|
- openstack/openstackclient
|
||||||
- x/pbrx
|
- x/pbrx
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
- hosts: all
|
||||||
|
name: Run openstackclient plugin check
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- shell:
|
||||||
|
cmd: |
|
||||||
|
echo "------------------------------------------------------------"
|
||||||
|
virtualenv osc_plugins
|
||||||
|
osc_plugins/bin/pip install -e ../../x/pbrx
|
||||||
|
echo "------------------------------------------------------------"
|
||||||
|
osc_plugins/bin/pip install -c ../requirements/upper-constraints.txt -r requirements.txt
|
||||||
|
echo "------------------------------------------------------------"
|
||||||
|
osc_plugins/bin/pbrx install-siblings -c ../requirements/upper-constraints.txt $(find ../.. -mindepth 2 -maxdepth 2)
|
||||||
|
echo "------------------------------------------------------------"
|
||||||
|
osc_plugins/bin/pbr freeze
|
||||||
|
echo "------------------------------------------------------------"
|
||||||
|
osc_plugins/bin/openstack --version
|
||||||
|
osc_plugins/bin/python tests/check_osc_commands.py
|
||||||
|
chdir: /home/zuul/src/opendev.org/openstack/openstackclient
|
|
@ -18,7 +18,6 @@ plugins with the purpose of detecting duplicate commands.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import pprint
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,29 +96,26 @@ def find_duplicates():
|
||||||
|
|
||||||
if duplicate_cmds:
|
if duplicate_cmds:
|
||||||
print("Duplicate commands found...")
|
print("Duplicate commands found...")
|
||||||
pprint.pprint(duplicate_cmds)
|
print(duplicate_cmds)
|
||||||
return True
|
return True
|
||||||
if failed_cmds:
|
if failed_cmds:
|
||||||
print("Some commands failed to load...")
|
print("Some commands failed to load...")
|
||||||
pprint.pprint(failed_cmds)
|
print(failed_cmds)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
overlap_cmds = _check_command_overlap(valid_cmds)
|
overlap_cmds = _check_command_overlap(valid_cmds)
|
||||||
|
|
||||||
print("Final set of commands...")
|
|
||||||
pprint.pprint(valid_cmds)
|
|
||||||
|
|
||||||
if overlap_cmds:
|
if overlap_cmds:
|
||||||
print("WARNING: Some commands overlap...")
|
print("WARNING: Some commands overlap...")
|
||||||
pprint.pprint(overlap_cmds)
|
print(overlap_cmds)
|
||||||
# FIXME(stevemar): when we determine why commands are overlapping
|
# FIXME(stevemar): when we determine why commands are overlapping
|
||||||
# we can uncomment the line below. We return False until then.
|
# we can uncomment the line below.
|
||||||
# return True
|
# return True
|
||||||
return False
|
|
||||||
else:
|
# Safely return False here with the full set of commands
|
||||||
# Safely return False here with the full set of commands
|
print("Final set of commands...")
|
||||||
print("Found no duplicate or overlapping commands, OK to merge!")
|
print(valid_cmds)
|
||||||
return False
|
print("Found no duplicate or overlapping commands, OK to merge!")
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def _check_command_overlap(valid_cmds):
|
def _check_command_overlap(valid_cmds):
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
#/bin/bash
|
|
||||||
|
|
||||||
pbrx install-siblings -c ../requirements/upper-constraints.txt $(find ../.. -mindepth 2 -maxdepth 2)
|
|
15
tox.ini
15
tox.ini
|
@ -22,21 +22,6 @@ deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:osc_plugins]
|
|
||||||
basepython = python2.7
|
|
||||||
deps =
|
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
||||||
-r{toxinidir}/requirements.txt
|
|
||||||
../../x/pbrx
|
|
||||||
whitelist_externals =
|
|
||||||
bash
|
|
||||||
commands =
|
|
||||||
# bash wrapper is required to handle a subshell of find.
|
|
||||||
bash ./tests/install-siblings.sh
|
|
||||||
pbr freeze
|
|
||||||
openstack --version
|
|
||||||
python tests/check_osc_commands.py
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E123,H405
|
ignore = E123,H405
|
||||||
show-source = True
|
show-source = True
|
||||||
|
|
Loading…
Reference in New Issue