Files
ansible-role-common/.drone.yml

49 lines
885 B
YAML
Raw Normal View History

2022-03-11 15:29:57 +13:00
---
2022-03-11 12:50:20 +13:00
kind: pipeline
2022-03-11 15:29:57 +13:00
name: default
2022-03-11 11:29:56 +13:00
2022-03-11 23:06:06 +13:00
matrix:
DISTRO:
- centos7
- debian10
- debian11
2022-03-11 15:55:18 +13:00
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: dockersock
temp: {}
2022-03-11 12:50:20 +13:00
steps:
2022-03-11 23:06:06 +13:00
- name: Test with Molecule ${DISTRO}
2022-03-11 15:41:14 +13:00
image: guisea/ansible-molecule:latest
2022-03-11 15:10:08 +13:00
volumes:
2022-03-11 15:22:54 +13:00
- name: dockersock
path: /var/run
2022-03-11 15:10:08 +13:00
commands:
2022-03-11 21:13:45 +13:00
- sleep 10 # give docker enough time to start
2022-03-11 15:39:01 +13:00
- mkdir ${DRONE_REPO_NAME}
- rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME}
- cd ${DRONE_REPO_NAME}
- molecule test
2022-03-11 23:06:06 +13:00
environment:
2022-03-11 23:10:34 +13:00
MOLECULE_DISTRO: ${DISTRO}
2022-03-11 15:41:14 +13:00
- name: notify by email
image: drillster/drone-email
2022-03-11 16:40:20 +13:00
settings:
host: mail.guise.net.nz
username:
from_secret: EMAIL_USER
password:
from_secret: EMAIL_PASS
from: drone@guise.net.nz
2022-03-11 22:15:09 +13:00
when:
status: [ changed, failure ]