Matrixify

This commit is contained in:
2022-03-11 23:06:06 +13:00
parent 58c3c49f4f
commit b938cd9032
2 changed files with 15 additions and 2 deletions

View File

@@ -2,6 +2,13 @@
kind: pipeline
name: default
matrix:
DISTRO:
- centos7
- debian10
- debian11
services:
- name: docker
image: docker:dind
@@ -15,7 +22,7 @@ volumes:
temp: {}
steps:
- name: Test with Molecule
- name: Test with Molecule ${DISTRO}
image: guisea/ansible-molecule:latest
volumes:
- name: dockersock
@@ -26,6 +33,8 @@ steps:
- rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME}
- cd ${DRONE_REPO_NAME}
- molecule test
environment:
- MOLECULE_DISTRO=${DISTRO}
- name: notify by email
image: drillster/drone-email
settings:

View File

@@ -5,7 +5,11 @@ driver:
name: docker
platforms:
- name: instance
image: geerlingguy/docker-centos7-ansible
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
pre_build_image: true
provisioner:
name: ansible