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
|
||||
uses: robertdebock/molecule-action@1.1.3
|
||||
with:
|
||||
image: {% raw %}${{ matrix.image }}{% endraw %}
|
||||
|
||||
entrypoint: /usr/local/bin/molecule
|
||||
args: lint
|
||||
test:
|
||||
|
|
@ -26,85 +24,17 @@ jobs:
|
|||
- lint
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image:
|
||||
config:
|
||||
{% for platform in meta.galaxy_info.platforms %}
|
||||
{% if platform.name == "Amazon" %}
|
||||
- amazonlinux
|
||||
{% elif platform.name == "EL" %}
|
||||
- centos
|
||||
{% else %}
|
||||
- {{ platform.name | lower }}
|
||||
{% endif %}
|
||||
{% 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 %}
|
||||
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:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
|
@ -118,10 +48,14 @@ jobs:
|
|||
- name: molecule
|
||||
uses: robertdebock/molecule-action@1.1.3
|
||||
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 %}
|
||||
options: "--parallel all"
|
||||
env:
|
||||
TOX_PARALLEL_NO_SPINNER: 1
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ provisioner:
|
|||
config_options:
|
||||
defaults:
|
||||
stdout_callback: yaml
|
||||
bin_ansible_callbacks: true
|
||||
bin_ansible_callbacks: yes
|
||||
{% if verify.stat.exists %}
|
||||
verifier:
|
||||
name: ansible
|
||||
|
|
|
|||
|
|
@ -13,80 +13,11 @@ env:
|
|||
namespace="{{ docker_namespace }}"
|
||||
matrix:
|
||||
{% for platform in meta.galaxy_info.platforms %}
|
||||
{% if platform.name == "Amazon" %}
|
||||
{% for version in platform.versions %}
|
||||
{% if version == "1" or version == "all" %}
|
||||
- image="amazonlinux" tag="1"
|
||||
{% endif %}
|
||||
{% if version == "Candidate" or version == "all" %}
|
||||
- image="amazonlinux"
|
||||
{% endif %}
|
||||
{% for tag in distribution_version_mapping[platform.name][version] %}
|
||||
- image="{{ platform_image_mapping[platform.name] }}" tag="{{ tag }}"
|
||||
{% 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 %}
|
||||
{% 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 %}
|
||||
|
||||
cache:
|
||||
|
|
|
|||
|
|
@ -20,3 +20,59 @@ author: Robert de Bock (robert@meinit.nl)
|
|||
|
||||
# The full URL to your website.
|
||||
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