{% if "branch" in vars %}
execute: "git checkout origin/{{ vars['branch'] }}; tox -e pep8"
{% else %}
execute: "tox -e pep8"
{% endif %}
image: neutron-pep8-tests
dockerfile: |
  FROM {{ image_name|default("ubi7") }}
  RUN yum install -y http://rhos-release.virt.bos.redhat.com/repos/rhos-release/rhos-release-latest.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

  {% if "release" in vars %}
      RUN rhos-release {{ vars['release'] }}
      RUN yum-config-manager --enable rhelosp-{{ vars['release'] }}.0-unittest
  {% endif %}
 
  RUN yum install -y python-pip python-devel git gcc openssl-devel gettext gcc
  RUN pip install tox==2.3.2
