[tox]
envlist = manifests,plugin_zabbix,build_plugin,docs,qa_docs
skipsdist = True

[testenv]
deps = -r{toxinidir}/test-requirements.txt
passenv = HOME

[testenv:manifests]
changedir = {toxinidir}/deployment_scripts/puppet/manifests
whitelist_externals =
    bundle
    mkdir
commands =
    mkdir -p {toxinidir}/.bundled_gems
    bundle install --path {toxinidir}/.bundled_gems
    bundle exec rake test

[testenv:plugin_zabbix]
changedir = {toxinidir}/deployment_scripts/puppet/modules/{envname}
whitelist_externals =
    bundle
    mkdir
commands =
    mkdir -p {toxinidir}/.bundled_gems
    bundle install --path {toxinidir}/.bundled_gems
    bundle exec rake test

[testenv:build_plugin]
changedir = {toxinidir}
whitelist_externals=
    fpb
    rm
commands =
    rm -rf .build
    rm -rf repositories/ubuntu/*.deb
    rm -rf repositories/centos/*.rpm
    fpb --check {toxinidir} --debug
    fpb --build {toxinidir} --debug

[testenv:docs]
changedir = {toxinidir}/doc/plugin-guide
whitelist_externals = make
commands =
    make clean html SPHINXOPTS=-W

[testenv:qa_docs]
changedir = {toxinidir}/doc/qa
whitelist_externals = make
commands =
    make clean html SPHINXOPTS=-W

[tox]
envlist = manifests,plugin_zabbix,build_plugin,docs,qa_docs
skipsdist = True

[testenv]
deps = -r{toxinidir}/test-requirements.txt
passenv = HOME

[testenv:manifests]
changedir = {toxinidir}/deployment_scripts/puppet/manifests
whitelist_externals =
    bundle
    mkdir
commands =
    mkdir -p {toxinidir}/.bundled_gems
    bundle install --path {toxinidir}/.bundled_gems
    bundle exec rake test

[testenv:plugin_zabbix]
changedir = {toxinidir}/deployment_scripts/puppet/modules/{envname}
whitelist_externals =
    bundle
    mkdir
commands =
    mkdir -p {toxinidir}/.bundled_gems
    bundle install --path {toxinidir}/.bundled_gems
    bundle exec rake test

[testenv:build_plugin]
changedir = {toxinidir}
whitelist_externals=
    fpb
    rm
    bash
commands =
    rm -rf .build
    bash -c 'rm -rf doc/*/build'
    bash -c 'rm -rf repositories/ubuntu/*.deb repositories/centos/*.rpm'
    fpb --check {toxinidir} --debug
    fpb --build {toxinidir} --debug

[testenv:docs]
changedir = {toxinidir}/doc/plugin-guide
whitelist_externals = make
commands =
    make clean html SPHINXOPTS=-W

[testenv:qa_docs]
changedir = {toxinidir}/doc/qa
whitelist_externals = make
commands =
    make clean html SPHINXOPTS=-W

Fix for proper plugin package generation
Fix for proper plugin package generation

Remove previously generated documentation
Remove previously downloaded packages

Change-Id: Idd6dff08c23e0ed238576ee1aec865cad8ad4073
