From b938cd903251cc8bcb0027e31bf0da86af5b4050 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Fri, 11 Mar 2022 23:06:06 +1300 Subject: [PATCH] Matrixify --- .drone.yml | 11 ++++++++++- molecule/default/molecule.yml | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b666f9d..b00502d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 2943102..83adefb 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -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