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