Allow all external commands in tox
Change-Id: I76e0fc0e574d791e8f4d83ccc22289fa06360709
This commit is contained in:
0
ci/run-ansible-tests-collection.sh
Normal file → Executable file
0
ci/run-ansible-tests-collection.sh
Normal file → Executable file
0
tools/run-ansible-sanity.sh
Normal file → Executable file
0
tools/run-ansible-sanity.sh
Normal file → Executable file
18
tox.ini
18
tox.ini
@@ -24,7 +24,6 @@ deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements.txt
|
||||
pip: {toxinidir}
|
||||
|
||||
commands = stestr run {posargs}
|
||||
stestr slowest
|
||||
|
||||
@@ -33,19 +32,20 @@ commands =
|
||||
flake8
|
||||
|
||||
[testenv:build]
|
||||
allowlist_externals = bash
|
||||
deps =
|
||||
ansible-core
|
||||
galaxy-importer
|
||||
pbr
|
||||
ruamel.yaml
|
||||
|
||||
commands =
|
||||
python {toxinidir}/tools/build.py
|
||||
ansible --version
|
||||
ansible-galaxy collection build --force {toxinidir} --output-path {toxinidir}/build_artifact
|
||||
/bin/bash {toxinidir}/tools/check-import.sh {toxinidir}
|
||||
bash {toxinidir}/tools/check-import.sh {toxinidir}
|
||||
|
||||
[testenv:linters]
|
||||
allowlist_externals = bash
|
||||
passenv = *
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
@@ -53,7 +53,7 @@ commands =
|
||||
{[testenv:build]commands}
|
||||
{[testenv:pep8]commands}
|
||||
ansible --version
|
||||
/bin/bash {toxinidir}/tools/run-ansible-sanity.sh {toxinidir}
|
||||
bash {toxinidir}/tools/run-ansible-sanity.sh {toxinidir}
|
||||
|
||||
[testenv:linters-2.9]
|
||||
passenv = {[testenv:linters]passenv}
|
||||
@@ -88,6 +88,7 @@ show-source = True
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
||||
|
||||
[testenv:ansible]
|
||||
allowlist_externals = bash
|
||||
# Need to pass some env vars for the Ansible playbooks
|
||||
passenv =
|
||||
HOME
|
||||
@@ -96,7 +97,7 @@ passenv =
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
commands =
|
||||
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
||||
bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
||||
|
||||
[testenv:ansible-2.9]
|
||||
deps =
|
||||
@@ -120,11 +121,12 @@ passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
[testenv:galaxy-release]
|
||||
allowlist_externals = mkdir rm sed
|
||||
deps =
|
||||
ansible-core
|
||||
commands =
|
||||
/usr/bin/mkdir -p /tmp/collection_built
|
||||
/usr/bin/bash -ec 'rm -rf /tmp/collection_built/*'
|
||||
/usr/bin/sed -i "s/version:.*/version: {env:VERSION_TAG}/" {toxinidir}/galaxy.yml
|
||||
rm -rf /tmp/collection_built/
|
||||
mkdir -p /tmp/collection_built/
|
||||
sed -i "s/version:.*/version: {env:VERSION_TAG}/" {toxinidir}/galaxy.yml
|
||||
ansible-galaxy collection build {toxinidir} --output-path /tmp/collection_built/ --force
|
||||
ansible-galaxy collection publish /tmp/collection_built/openstack-cloud-{env:VERSION_TAG}.tar.gz --token {env:API_GALAXY_TOKEN}
|
||||
|
||||
Reference in New Issue
Block a user