Use generated output from JSONNET

This commit is contained in:
2022-03-14 14:26:47 +13:00
parent 27e97ea40a
commit cc3fc78afc

View File

@@ -1,90 +1,121 @@
--- ---
kind: pipeline - kind: pipeline
name: centos7 name: Test on centos7
matrix:
DISTRO:
- centos7
- debian10
- debian11
services: services:
- name: docker - image: docker:dind
image: docker:dind name: docker
privileged: true privileged: true
volumes: volumes:
- name: dockersock name: dockersock
path: /var/run path: /var/run
volumes:
- name: dockersock
temp: {}
steps: steps:
- name: Test with Molecule centos7 - - commands:
image: guisea/ansible-molecule:latest - sleep 10
volumes:
- name: dockersock
path: /var/run
commands:
- sleep 10 # give docker enough time to start
- mkdir ${DRONE_REPO_NAME} - mkdir ${DRONE_REPO_NAME}
- rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME} - rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME}
- cd ${DRONE_REPO_NAME} - cd ${DRONE_REPO_NAME}
- molecule test - molecule test
environment: environment:
MOLECULE_DISTRO: centos7 MOLECULE_DISTRO: centos7
- name: notify by email image: guisea/ansible-molecule:latest
image: drillster/drone-email name: Test on centos7
volumes:
name: dockersock
path: /var/run
- image: drillster/drone-email
name: notify by email
settings: settings:
from: drone@guise.net.nz
host: mail.guise.net.nz host: mail.guise.net.nz
username:
from_secret: EMAIL_USER
password: password:
from_secret: EMAIL_PASS from_secret: EMAIL_PASS
from: drone@guise.net.nz username:
from_secret: EMAIL_USER
when: when:
status: [ changed, failure ] status:
- changed
--- - failure
kind: pipeline type: docker
name: debian10 volumes:
name: dockersock
temp: {}
- kind: pipeline
name: Test on debian10
services: services:
- name: docker - image: docker:dind
image: docker:dind name: docker
privileged: true privileged: true
volumes: volumes:
- name: dockersock name: dockersock
path: /var/run path: /var/run
volumes:
- name: dockersock
temp: {}
steps: steps:
- name: Test with Molecule debian10 - - commands:
image: guisea/ansible-molecule:latest - sleep 10
volumes:
- name: dockersock
path: /var/run
commands:
- sleep 10 # give docker enough time to start
- mkdir ${DRONE_REPO_NAME} - mkdir ${DRONE_REPO_NAME}
- rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME} - rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME}
- cd ${DRONE_REPO_NAME} - cd ${DRONE_REPO_NAME}
- molecule test - molecule test
environment: environment:
MOLECULE_DISTRO: debian10 MOLECULE_DISTRO: debian10
- name: notify by email image: guisea/ansible-molecule:latest
image: drillster/drone-email name: Test on debian10
volumes:
name: dockersock
path: /var/run
- image: drillster/drone-email
name: notify by email
settings: settings:
from: drone@guise.net.nz
host: mail.guise.net.nz host: mail.guise.net.nz
username:
from_secret: EMAIL_USER
password: password:
from_secret: EMAIL_PASS from_secret: EMAIL_PASS
from: drone@guise.net.nz username:
from_secret: EMAIL_USER
when: when:
status: [ changed, failure ] status:
- changed
- failure
type: docker
volumes:
name: dockersock
temp: {}
- kind: pipeline
name: Test on debian11
services:
- image: docker:dind
name: docker
privileged: true
volumes:
name: dockersock
path: /var/run
steps:
- - commands:
- sleep 10
- mkdir ${DRONE_REPO_NAME}
- rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME}
- cd ${DRONE_REPO_NAME}
- molecule test
environment:
MOLECULE_DISTRO: debian11
image: guisea/ansible-molecule:latest
name: Test on debian11
volumes:
name: dockersock
path: /var/run
- image: drillster/drone-email
name: notify by email
settings:
from: drone@guise.net.nz
host: mail.guise.net.nz
password:
from_secret: EMAIL_PASS
username:
from_secret: EMAIL_USER
when:
status:
- changed
- failure
type: docker
volumes:
name: dockersock
temp: {}