Add a mapping from `meta/main.yml` to `.travis.yml` and GitHub Actions.
This commit is contained in:
parent
32b5283148
commit
218e19bbdd
|
|
@ -17,8 +17,6 @@ jobs:
|
||||||
- name: molecule
|
- name: molecule
|
||||||
uses: robertdebock/molecule-action@1.1.3
|
uses: robertdebock/molecule-action@1.1.3
|
||||||
with:
|
with:
|
||||||
image: {% raw %}${{ matrix.image }}{% endraw %}
|
|
||||||
|
|
||||||
entrypoint: /usr/local/bin/molecule
|
entrypoint: /usr/local/bin/molecule
|
||||||
args: lint
|
args: lint
|
||||||
test:
|
test:
|
||||||
|
|
@ -26,85 +24,17 @@ jobs:
|
||||||
- lint
|
- lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image:
|
config:
|
||||||
{% for platform in meta.galaxy_info.platforms %}
|
{% for platform in meta.galaxy_info.platforms %}
|
||||||
{% if platform.name == "Amazon" %}
|
{% for version in platform.versions %}
|
||||||
- amazonlinux
|
{% for tag in distribution_version_mapping[platform.name][version] %}
|
||||||
{% elif platform.name == "EL" %}
|
- image: "{{ platform_image_mapping[platform.name] }}"
|
||||||
- centos
|
tag: "{{ tag }}"
|
||||||
{% else %}
|
{% endfor %}
|
||||||
- {{ platform.name | lower }}
|
{% endfor %}
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
tag:
|
|
||||||
- 1
|
|
||||||
- 7
|
|
||||||
- edge
|
|
||||||
- latest
|
|
||||||
- rawhide
|
|
||||||
- unstable
|
|
||||||
exclude:
|
|
||||||
- image: alpine
|
|
||||||
tag: 1
|
|
||||||
- image: alpine
|
|
||||||
tag: 7
|
|
||||||
- image: alpine
|
|
||||||
tag: rawhide
|
|
||||||
- image: alpine
|
|
||||||
tag: unstable
|
|
||||||
- image: amazonlinux
|
|
||||||
tag: 7
|
|
||||||
- image: amazonlinux
|
|
||||||
tag: edge
|
|
||||||
- image: amazonlinux
|
|
||||||
tag: rawhide
|
|
||||||
- image: amazonlinux
|
|
||||||
tag: unstable
|
|
||||||
- image: debian
|
|
||||||
tag: 1
|
|
||||||
- image: debian
|
|
||||||
tag: 7
|
|
||||||
- image: debian
|
|
||||||
tag: edge
|
|
||||||
- image: debian
|
|
||||||
tag: rawhide
|
|
||||||
- image: centos
|
|
||||||
tag: 1
|
|
||||||
- image: centos
|
|
||||||
tag: edge
|
|
||||||
- image: centos
|
|
||||||
tag: rawhide
|
|
||||||
- image: centos
|
|
||||||
tag: unstable
|
|
||||||
- image: fedora
|
|
||||||
tag: 1
|
|
||||||
- image: fedora
|
|
||||||
tag: 7
|
|
||||||
- image: fedora
|
|
||||||
tag: edge
|
|
||||||
- image: fedora
|
|
||||||
tag: unstable
|
|
||||||
- image: opensuse
|
|
||||||
tag: 1
|
|
||||||
- image: opensuse
|
|
||||||
tag: 7
|
|
||||||
- image: opensuse
|
|
||||||
tag: edge
|
|
||||||
- image: opensuse
|
|
||||||
tag: rawhide
|
|
||||||
- image: opensuse
|
|
||||||
tag: unstable
|
|
||||||
- image: ubuntu
|
|
||||||
tag: 1
|
|
||||||
- image: ubuntu
|
|
||||||
tag: 7
|
|
||||||
- image: ubuntu
|
|
||||||
tag: edge
|
|
||||||
- image: ubuntu
|
|
||||||
tag: rawhide
|
|
||||||
- image: ubuntu
|
|
||||||
tag: unstable
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
@ -118,10 +48,14 @@ jobs:
|
||||||
- name: molecule
|
- name: molecule
|
||||||
uses: robertdebock/molecule-action@1.1.3
|
uses: robertdebock/molecule-action@1.1.3
|
||||||
with:
|
with:
|
||||||
image: {% raw %}${{ matrix.image }}{% endraw %}
|
image: {% raw %}${{ matrix.config.image }}{% endraw %}
|
||||||
|
|
||||||
|
tag: {% raw %}${{ matrix.config.tag }}{% endraw %}
|
||||||
|
|
||||||
{% if tox_parallel is defined %}
|
{% if tox_parallel is defined %}
|
||||||
{% if tox_parallel %}
|
{% if tox_parallel %}
|
||||||
options: "--parallel all"
|
options: "--parallel all"
|
||||||
|
env:
|
||||||
|
TOX_PARALLEL_NO_SPINNER: 1
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ provisioner:
|
||||||
config_options:
|
config_options:
|
||||||
defaults:
|
defaults:
|
||||||
stdout_callback: yaml
|
stdout_callback: yaml
|
||||||
bin_ansible_callbacks: true
|
bin_ansible_callbacks: yes
|
||||||
{% if verify.stat.exists %}
|
{% if verify.stat.exists %}
|
||||||
verifier:
|
verifier:
|
||||||
name: ansible
|
name: ansible
|
||||||
|
|
|
||||||
|
|
@ -13,80 +13,11 @@ env:
|
||||||
namespace="{{ docker_namespace }}"
|
namespace="{{ docker_namespace }}"
|
||||||
matrix:
|
matrix:
|
||||||
{% for platform in meta.galaxy_info.platforms %}
|
{% for platform in meta.galaxy_info.platforms %}
|
||||||
{% if platform.name == "Amazon" %}
|
|
||||||
{% for version in platform.versions %}
|
{% for version in platform.versions %}
|
||||||
{% if version == "1" or version == "all" %}
|
{% for tag in distribution_version_mapping[platform.name][version] %}
|
||||||
- image="amazonlinux" tag="1"
|
- image="{{ platform_image_mapping[platform.name] }}" tag="{{ tag }}"
|
||||||
{% endif %}
|
|
||||||
{% if version == "Candidate" or version == "all" %}
|
|
||||||
- image="amazonlinux"
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
|
||||||
{% if platform.name == "Alpine" %}
|
|
||||||
- image="alpine"
|
|
||||||
- image="alpine" tag="edge"
|
|
||||||
{% endif %}
|
|
||||||
{% if platform.name =="ArchLinux" %}
|
|
||||||
# - namespace="archlinux" image="base"
|
|
||||||
{% endif %}
|
|
||||||
{% if platform.name =="Debian" %}
|
|
||||||
- image="debian" tag="unstable"
|
|
||||||
- image="debian"
|
|
||||||
{% endif %}
|
|
||||||
{% if platform.name == "OpenSUSE" %}
|
|
||||||
- image="opensuse"
|
|
||||||
{% endif %}
|
|
||||||
{% if platform.name == "Ubuntu" %}
|
|
||||||
- image="ubuntu"
|
|
||||||
{% endif %}
|
|
||||||
{% if platform.name == "EL" %}
|
|
||||||
{% for version in platform.versions %}
|
|
||||||
{% if version != 8 %}
|
|
||||||
{% for tag in meta.galaxy_info.galaxy_tags %}
|
|
||||||
{% if tag == "redhat" %}
|
|
||||||
- image="redhat" tag="{{ version }}"
|
|
||||||
{% endif %}
|
|
||||||
{% if tag == "centos" %}
|
|
||||||
- image="centos" tag="{{ version }}"
|
|
||||||
{% endif %}
|
|
||||||
{% if tag == "oraclelinux" %}
|
|
||||||
- image="oraclelinux" tag="{{ version }}"
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
|
||||||
{% for tag in meta.galaxy_info.galaxy_tags %}
|
|
||||||
{% if tag == "redhat" %}
|
|
||||||
- image="redhat"
|
|
||||||
{% endif %}
|
|
||||||
{% if tag == "centos" %}
|
|
||||||
- image="centos"
|
|
||||||
{% endif %}
|
|
||||||
{% if tag == "oraclelinux" %}
|
|
||||||
- image="oraclelinux"
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% if platform.name == "Fedora" %}
|
|
||||||
- image="fedora"
|
|
||||||
- image="fedora" tag="rawhide"
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
{% for platform in meta.galaxy_info.platforms %}
|
|
||||||
{% if platform.name == "Alpine" %}
|
|
||||||
- env: image="alpine" tag="edge"
|
|
||||||
{% endif %}
|
|
||||||
{% if platform.name =="Debian" %}
|
|
||||||
- env: image="debian" tag="unstable"
|
|
||||||
{% endif %}
|
|
||||||
{% if platform.name == "Fedora" %}
|
|
||||||
- env: image="fedora" tag="rawhide"
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,59 @@ author: Robert de Bock (robert@meinit.nl)
|
||||||
|
|
||||||
# The full URL to your website.
|
# The full URL to your website.
|
||||||
author_website: "https://robertdebock.nl/"
|
author_website: "https://robertdebock.nl/"
|
||||||
|
|
||||||
|
platform_image_mapping:
|
||||||
|
Fedora: fedora
|
||||||
|
OpenSUSE: opensuse
|
||||||
|
Amazon: amazonlinux
|
||||||
|
EL: centos
|
||||||
|
Alpine: alpine
|
||||||
|
Debian: debian
|
||||||
|
Ubuntu: ubuntu
|
||||||
|
|
||||||
|
distribution_version_mapping:
|
||||||
|
Alpine:
|
||||||
|
all:
|
||||||
|
- latest
|
||||||
|
- edge
|
||||||
|
Amazon:
|
||||||
|
all:
|
||||||
|
- 1
|
||||||
|
- latest
|
||||||
|
1:
|
||||||
|
- 1
|
||||||
|
2:
|
||||||
|
- latest
|
||||||
|
Debian:
|
||||||
|
all:
|
||||||
|
- latest
|
||||||
|
- unstable
|
||||||
|
buster:
|
||||||
|
- latest
|
||||||
|
sid:
|
||||||
|
- unstable
|
||||||
|
EL:
|
||||||
|
all:
|
||||||
|
- 7
|
||||||
|
- latest
|
||||||
|
7:
|
||||||
|
- 7
|
||||||
|
8:
|
||||||
|
- latest
|
||||||
|
Fedora:
|
||||||
|
all:
|
||||||
|
- 30
|
||||||
|
- latest
|
||||||
|
- rawhide
|
||||||
|
30:
|
||||||
|
- 30
|
||||||
|
31:
|
||||||
|
- 31
|
||||||
|
OpenSUSE:
|
||||||
|
all:
|
||||||
|
- latest
|
||||||
|
Ubuntu:
|
||||||
|
all:
|
||||||
|
- latest
|
||||||
|
bionic:
|
||||||
|
- latest
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue