Files
ansible-role-common/.drone.yml

45 lines
900 B
YAML
Raw Normal View History

2022-03-11 11:29:56 +13:00
---
2022-03-11 12:50:20 +13:00
kind: pipeline
name: default
2022-03-11 11:29:56 +13:00
2022-03-11 12:50:20 +13:00
notify:
image: drillster/drone-email
host: mail.guise.net.nz
username:
from_secret: EMAIL_USER
password:
from_secret: EMAIL_PASS
from: drone@guise.net.nz
when:
status: [ changed, failure ]
2022-03-11 12:32:15 +13:00
2022-03-11 12:50:20 +13:00
steps:
- name: Test with Molecule
2022-03-11 12:59:24 +13:00
image: python:3.9
2022-03-11 12:50:20 +13:00
volumes:
- name: dockersock
path: /var/run
commands:
- apt-get update && apt-get install -y rsync
2022-03-11 14:20:52 +13:00
- python3 -m pip install --upgrade "ansible<=2.10.0" \
2022-03-11 12:50:20 +13:00
flake8 \
2022-03-11 14:20:52 +13:00
"molecule[docker]<3.4.0"
2022-03-11 12:50:20 +13:00
- mkdir ${DRONE_REPO_NAME}
- rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME}
- cd ${DRONE_REPO_NAME}
- python3 --version
- ansible --version
- molecule --version
- molecule test
2022-03-11 11:29:56 +13:00
2022-03-11 12:50:20 +13:00
services:
- name: docker
image: docker:dind
privileged: true
2022-03-11 11:29:56 +13:00
volumes:
2022-03-11 12:48:35 +13:00
- name: dockersock
2022-03-11 12:50:20 +13:00
path: /var/run
volumes:
- name: dockersock
temp: {}