infrastructure/.drone.yml

47 lines
1.0 KiB
YAML
Raw Normal View History

2022-09-30 12:35:01 +02:00
---
2022-09-30 02:47:12 +02:00
kind: pipeline
type: docker
2022-09-30 12:35:01 +02:00
name: Ansible-Playbook
2022-09-30 02:47:12 +02:00
trigger:
branch:
- main
event:
include:
- push
- custom
2022-09-30 12:35:01 +02:00
node:
ansible: true
2022-09-30 02:47:12 +02:00
steps:
- name: Run Ansible
image: registry.tobiasmanske.de/ansible-runner:latest
pull: always
commands:
- cd coreos-config
2023-03-13 22:41:36 +01:00
- ansible-playbook --limit host.nc.chaoswg.org --private-key /ssh_key --inventory=inventory.yaml playbook.yaml
- name: Validate Ansible
image: registry.tobiasmanske.de/ansible-runner:latest
pull: always
commands:
- cd coreos-config
2023-03-13 22:41:36 +01:00
- ansible-playbook --limit host.nc.chaoswg.org --check --private-key /ssh_key --inventory=inventory.yaml playbook.yaml
2022-09-30 12:35:01 +02:00
- name: Notify Discord
when:
status:
- failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
message: >
{{repo.name}}
Deployment {{build.number}} failed!
{{build.link}}
2022-09-30 02:47:12 +02:00
image_pull_secrets:
- registry