ansible-generator/templates/travis.yml.j2

46 lines
1.1 KiB
Django/Jinja

---
{{ ansible_managed | comment }}
language: python
os: linux
dist: xenial
python:
- "3.8"
services:
- docker
env:
global:
namespace="{{ docker_namespace }}"
jobs:
{% for platform in meta.galaxy_info.platforms %}
{% for version in platform.versions %}
{% for tag in distribution_version_mapping[platform.name][version] %}
- image="{{ platform_image_mapping[platform.name] }}" tag="{{ tag }}"
{% endfor %}
{% endfor %}
{% endfor %}
cache:
- pip
install:
- pip install --upgrade pip
- pip install tox
script:
{% if tox_parallel is defined and tox_parallel %}
- function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all
{% else %}
- function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox
{% endif %}
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
slack:
secure: {{ travis.notifications.slack.secure }}
on_success: change
email: false